Publishing System Settings Logout Login Register
Browsergames: Creating a basic Isometric Map
TutorialCommentsThe AuthorReport Tutorial
Tutorial Avatar
Rating
Add to Favorites
Posted on June 8th, 2010
4104 views
JavaScript

2. Features

  • Easy styleable
  • Easy to enhance
  • Automatic focus on specific coordinates
  • Basic object support
  • Spritesheets
  • As many different tiles as you want
  • Fits into every div
  • jQuery Plugin
  • Dynamic TileSizes
  • Create as many isometric maps as you want

3. Infos

I used the following free spritesheet by http://www.opengameart.org

tiles

On the html side you only need an unique element with a fixed width and height. And of course you need to include the javascript files and initiate the plugin. But I think this is self-explaining.

Show Demo

The plugin we will write will be called like this: $(element).gameMap({OPTIONS}); For example like this:

var mapdata = new Array();
mapdata[0] = new Array();
mapdata[0][0] = {'tile':'grass_1','object':''};
mapdata[0][1] = {'tile':'grass_2','object':''};
mapdata[0][2] = {'tile':'grass_1','object':''};

$('div#map').gameMap({map:mapdata,xpos:24,ypos:38,tilesize:128});

The map data needs to be a multidimensional array / object like this:

map[y][x]['tile'] and map[y][x]['object']

Next Page
Pages: 1 2 3 4 5
Dig this tutorial?
Thank the author by sending him a few P2L credits!

Send
Balor

I'm a freelancing webcoder from germany next to Frankfurt. I'm developing web application solutions for mid-sized companies. I'm a coder with minor art skills.
View Full Profile Add as Friend Send PM
Pixel2Life Home Advanced Search Search Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Pixel2life Homepage Submit a Tutorial Publish a Tutorial Join our Forums P2L Marketplace Advertise on P2L P2L Website Hosting Help and FAQ Topsites Link Exchange P2L RSS Feeds P2L Sitemap Contact Us Privacy Statement Legal P2L Facebook Fanpage Follow us on Twitter P2L Studios Portal P2L Website Hosting Back to Top