Page 1 of 2
PHP/Java Question
Posted: Sat Aug 12, 2006 4:21 pm
by CrazyPHPMan
Hello people of the forum,
I been messing with php for a while and came accross alot of stuff to do. Now i desided to try and get into making a game but only thing is i want it to be php/java setup now for php it will be login, and chat and getting the User's Stats now for the java it will be a text/button based it will be so users can fight one another now thats the part that i dont get.. i dont know if im on the right thread for this or not but i need help on making a java based text/button game that will be interlinked with php so that when a user wins a fight it will show..
You recieved 200 exp and 50 gold.
now if someone can help me with this please leave a post please
Thank you
CrazyPHPMan
Posted: Sat Aug 12, 2006 4:36 pm
by Luke
why not just use php for the whole project? I don't see where java is necessary.
Posted: Sat Aug 12, 2006 4:51 pm
by CrazyPHPMan
Well for one there would be 15 second lag in php for the fight part. for 2 it will be live fighting not no lag if i use java and 3 im not sure on how to do php text/button based gaming all i know in php is to do websites and stuff like that :S i know pathatic right :S.
Thank you
CrazyPHPMan
Posted: Sat Aug 12, 2006 5:04 pm
by ityd
I don't understand why there would be lag could you explain that more. And php is pretty robust so it should be able to manage.
Posted: Sat Aug 12, 2006 8:49 pm
by CrazyPHPMan
Well see php only way you can make refresh page is if you put a html tag in there to refresh it or a javascript one or whatever in java they got one in there that auto refreshes every second and doesnt show that it refreshes like the html and the javascript ones do..
Posted: Sat Aug 12, 2006 9:04 pm
by Weirdan

... ajax ...
Posted: Sat Aug 12, 2006 9:23 pm
by CrazyPHPMan
never really hear or figured out how to work with ajax
Posted: Sat Aug 12, 2006 11:30 pm
by ityd
php refreshes and you can add a delay just use header:
Code: Select all
header( 'refresh: 5; url=http://yoursite.com' );
This refreshes to yoursite.com with 5 second delay.
Posted: Sat Aug 12, 2006 11:37 pm
by feyd
The refresh header is not supported on many web servers. The meta tag version works in most browsers however.
Posted: Sun Aug 13, 2006 12:00 am
by CrazyPHPMan
thats the reason why i want the fight part in java so it can have its own refresh script i would like to do the whole thing in java but never can find a tutorial that will help me learn how to build a java chat room :S unless one of you all know one good tutorial.. then all i would need is some help on making the fight script..
Posted: Sun Aug 13, 2006 12:09 am
by ityd
feyd wrote:The refresh header is not supported on many web servers. The meta tag version works in most browsers however.
why is that?
Posted: Sun Aug 13, 2006 12:15 am
by feyd
ityd wrote:why is that?
Non-standard response header.
Posted: Sun Aug 13, 2006 1:01 am
by christian_phpbeginner
CrazyPHPMan wrote:thats the reason why i want the fight part in java so it can have its own refresh script i would like to do the whole thing in java but never can find a tutorial that will help me learn how to build a java chat room :S unless one of you all know one good tutorial.. then all i would need is some help on making the fight script..
You can find a simple example of Java Chat System in Java programming books. A reference I've once used: Java 5, The Complete Reference. I am not saying that you have to buy the book, you could go to the library.
If I may suggest you, if you're going to create a game in a website, use Flash instead. Java takes more time to load rather than Flash Applications. PHP and Flash are somehow easier to connect.
Posted: Sun Aug 13, 2006 2:57 am
by CrazyPHPMan
Well i dont like using flash because for one alot of users are dial up users and flash it tends to get really laggy becuase of the the dial up speed and why would you use flash to make a small game thats only going to be used in one little spot where users fight each other? and anyways java really doesnt take that long to load and also it doesnt get laggy much as flash does when users are using dial up.. now i played alot of java games and a lot of flash and in my opinion flash sucks for games..
Posted: Sun Aug 13, 2006 3:24 am
by christian_phpbeginner
CrazyPHPMan wrote:Well i dont like using flash because for one alot of users are dial up users and flash it tends to get really laggy becuase of the the dial up speed and why would you use flash to make a small game thats only going to be used in one little spot where users fight each other? and anyways java really doesnt take that long to load and also it doesnt get laggy much as flash does when users are using dial up.. now i played alot of java games and a lot of flash and in my opinion flash sucks for games..
Fine, then, use Java....
games in yahoo! use Applet, but it takes long to load. In my opinion, dial up sucks.