Posted: Thu Sep 04, 2003 2:16 pm Post subject: Need PHP Gaming Help
I am curious if anyone here would like to help me take a game which I am currently creating in Turing and make it into an online game in PHP??? Or even if some of you could assist me and help me figure out where to start.
Posted: Thu Sep 04, 2003 2:42 pm Post subject: (No subject)
you do know that making games in php isnt a very good idea, because you would be refreashing like less than every second....
would be better to do it in java, and use an applet for onlineness
Posted: Thu Sep 04, 2003 2:50 pm Post subject: (No subject)
How so? My game is an RPG where you explore, so you may be right...But, well I'd rather make it in PHP than anythnig else.
Posted: Thu Sep 04, 2003 3:25 pm Post subject: (No subject)
is it text based?
Posted: Thu Sep 04, 2003 3:29 pm Post subject: (No subject)
At the moment it is. But when I change it to PHP (whenever that may be) I plan to include various graphics as well. Right now it is mainly ASCII though and not much else.
Posted: Thu Sep 04, 2003 3:38 pm Post subject: (No subject)
well if its ASCII based, it could be done in PHP...
though if you plan on generating graphics, your bandwidth useage could quickly add up... You'd have to watch out for that
Posted: Thu Sep 04, 2003 4:03 pm Post subject: (No subject)
Don't think of making games in PHP, worst thing ever :S!
Posted: Thu Sep 04, 2003 4:41 pm Post subject: (No subject)
You guys should quite bashing peoples ideas....
Infact I have created multiple projects using php, and a web browser.
Although everything I did was all done in one machine. (Local server running)
My final project for computers was going to be a game made in php, perl, using internet explorer, and a custom webserver written in perl. Graphics were made on the fly...with a program called fly. You could use GD though(which would work alot better). My teacher wasn't the type that liked you expanding your horizon's and trying different things...so I canned that idea. But I did make a succesful demo.
If you intend this game to be a local program. (php, webserver, mysql, gd, perl all bundled with the game) then this is doable. If you intend to do it like you said...then its tricky....but also doable.
You might want to consider this...
Make users register to play your game, when they register they have to download a small program that will extract files into a directory of there choosing, then the program will connect back to your server, and report the username, and the directory where the files are stored.
Now when the user goes to play...you make all the images local to the user...by using a local path. That way images load instantly, and eats very little bandwidth.
Header files, Footer files can be used, and stored on the clients computer too..but thats alot more tricky. And would require a client side program to assemble the header, with the server provided data, and the footer.
If your worried about bandwidth, you could even store common phrases in a database, and reference them with a code. This method would require something similar to what is needed for the header, footer thing.
Good luck, and no, I can't/won't help you directly. (write a lot of code)
If you need any advice...or if your having any difficulty doing a certain thing, feel free to post here, and I will give you an anwser though.
Blade, I think your missing the idea....its a RPG...it doesn't really need much refreshing...mostly its based on a click....
Posted: Thu Sep 04, 2003 4:53 pm Post subject: (No subject)
Well, the only thnig that would necessarily need to be refreshed is the exploration area which is the bulk of the game. But that would only refresh with every players click. And the graphics of the game would be those of say the weapons, armor, and the terrain in the exploring area.
Posted: Thu Sep 04, 2003 4:59 pm Post subject: (No subject)
So basically when you want the character to move...then he would click and the a new page would load.
This would save a lot of bandwidth, As well as using a method like I described before. Making the user download a small zip file, or exe file that extracts files on his computer where he wants them... then that path is sent to the server, and saved in a db, with his username.
when he plays you would use the path from the db, so images would load off the local computer. When nessecary you could have images load off of your server too.
Posted: Thu Sep 04, 2003 5:02 pm Post subject: (No subject)
well i guess if you do what octopi says it would work.... although i wouldnt want to do it ...
good luck dude..
Posted: Thu Sep 04, 2003 10:47 pm Post subject: (No subject)
well actually php is a great program to write online games in... sure u can't have realtime interacting animation... but i've seen many cool games online that have things that u can never have in turing or whatever.... u can have player signup at the game... they login you load their info from data base and everything... i think that's how D&D is made
Posted: Fri Sep 05, 2003 7:46 am Post subject: (No subject)
Only game iv seen in php is...err
Hangman (kinda cool 2)
But, you could use php for another games db (storing usernames/password and etc in a db)