Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] Javascript Tile Map

Started by alexdee Jan 27, 2010 at 2:08 PM 4 replies 3.2k views
Original Post
alexdee
alexdee
Ok I am developing a browser base MMORPG using PHP/MySQL. It also include a little bit of AJAX. I would like to develop a MOD for the game that includes a 2d tile base mapping system that will allow players to explore around. I've been searching hours for a &#106avascript or ajax powered Map Mod. I would like something that doesn't contain too many files. But also not something so totally cheap looking. :) A map editor would be nice with it. If not I could figure a way to code more features into it. IDK. But if someone could send a resource or the script its self I would appreciate it. Thank you!
rscott4581
rscott4581
Would be nice if somebody would post something useful on this subject, I have been looking for weeks for something similar and yet all I keep coming back to is Tonypas Tile map tutorial which is useless as I already have the co-ordinate system in place, just need a map to sync up and would rather it not be a resource hog.
unknownhero
unknownhero
easy, assuming you're talking about &#106avascript/html<br/><br/>make a div that will hold all other divs and have it absolute positioned on the page. Lets call this the "Main" div.<br/><br/>add in several dozens divs containing images into the main div. Congrats you now have a 2d tile map.<br/><br/>make a player div and have it positioned in the middle of the screen. This div does not move.<br/><br/>add js code that makes the main div move left/right/top/bottom. Congrats you now have a fully explorable map.<br/><br/>Its simple but the real challenge is making it fast.
rscott4581
rscott4581
Fast isn't really the issue at all, I am wanting a true Tile by Tile map which when the player moves, the screen basically reverses 100px since that is each tiles size, or possibly 50px, but it's more about just seeing the other players on the map as well when they are in the view window, and the towns at their locations etc. These are the things I am having issues with, every tutorial I look at has a system to move the map or move the character when all I need is a half implementation of a 2D map since the 1/2 that controls the players coordinates and the keyup already exists in the PHP I am using..
unknownhero
unknownhero
Sounds like you have more issues with coding than actually get something to work. I'm assuming you're trying to do it the php way? If so I recommend looking at the source for this php game

http://dragon.se7enet.com/dev.php

Its a little confusing but its a fully working php game last time I tried it. I learned quite a bit from it at least.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.