Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Need PHP Gaming Help
Index -> Programming, PHP -> PHP Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Archi




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
Blade




PostPosted: 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
Archi




PostPosted: 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.
Blade




PostPosted: Thu Sep 04, 2003 3:25 pm   Post subject: (No subject)

is it text based?
Archi




PostPosted: 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.
Tony




PostPosted: 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Blade




PostPosted: Thu Sep 04, 2003 3:39 pm   Post subject: (No subject)

.... dude.... it might be alright text based, but everytime you do something you'll have to refreash the page....
Tony




PostPosted: Thu Sep 04, 2003 4:00 pm   Post subject: (No subject)

yeah, the source code alone behind this page is 50+ Kb... and thats just the text, doesnt include any of the graphics or styles.

Now say you gonna be refreshing the page once a second. After 10 minutes of playing:

10*60*50 = 30,000 Kb ~= 30Mb of bandwidth used up in 10 min.

Now if you gonna add some graphics on top of that, the bandwidth useup will increase exponensionally. Surprised
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
Amailer




PostPosted: Thu Sep 04, 2003 4:03 pm   Post subject: (No subject)

Don't think of making games in PHP, worst thing ever :S!
octopi




PostPosted: 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....
Archi




PostPosted: 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.
octopi




PostPosted: Thu Sep 04, 2003 4:59 pm   Post subject: (No subject)

Yup,
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.
Blade




PostPosted: 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 Razz...

good luck dude..
Homer_simpson




PostPosted: 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
Amailer




PostPosted: 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)
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 17 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: