Author Topic: Off Topic - Main  (Read 467596 times)

modman

  • Guest
Re: Off Topic - Main
« Reply #50 on: 10 March 2009, 01:37:38 »
OK, but could you make sure you don't give anything away...you could still talk about it, but please do not tell anyone how to win; I want them to figure out how to lose!

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Off Topic - Main
« Reply #51 on: 10 March 2009, 18:03:57 »
I played it then deleted it. Nothing really seems to happen except one game over then everything is done. And if I don't do IT, then nothing happens. WTF?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

modman

  • Guest
Re: Off Topic - Main
« Reply #52 on: 10 March 2009, 22:37:29 »
I think you have to wait a while...

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Off Topic - Main
« Reply #53 on: 11 March 2009, 00:26:27 »
Apparently there's something you have to do that is not readily apparent and that you would have no reason to think of.  I know what it is, but I'm not telling. :)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Off Topic - Main
« Reply #54 on: 11 March 2009, 17:06:23 »
Doesn't matter to me anymore, I deleted it (heh).

Say, I never even got a chance to play GAE yet because my Kubuntu is glinched or something. Everytime it has to ask for a password, it won't let me type anything. I even tried all the submission types, and even the virtual keyboard to no success.

I heard some fantastic reviews about Fedora, so I might give that a shot. Any comments on that?
Other options include OpenSuSE, Mandriva, Linux Mint, and MEPIS.
Any help choosing?
« Last Edit: 11 March 2009, 18:13:04 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Off Topic - Main
« Reply #55 on: 12 March 2009, 06:21:51 »
Quote
Everytime it has to ask for a password, it won't let me type anything.
If that is on the console then it is intended. Just type and push enter.

openSUSE is my fav.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Off Topic - Main
« Reply #56 on: 13 March 2009, 04:37:47 »
Nah, it's a standard 'enter administer password' window. Eh, I never liked the names of all these programs anyway (k this, k that).

So you like OpenSuSE? I'm personally stuck between that and Fedora. I won't be able to download for some months even, so I got plenty of time to choose. Any other opinions?

EDIT// Concerning another thing:
How do you compile action script for SWF (ShockWave Flash) files? I never realized that I got no clue if there is even a free compiler.

And yeah, it needs to be free because I am probably the world's cheapest programmer. ;D

------------ NEW POST -----------------
I never answered my question above by the way, so I'm welcome to answers.

Anyway, it seems my thirst for knowledge is unquenchable, and I've already begun to work with PHP. Been meaning to learn that for a while. So I know the synastix, all the basics, and a bunch of the advanced stuff, even though I haven't even run it yet! (IIS needs this add-on sort of thing, which I'm downloading, and I am downloading Apache too). Is this valid for a form with php email?

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>Contact</title>
</head>
<body>
<form action="contact.php" method="post">
<table border="0" cellpadding="3">
   <tr>
   <td>Name:</td>
   <td><input type="text" name="name" /></td>
   </tr>
   <tr>
   <td>Email:</td>
   <td><input type="text" name="email" /></td>
   </tr>
   <tr>
   <td>Text:</td>
   <td><textarea rows="4" cols="60" name="text" >Put your message here.</textarea></td>
   </tr>
</table>
</form>
<?php
   
// Get forms data and variables
   
$name $_POST["name"];
   
$email $_POST["email"];
   
$text $_POST["text"];
   
$to "omega99999-^-gmail.com";
   
$subject "Contact Reply from " $name;
   
$headers "From: " $email;
   
$message "This is a confirmation that the message was sent. It contained the following data: " $text;
   
   if (
$to!=NULL && $name!=NULL && $email!=NULL){
      echo 
"You cannot have a blank area";
   }
   else {
      
// Mail
      
mail($to,$subject,$text,$headers);
     
      
// State that the message was sent
      
echo "Thank you" $name "Your Message has been sent.";
   }
?>


</body>
</html>

SWEET! I didn't know code in PHP displays differently!
« Last Edit: 15 April 2016, 20:49:30 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Off Topic - Main
« Reply #57 on: 14 March 2009, 04:36:21 »
well my dads a programmer so he keeps are kubuntu running at his house(, i'm glad bacause at my mom's house she has a vista home basic and if you've had one you'll know the troubles they put you through)
and the only way he ever figures it out is by doing about two hours of research so...idk just look it up there tons of stuff out there
Egypt Remastered!

Proof: Owner of glest@mail.com

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Off Topic - Main
« Reply #58 on: 14 March 2009, 04:43:24 »
oh and if my last post here (besides this one) was rather random, you can blame Bill Gates or well this is the off topic topic
yah while i was at my mom's house i was playing glest after like 2 hours i was just about to win and the stupid thing automatically shut down without any warning at all, for some stupid updates that never do anything ::)
and then i turned it back on after flipping the dang switch about fifty thousand times ::) and it crashed loading the boot thingy
i seriously can't believe my mom's computer, that's why i like linux so much better cause you can do something without the whole thing freezing up for no reason

wow that was random, wait...no it wasn't that happened today and now i'm sitting on my linux and it's almost one o clock here in my timezone

have fun people!

i think i'll go to sleep now...............
Egypt Remastered!

Proof: Owner of glest@mail.com

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Off Topic - Main
« Reply #59 on: 14 March 2009, 04:48:49 »
You go to sleep at one? Early... (lol).

This is why to play in Windowed mode. I also have auto updates disabled for me. I manually trigger them when I want to have them triggered (like three times a year, heh).

And yeah, that was random...
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Off Topic - Main
« Reply #60 on: 14 March 2009, 07:17:44 »
@Omega: Your mail script looks ok, just a couple things.

Code: [Select]
   if ($to!=NULL && $name!=NULL && $email!=NULL){
      echo "You cannot have a blank area";
   }
I think you mean $to==NULL , etc.

Also you aren't checking the validity of the user input to prevent email header injection.
http://securityreason.com/securityalert/2505
http://www.phpletter.com/PHP-Programming-Corner/Email-Header-Injection-Exploit/
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Off Topic - Main
« Reply #61 on: 15 March 2009, 08:56:39 »
I also realized something while I was thinking. Wouldn't the PHP script have to be in a seperate file than the html? Or else it will be sending the mail the second the page loads, not when the form submits. So the html page can have the form, and the action page can be the PHP.

And thanks for the header injection articles Hailstone. (Even though I don't actually understand them yet)

I think you mean $to==NULL , etc.
But isn't NULL basically a false value? Wouldn't a blank be a null? I just wanted it to check to see if its blank in the form, in which case to return an error. After uploading it online, I realized that that isn't going to work would
Code: [Select]
$to != "" work?

Another thing I noticed is that 110mb disallows the mail() function for free accounts. So, I'm curious, among all webservers, what would be the cheapest price for a domain with no restrictions, at least 100GB bandwidth, and unlimited (or at least a lot) of subdomains?

*RANT* Grr, I'm clueless on using Apache. Time to use plan B. What is plan B? Find out Here
« Last Edit: 15 March 2009, 09:01:29 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Off Topic - Main
« Reply #62 on: 15 March 2009, 09:28:51 »
Quote
Wouldn't the PHP script have to be in a seperate file than the html? Or else it will be sending the mail the second the page loads
When you load the page the text edits will be empty and you are going to check for that before sending. So in that case it won't but you can make sure it doesn't by checking for a submit button press (but you need to add it first with a name).
 
Code: [Select]
if($_POST['submitName']) {
// add code here
}

Quote
But isn't NULL basically a false value? Wouldn't a blank be a null? I just wanted it to check to see if its blank in the form, in which case to return an error.
That's right. The way you had it before would give the error if there was text. != NULL would return true ("" might work if NULL doesn't).

Code: [Select]
if (bool expression) {
// code for true condition
} else {
// code for false condition
}

http://byethost.com/ has php sendmail enabled on free accounts.

Here's another example of mail in php. http://www.w3schools.com/PHP/php_secure_mail.asp
« Last Edit: 15 March 2009, 09:31:34 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Off Topic - Main
« Reply #63 on: 15 March 2009, 10:04:34 »
Ah, now I can understand it a bit more (the header injection).

And now that I think of the way I represented the if statement, you are right about it being == not !=. Because I started with a false statement, and then let the else be true.

And thanks for the hosting suggestion! I don't know how I've never heard of this one before. (oh yeah, because google is flooded with ones claiming to be free...)
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Off Topic - Main
« Reply #64 on: 22 March 2009, 08:55:59 »
Sorry for DPing.

I need some help making a script to read cookies. I just need to read the cookie value. I have the cookie set, and I know how to delete it, etc; but I need to read it properly. Many of the scripts for that are Regular Expressions, which are NOT my strong point, so could someone give me a good code with comments and tell me how to use it?

Thanks.

Also, I'm curious, how do I view the PHP source of a page? Whenever I choose view source (in FF), the PHP seems to be filtered out. I consider hands on experience to be the fastest and easiest way to learn something, so I want to see the source unfiltered, but (if possible) still with the synastix highlighting?

COPIED FROM ABOVE:

Concerning another thing:
How do you compile action script for SWF (ShockWave Flash) files? I never realized that I got no clue if there is even a free compiler.

And yeah, it needs to be free because I am probably the world's cheapest programmer. Grin
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

jrepan

  • Guest
Re: Off Topic - Main
« Reply #65 on: 22 March 2009, 09:53:22 »
I need some help making a script to read cookies. I just need to read the cookie value. I have the cookie set, and I know how to delete it, etc; but I need to read it properly. Many of the scripts for that are Regular Expressions, which are NOT my strong point, so could someone give me a good code with comments and tell me how to use it?
http://php.net/manual/en/reserved.variables.cookies.php
Quote
Also, I'm curious, how do I view the PHP source of a page? Whenever I choose view source (in FF), the PHP seems to be filtered out. I consider hands on experience to be the fastest and easiest way to learn something, so I want to see the source unfiltered, but (if possible) still with the synastix highlighting?
You can't because PHP runs on a web server, which means that server sends only results(HTML, not PHP code).
PHP manual is quite good and also has examples.

@kukac@

  • Guest
Re: Off Topic - Main
« Reply #66 on: 9 April 2009, 10:57:59 »
Quote from: archmage101
speaking of off topic..................

by the way i have something to say to omega...

Quote
you can blame my stupid school, they load me with homework all the time
Awe come on... Don't you think that's a LITTLE harsh. I mean, how are you gonna learn other stuff without school?

here's my answer:just to let you know MORE than 50% of everything i know was learned out of school
in fact i could read pretty well when i was about 5 years old, i learned most of my vocabulary from my Dad the internet and other various sources besides school. Besides i'm only in 6th grade, and they give you really easy stuff, i'd estimate that about 70% of the stuff they so-called "teach" is stuff i'll either never use or most likely already know. AND one more Rediculous thing! In language arts i did a poetry book(which was just a big waste of time) and i had to write about 26 poems in 26 days, i worked it out easy, but had to rush a bit in the end to get it done, and now guess what, were going to be doing ANOTHER poetry book in art class, and guess again!...it's the same poems all over again!
The teachers know and they think it's going to "help me learn tons of new stuff"!

You know i'd give quite a bit to have a school that actually knows what learning means, and doesn't load you up with all this rediculous homework, that ONLY wastes a lot of time.

sorry to kind of blurt all this out, i'm not trying to sound offensive, it's just the truth
and also moderators please don't lock this topic i just wanted to respond to  what omega said
i'll try to stay on topic in the future!

Quote from: Hailstone
Off topic again:
I completely agree with you archmage101. I ended up doing 2 university units while in my last year of high school. Fortunately I was spared the large amount of poetry. If you can, try to link outside projects with your school projects. For example, if you have an essay to write and have some flexibility. That way you can get marked on it and get what you want to do done. I did a video of Glest mods for one of my school projects. School is a really good place to test ideas and experiment.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Off Topic - Main
« Reply #67 on: 9 April 2009, 13:47:50 »
Quote from: archmage101
MORE than 50% of everything i know was learned out of school
Unfortunately, society seems to be moving farther away from that all the time, from the extensional (learn by experiencing) to the intentional (learn by being told).  The problem with that is that you get a lot more out of experiencing something yourself than just being told about it.  It's like in that movie where some kid is trying to drive a car and somebody asks him "Have you ever done this before?" and he says "No, but I've seen my dad do it lots of times!"  Seeing and knowing something leads to a completely different kind of understanding than experiencing it for yourself.  I'm reminded of an old saying I read not too long ago.  "What is greater than all the teachings of the Buddha?  Sesame cake."  That is to say, no matter how wise or insightful someone's teachings may be, they're no substitute for something that is real and tangible.  (I'm not Buddhist, but I still think there's some wisdom in just about any belief system.)

Quote from: archmage101
i learned most of my vocabulary from ... the internet
Now that's a scary thought.

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Off Topic - Main
« Reply #68 on: 9 April 2009, 18:46:54 »
Quote
Quote from: archmage101
i learned most of my vocabulary from ... the internet
Now that's a scary thought.

well i just don't know what something means i look it up and find out...what's wrong with that?
« Last Edit: 9 April 2009, 19:00:33 by archmage101 »
Egypt Remastered!

Proof: Owner of glest@mail.com

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Off Topic - Main
« Reply #69 on: 16 April 2009, 02:16:39 »
You are right. Everything about computers that I know, I learned by my self, online.

I learned how to read, my ABCs, many words, pronounciation (mine still is bad, though), and more. I learned a lot of math from the internet as well. and browsing random wikipedia pages CAN be interesting (though too many pages have too much information). Some would classify me as a Nerd, since I have some of the highest marks in my class, and am the top in mathmatics, Social Studies, and Health.

However, I got nothing against school (except maybe Industrial Arts, I find it kinda dull) and I still stand by my answer that school is a great learning experience, and I admit, I am one of those people who says that I 'like' school. (NOTE: I don't mean that I would prefer it over sitting at home playing video games all day, but I do enjoy many aspects).

I live in the country, so school is where I see 99% of my friends (I actually am more of the city type, I guess...).

In other words:

I'm planning for something, but I need to know this: what is the best way to make the layout for a game? If the game starts at a main menu, and can change to some other menus (options, credits, etc) with a click of a button, and the main part of the game has a number of levels, each which start with a avi video, then proceed until an if statement is true (ie: a certain enemy is dead, or you are standing in a certain location).

Without going into the advanced parts of the code, what is the basic layout that would work?

Could something like this work??? (simple layout):
Code: [Select]
#include <headers>

using namespace x;

int main(){
   <display intro video (logos, etc;)>
   <load>
   <custom crosshair cursor>
   <display menu>
}
void functionForMainMenu(){
   <main menu code, simple background video>
   <images placed at specific locations with mouseovers>
   <upon button clicks, new functions are loaded>
   <close button with function Close(), simply done>
}
void functionForNewGameButton(){
   <new game screen code>
   <start level one after button is clicked>
}
void levelOne(){
   <load all media required for level>
   <video, set delay so game will not start until video is completed>
   <level one code>
   <when complete, move to level two>
}
void levelTwo(){
   <load all media required for level>
   <video, set delay so game will not start until video is completed>
   <level two code>
   <when complete, move to level three>
}

...

void lastLevel(){
   <load all media required for level>
   <video, set delay so game will not start until video is completed>
   <last level code code>
   <when complete, play ending video, then credits video>
   <return to main menu>
}

void functionForContinueGameButton(){
   <gets the info from all xmls in the saved games folder>
   <places information, and allow loading>
   <places you at the start of a level, as determined by a tag
   in the XML>
   <gives you the weapons(s) as determined by a number in the XML>
}

void functionForOptionsButton(){
   <code for forms which write to an xml (don't know how to properly place in an ini>
   <when clicked the complete button, return to menu>
}

/**
   My code will not take the undocumented path that Glest has. It will be documented to
   Doxygen standards, and the comments will probably end up to be the majority of the file
   size in the code!
*/
I've been working with JavaScript a LOT lately, so ignore any possible errors and terms. Would this work? If so, where would I put the AI code (code to make them move, face me, and attack. Take cover if any is in the area, etc;)? Would it be new function, or even in the main()? The loading of the units and stuff would be in the levels function, so should I repeat that throughtout each level or make it a new function and call it from each level?

If you must know, this uses Irrlicht 1.5, and is an open-source 3D FPS game. I just need the basic layout of how this should go. I DO plan on checking out other open-source FPS (I only know one though: nexius, and its too large to download for a while). Any resources concerning AI programming would be a great asset too! (these days, every link I try is broken... Thanks rapidshare [ugh])

Lastly, any tips for Irrlicht, this game, ideas, etc; are accepted (though I'm keeping most things in secret. It could easily take me years to do this. For all I know, it could take until I am of drinking age [legally at least ;) ]).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

doomgamer

  • Guest
Re: Off Topic - Main
« Reply #70 on: 17 April 2009, 13:27:48 »
God i hate vista
i hope windows 7 is better cause my mom has vista and half of the time i want to break her comp and sell it for srcap metal >:(

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Off Topic - Main
« Reply #71 on: 18 April 2009, 08:10:05 »
It can be quite good with knowledge.
Mine hasn't crashed for over two months (with vista's track record, that's pretty good).
I have like 100+ downloaded programs for various things, ~2000 songs, some videos, all on a laptop with no troubles. An avergish 2GB of DDR2 RAM, and 180 GB HDD. 800 MB graphics card gives me power to boot!

Say, while doing programming, I've noticed how Glest usually runs at a sluggish 14 FPS, while many Irilicht programs I've been working with have gone past the 400 FPS mark. With Real Time shadows, water effects, lights, models, animations, and a GUI, using D3D9, I can hit an average of 180 FPS. What's with glest that it's the odd one out?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

MadElf

  • Guest
Re: Off Topic - Main
« Reply #72 on: 18 April 2009, 08:10:36 »
I hate vista too, my comp was Vista but we bought XP and re-installed it.

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Off Topic - Main
« Reply #73 on: 18 April 2009, 14:20:20 »
yah i think that XP is the best one out so far

@omega:Mine hasn't crashed for over two months (with vista's track record, that's pretty good)
are you kidding!?! :o
first mine crashes just about everyday and my mom doesn't think she should do anything about it ::)
and secondly only 2 months, if i had a choice i would save all your file anyway that works and install kubuntu v8.10 over vista
cause mine has only had one complete crash and that was a long time ago(3-5 years)
i've had various other things but with linux you can always solve it
if things are getting sluggish and getting sticky and it keep getting stickier and more sluggish, than you can just hit ctrl+alt+esc and turn your mouse into a X
and if you click on something it's bye-bye no questions asked, and if it stays sludgy then just log out and back in and you'll be fine
Egypt Remastered!

Proof: Owner of glest@mail.com

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Off Topic - Main
« Reply #74 on: 18 April 2009, 17:17:43 »
Windows has the program advantage. Also, some MS programs do that verif check to make sure you have a legimate windows OS. Many games might not work on Linux, and WINE is not guarenteed to work. Windows is also the target for most software that modifies, and more. And I admit, I'm a sucker for the flashing lights and bells (eye candy) of windows Aero.

I am also pretty good at reducing my lag. While XP isn't bad, Vista does have some advantages. XP just happens to be more stable (but like I said, I haven't crashed for  a while). And why do you hit ctrl+alt+esc? I never have used that key code. Ever. If an app freezes, I give it a few seconds, then open task manager and shut down the process directly (just closing the app make lag). My biggest foe is IE, which crashes when trying to open some images (even with DEP [Data Execution Prevention] completely disabled). Then again, that IE, not vista.

Vista's biggest problem is too much security. If I could, I'd turn the entire security system off and let my custom antivirus and firewalls do their work. Another problem is DEP, which is a big cause of lag and crashes. Unfortunately, windows doesn't let you turn it off in any part of the UI. I googled until I found a command line function to permanently shut DEP down. For good. Best thing I ever did for Vista!
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

 

anything