Page 1 of 1
					
				roguelike using php?
				Posted: Sun Sep 05, 2010 2:41 am
				by Age of Fable
				I found a reference on roguebasin to roguelikes made using php.
I know a bit of php (used it for the game in my sig), but I have no idea how you'd do this (other than having the screen reload each time anything moved or changed).
Can anyone help me?
			 
			
					
				Re: roguelike using php?
				Posted: Sun Sep 05, 2010 3:02 am
				by Jackolantern
				Keep in mind that since roguelikes use ASCII characters to represent the map, provided you do not use a web page design that is heavy in graphics, your reloads would be very fast since there would only be a (relatively) small amount of text being transmitted. If you absolutely want to go no-reloads, you could look into using AJAX techniques to transmit the map, since, again, all you are needing to transmit is ASCII characters.
			 
			
					
				Re: roguelike using php?
				Posted: Sun Sep 05, 2010 4:55 am
				by Callan S.
				It depends if there's PVP or not. If not, you don't really need to keep an eye on every other character's every movement.
I've been thinking about 
unreal world and some sort of php game...
 
			
					
				Re: roguelike using php?
				Posted: Sun Sep 05, 2010 5:02 am
				by Jackolantern
				Ahhh, yeah. Forgot that roguelikes typically display the other players, too. That would actually be pretty neat to have a roguelike map generator PHP script for use in AJAX calls.
			 
			
					
				Re: roguelike using php?
				Posted: Sun Sep 05, 2010 12:22 pm
				by Age of Fable
				Do you know of an introductory page about using Ajax?
			 
			
					
				Re: roguelike using php?
				Posted: Sun Sep 05, 2010 5:39 pm
				by hallsofvallhalla
				i built this, a quick demo. All the players are players who logged in, but I have not made the characters remove once logged out,  if they move if will update. When you lumber it hits a database and in realtime and updates without refresh. 
This is basically a sound start for a good game. 
http://indie-resource.com/projectbattle/login.php
it updates using ajax, i i will release source today or tomorrow with some videos.;
 
			
					
				Re: roguelike using php?
				Posted: Tue Sep 07, 2010 12:20 pm
				by Age of Fable
				Does 
this site work in a similar way?
 
			
					
				Re: roguelike using php?
				Posted: Tue Sep 07, 2010 1:24 pm
				by hallsofvallhalla
				hmm i cant tell where they are getting the scenes, if it is PHP before hand or if they are using ajax.
			 
			
					
				Re: roguelike using php?
				Posted: Tue Sep 07, 2010 2:39 pm
				by Jackolantern
				Age of Fable wrote:Does 
this site work in a similar way?
 
Nope, that site is just using regular Javascript techniques (non-AJAX) to show and hide page elements. If you look at the page source, you will see a 
huge pile of ASCII characters. It is sending all of the characters ahead of time, and then using JS to animate them. That could possibly work as well for your game, and then you just use AJAX to tell where other players are, tell the server what the player is doing, get updates, etc. That way, if the player edited the ASCII in the JS on their end, they would just be giving themselves a disadvantage since they would no longer be able to see the "real" state coming from the server.
 
			
					
				Re: roguelike using php?
				Posted: Tue Sep 07, 2010 3:04 pm
				by hallsofvallhalla
				ah i didnt see the ASCII characters, was wondering where they were pulling them from.