Greeting to all.
This i one piece of code that i have finished these days. It is map for browser based game, bit different than maps that are used in halls tutorials. it is nothing special, but someone could find something usefully there.
Map is loaded from Tiled file format, with CSV type of data. Data about tiles is not loaded from big file , it loads tiles from individual files. It can be for sure modified to be used with similar Tile map formats from other programs. Only modification is that i have removed end of lines in layer where tile codes are kept, because it have made problems with generating of map.
Code reads one big map,but show only defined window. Using cursor key on keyboard you move player over the scree. When player crosses edge whole screen moves in that direction.
I have not shown code in post, instead i have included whole code and tiles as attachment. Just unpack in web server directory and start map_example.php. Code is independent from database but can be easily connected to.
There are lot of area for improvement, if I do something major i will post it. Also if someone can make it cleaner code, universal or better, can post it here for all users.
Edit: Was long absent from forum, uploaded again code.
Map for broser game uisng php/ Jquery
Map for broser game uisng php/ Jquery
Last edited by leruman on Mon Apr 08, 2013 10:36 am, edited 2 times in total.
- Sharlenwar
- Posts: 523
- Joined: Mon May 28, 2012 7:14 pm
Re: Map for broser game uisng php/ Jquery
Awesome, I'll have a look at this for the project I'm working on. Thanks for the perfect timing of your post. 
Deep within the Void of Quasion, a creation.
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Map for broser game uisng php/ Jquery
can somebody reupload it?
Re: Map for broser game uisng php/ Jquery
File reuploaded, i hope that now everything is working ok now
Re: Map for broser game uisng php/ Jquery
When I download and try to open, it gives an error and doesn't work. Anyone have another copy of this? Thanks 
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Map for broser game uisng php/ Jquery
Sorry, but I have not seen Leruman in quite a while 
However, have you seen my big list of PHP/JS MMORPG engines? There are a ton there, both free and commercial (mostly free), so you can try those out and see if any one works for you
Btw, you should make an Introductions forum section post introducing yourself! While it isn't required, it will help people here get to know you
However, have you seen my big list of PHP/JS MMORPG engines? There are a ton there, both free and commercial (mostly free), so you can try those out and see if any one works for you
Btw, you should make an Introductions forum section post introducing yourself! While it isn't required, it will help people here get to know you
The indelible lord of tl;dr