Walk around an empty map!
So I thought I'd try my hand at making an online game, using the browser-based grid-mapped system popularised by Urban Dead. I've only been working on it since yesterday so there's not much to it at the moment, but I've managed to create a map (with tiles named using a (fairly shitty) random language generator I cooked up) and let you walk around on it by clicking buttons.
You can try it here if you want to, but be warned that this is being hosted on my home computer and will only be accessible when it's on and booted into Linux. I also don't intend to leave my port 80 open indefinitely so it'll probably become inaccessible in a few days.
You can try it here if you want to, but be warned that this is being hosted on my home computer and will only be accessible when it's on and booted into Linux. I also don't intend to leave my port 80 open indefinitely so it'll probably become inaccessible in a few days.
Comments
Post more when you make more progress, I could always use a quick game to pass moments of free time at work.
The final game will most likely not use random gibberish for its tile names, although there are a few other aspects of the game where a random name generator will come in handy. I'm still looking for a decent one that I can easily integrate into my PHP scripts.
Right now I've got a character standing at 49,46 and a test user at 50,44.
This'll probably be the last of my rapid-fire updates. Now that I've got the basics of the engine working I've got to properly hash out the mechanics for the actual game.
First of all, the URL for this game has changed. It's now located at http://jwadden.homelinux.net/obgame. I've edited my opening post with the new link and the old URL will no longer work. I did this because when I was working on the game during the last test session I kept accidentally making changes to the live version instead of my own version. Hopefully this will mitigate that problem somewhat.
As for changes in this version, the first thing you'll probably notice is the map: It's a bit more colourful now due to the fact that there are different types of tiles which are assigned different colours. They're pretty much all the same right now except for one special tile which you'll have to find.
Also, when you use the "Talk" command the things you say can now be heard by everyone visible on the map, rather than just people on your tile. The "Talk" command will also only appear when there's someone nearby to talk to.
There are several other changes implemented in this version as well, but I'll leave it up to you to discover what they are. Hint: The aforementioned special tile is the key to everything, and it's in a well-known location.
EDIT: Also, this version of the game uses a new database, so you'll have to re-create your characters. The process is the same as before.
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1"
I tried re-logging in and a new web browser, but its still not working for me.
EDIT: I think I found the problem. I wasn't checking to make sure that a movement destination was a valid location when I processed the input. I did when I showed the movement options, but if you hit a movement button multiple times before the page can load it can still send you over the edge of the map. Anyway, I've fixed that problem now, although I think I might have to change the way movement input is handled to prevent cheating when the "real" game is up.
Edit: I see you have placed me on space 50,50, when I try to move I get
"Fatal error: Call to undefined function isValidLocation() in /home/diguana/Websites/html/obgame/map.php on line 111"
But I am able to reload the map and I am still at 50,50 and unable to move with out getting that message
Edit2: This is no longer a problem and I can now move, when I reloaded it I was still logged in, and when I tried to move I would get that error. So I logged out and back in and it seams to be working
Still able to double click jump out of the map, but I found out that I can go back a page and use the directions there to jump back into the map. So lets say I'm 1 tile north of the border, I double click the south direction, I get the off map error, but then I can go back a page and it will show my 1 north of the border tile position, from there I can click north and end up in the map on the border tile.
Edit: I can also go back a page and click the south button again to keep going farther off them map, and I can still go back a page and go up north, it just takes more moves to get out, So basically I can walk off the map and keep going.
Edit2: It seams this only works on the south border, but not the north, east, or west borders
EDIT: Regarding the "special tile", if you re-read some of the earlier posts in this thread you should get a vital hint.
Edit: Not sure if you fixed the typo but I'm still able to jump off map and back into map
Edit2: Seams you fixed it, I can no longer jump off the map on the south border
EDIT: Gah! Fixed the wrong letter. Now it should work.
Besides that, every place seemed boring and depressing as I marvel at the vast expanse of nothingness that lies before me. I'm certain I've seen less memorable sights than these, but I can't recall what they were. Really, the only remarkable thing about each place is its unremarkability. There's not much there.
Edit: Other tiles I like:
44, 47 Ow Mecic
88, 52 Neat Ew
The only difference you might notice on your end is that if you click a tile twice before the page gets a chance to reload you'll still only move one space, but still let me know if you encounter any weird behaviour.
EDIT: Also changed some of the CSS around so that inventory items are listed beside each other instead of having one on each line. This should make things a bit more convenient when you've got lots of items.
Basically, I'm separating the program into two parts. Firstly there's going to be a front-end component written in PHP that will handle the output of the map and interface. It will communicate via XML packets with another app (written in Python, since I want to learn Python) that will handle the processing of user actions and basically do all the heavy lifting for maintaining the game state.
Splitting this off into two pieces means that once the basic game is done I'll be able to relatively easily create other front-ends (such as an AJAX-based interface or an Android app) that will be able to communicate with the same back-end. It also means that the part of the program that does the heavy lifting doesn't have to be a web app, which should make things a lot easier since it can run persistently and keep the game data in memory instead of being a bunch of stateless scripts that need to go to the database every time something happens.
The new version of the game isn't in a state where I can really demonstrate anything yet, but I just managed to get the front end to grab the (currently static) XML from the back-end and draw a map based on it, so I'm starting to make some progress at last.
Unfortunately, since I'm working full-time these days I don't have as many chances to work on this project as I'd like, but hopefully I'll have something playable again in the not-too-distant future.