Help With a Click Based Map System?

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
User avatar
DoctorMadcow
Posts: 6
Joined: Wed Mar 13, 2013 4:43 am

Help With a Click Based Map System?

Post by DoctorMadcow »

Hey everyone,
I've been working off of Hall's browser MMO tutorials, and I'm shifting it into something that's pretty close to 'Kingdom of Loathing'. The only problem I have is with the map/location system. A lot of people have a grid or tile based map system, based on x-y coordinates, but that's not really what I'm going for. I'm looking for a way to have a starting map, and you can click on the locations, and it will bring you to a new image, where you can click on locations further, and so on. I'm kind of at a loss for how to get started here. Any suggestions on what my database table should look like, or any thoughts on the code involved would be extremely helpful. Thanks in advance.
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Help With a Click Based Map System?

Post by hallsofvallhalla »

There are several ways of doing this. If you just want a simple grid based system that you click the move then look at Forsaken Sanctum 1.0 source.

You just make a grid of divs then make each div clickable.
User avatar
DoctorMadcow
Posts: 6
Joined: Wed Mar 13, 2013 4:43 am

Re: Help With a Click Based Map System?

Post by DoctorMadcow »

Ah, never saw that one. Yeah, that looks perfect. I'll let you know if I have any questions once I start digging into it. Thanks.
User avatar
DoctorMadcow
Posts: 6
Joined: Wed Mar 13, 2013 4:43 am

Re: Help With a Click Based Map System?

Post by DoctorMadcow »

Oroton, I had stumbled across your game before while scanning the forum for helpful info on map/location changing. I really liked the way you displayed each territory and your click based system was pretty simple to understand, which I found helpful. The only difference I intend to implement is the freedom from cardinal directions. instead of an x-y style grid or coordinate system, I plan on just giving each individual location a variable, and display maps similar to the way you did. Except instead of clicking "North to" or "West to" on the side panel, i'm going to try to make the map itself clickable. So depending on what part of the location image you click on, it will take you to a new location image, where you will then be able to click on more images, and go to more locations and so on. For example, a location image might display a lake, a castle, and a forest. Depending on which one you click on, it brings you to that location. Let's say you click on the forest, then it will bring you to a forest image with different sections of that forest you can visit.

So essentially, it's not too different from the system that you've implemented, just a different way of looking at it. Hopefully I can figure it out without too much frustration. I'll let you know how it turns out, thanks again for all the help.
User avatar
DoctorMadcow
Posts: 6
Joined: Wed Mar 13, 2013 4:43 am

Re: Help With a Click Based Map System?

Post by DoctorMadcow »

Also, loved the Zelda theme, of course.
User avatar
DoctorMadcow
Posts: 6
Joined: Wed Mar 13, 2013 4:43 am

Re: Help With a Click Based Map System?

Post by DoctorMadcow »

Ah, yes. Time is the ultimate enemy...
Post Reply

Return to “Beginner Help and Support”