Map for broser game uisng php/ Jquery

Place to place any code snippets, completed games, or even uncompleted games for IR users to use.
Post Reply
leruman
Posts: 29
Joined: Fri May 25, 2012 6:06 pm

Map for broser game uisng php/ Jquery

Post 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
Last edited by leruman on Mon Apr 08, 2013 10:36 am, edited 2 times in total.
User avatar
Sharlenwar
Posts: 523
Joined: Mon May 28, 2012 7:14 pm

Re: Map for broser game uisng php/ Jquery

Post 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
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
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Map for broser game uisng php/ Jquery

Post by Jackolantern »

Very nice! :D
The indelible lord of tl;dr
qckstil
Posts: 1
Joined: Sat Sep 22, 2012 9:05 pm

Re: Map for broser game uisng php/ Jquery

Post by qckstil »

can somebody reupload it?
leruman
Posts: 29
Joined: Fri May 25, 2012 6:06 pm

Re: Map for broser game uisng php/ Jquery

Post by leruman »

File reuploaded, i hope that now everything is working ok now
User avatar
direwing
Posts: 4
Joined: Sat Dec 29, 2012 9:40 am

Re: Map for broser game uisng php/ Jquery

Post by direwing »

When I download and try to open, it gives an error and doesn't work. Anyone have another copy of this? Thanks :)
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Map for broser game uisng php/ Jquery

Post 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:
The indelible lord of tl;dr
Post Reply

Return to “Code Sharing”