Page 1 of 1

Map for broser game uisng php/ Jquery

Posted: Fri Aug 17, 2012 1:09 pm
by leruman
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_example.rar

Re: Map for broser game uisng php/ Jquery

Posted: Fri Aug 17, 2012 3:05 pm
by Sharlenwar
Awesome, I'll have a look at this for the project I'm working on. Thanks for the perfect timing of your post. :D

Re: Map for broser game uisng php/ Jquery

Posted: Fri Aug 17, 2012 5:41 pm
by Jackolantern
Very nice! :D

Re: Map for broser game uisng php/ Jquery

Posted: Sat Sep 22, 2012 10:04 pm
by qckstil
can somebody reupload it?

Re: Map for broser game uisng php/ Jquery

Posted: Sun Sep 23, 2012 4:04 am
by leruman
File reuploaded, i hope that now everything is working ok now

Re: Map for broser game uisng php/ Jquery

Posted: Sun Dec 30, 2012 3:05 am
by direwing
When I download and try to open, it gives an error and doesn't work. Anyone have another copy of this? Thanks :)

Re: Map for broser game uisng php/ Jquery

Posted: Sun Dec 30, 2012 5:12 am
by Jackolantern
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 :cool: