PDA

View Full Version : Recording A Players Coords



stoodder
June 10th, 2006, 06:21 PM
Hey guys, currently im creating a game that(hopefully)(but quite possibly) will be a mmorpg. but i have run into a problem or more or less a dilema. see the thing is when i have a player walk around i want something to record his position at all times this way if the player shuts down his computer or osmehting then his position is still recorded. now ive had many ideas but i have no clue which is the best or if any of them are even correct. anyways heres a list of what i had in mind(if anyone else has any ideas they woul dbe more than welcome)


Run a php script in the background and constantly update a mysql database(unlikely)
Create a Text file for each user on registration, then record his coord's in it with PHP? flash?(Possible)
create an XML file and update the file for each user on a certain map's position W/ Flash? PHP?(for exampel the file would carry information on everyones position)(Possible)Anyways those are what i have and befor eyou go on i think you shoudl take a quick peek at what i have of my game as of right now to maybe make a judgement on this:

http://www.devilcoderz.com/~stoodder/ (http://www.devilcoderz.com/%7Estoodder/)

anyways if anyone has any ideas that woul dbe great cuz im fresh out right now

Joppe
June 10th, 2006, 06:32 PM
What backend are you thinking of using? (or are using) becouse some premade backends already have an command like that.
But if I step away from the mmorpg and just an normal rpg with that function.

You would basicly have to save, this could be done with just saving to an textfield when the user presses the logout button.. But then he cant just turn off the browser so you have to do it all the time. Maybe the player is in the center off the screen when the map isnt in the end. So my advice would be saving to text field or xml.. like map _y and _x and player _x and _y.. But this would need an player system.. And with many players you would need an database, so yes I think the one which is unlikely is the way to go with many users.