Jump to content

Map thingy..


reportingsjr
 Share

Recommended Posts

Okay, im making a game ATM. I was wondering if the was a way to have a map, and have a div around it set to like 100X100 px.. and the overflow was hidden.but when they are a dot in the center of it.Is there a way so when they move the map moves and there dot stays in center. Or should I use a different type of coding? Thanks! ~reportingsjr~Ill check later, helping sister move..

Link to comment
Share on other sites

Z-index? I have some code.. enough to login and register =] probably setting up the page where you see stuff after login today, now.Could you help me out with some coding here? Like how would I move the map around below it.. Lol, now that I think of it I have no use for it really but will be helpful hopefully.

Link to comment
Share on other sites

Z-index? I have some code.. enough to login and register =] probably setting up the page where you see stuff after login today, now.Could you help me out with some coding here? Like how would I move the map around below it.. Lol, now that I think of it I have no use for it really but will be helpful hopefully.

Z-index alow you to stack elements on top of each other, like layers you know?Well i did try a couple of things last night that i thought would work but came up against a brick wall. Since it's not urgent i will put it on my to do list, i have another idea that i think will work.
Link to comment
Share on other sites

You say the map will be 100x100, will the map actually be larger, and when they move, more will get "loaded" in?You could use the google map method of pick up and place, so the browser doesn't get overloaded with images if so, otherwise, if the map's just going to go off screen and just be 100x100, you don't need AJAX at all :)

Link to comment
Share on other sites

No, the map will be like 500X500 or larger, but The div will be like 50X50 or 100X100. :)It would only be one image and I want it to be moved to say:x:450, y:100 or other places.. but slowly kind of.

Link to comment
Share on other sites

Hey i'm back :) Finally managed to get this working :blink:http://scott100.atspace.com/Final.html **UPGRADED - See post #15 :) Hover over the arrows to navigate around the pic.It works by clipping off one side and showing more of the opposite then repositioning itself.Has to been one of my best yet :)

Link to comment
Share on other sites

wow, thats amazing! Would you mind telling me how you did it? And can you make it stop at the edge of the picture?(you would set the height and width). And can you make it so when you click the button once it goes one 'space' (like 10 pixels or so?). Your awesome scott!!

Link to comment
Share on other sites

Why thank you :) It works like i said above, depeding on what button you press it calls functions that clip/show the image then reposition it. I tried various other ways but this was the only one that could do everthing needed.Yeah i knew you would ask that about stoping at the edge, i will look into it :) Yes you can make it so that it moves when the user clicks, i had it that way originaly but tarted it up :)(got me thinking, this could make a wicked snipper game, hmmm do i have the time...)

Link to comment
Share on other sites

yes you could make a freaking awesome sniper game with that! Im going to start on the coding for the game actually now. :) Before I had it all set up but the playing part, and I was getting ideas for it. Time to start :):) . Just kind of ignore my PM, I sent it right after you posted I think. Tahnks for the help! Could you code it so it goes like 10 pixels each click instead? thats the way I need it..Yea.. im not really sure on much any of it lol. like the clip thing? I dont know javascript, just read over the tut. a few times. Im probably going to go learn it soon(once schools out in 7 days!!).

Edited by reportingsjr
Link to comment
Share on other sites

wow, I think I can figure out how to set it to my stuff but wow.. thats awesome! (go make that sniper game now!). Ill show you (only you) how t turns out in my game.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...