I was stuck at work today with nothing to do and I forgot to upload the latest source of my space shooting game to my webserver so I couldn't really work on it without worrying about merging changes (yes, yes, should use GIT, yada yada), so instead I started something new! I've seen a few people show off isometric maps and having never tried it before, I wanted to see how difficult it would be. As it turns out, not too hard at all! I've included a barebone isometric map display with camera panning for others who are interested to look at.
Controls
Click and drag mouse to move camera
Alternatively, press shift +arrow keys to pan camera
Pan, as in rotating? Are you doing this with image modification, or with scaling? I made a stupid fail. Panning is not what I was hoping for.
Edit: I just downloaded it. Please fix your nasty case of PO2 Syndrome. Thanks.
Last edited by zac352 on Sat Oct 16, 2010 12:15 am, edited 2 times in total.
Seems dragging with the mouse moves the wrong way. At least based on how dragging works in this day and age. I would say dragging would move the map with your mouse keeping the point you start on under the cursor the whole time.
Also, you need, and should, FLOOR all the image X and Y positions to avoid blurring. Simply wrap the X and Y inside math.floor() for each image call.
Jasoco wrote:Seems dragging with the mouse moves the wrong way. At least based on how dragging works in this day and age. I would say dragging would move the map with your mouse keeping the point you start on under the cursor the whole time.
Yeah, it seemed backwards to me too. The only time in RTS when it drags this way is with right click or with screen-edge scrolling.
Jasoco wrote:Exactly. The other way doesn't work well at all for mouse. Especially since people will be used to dragging things around.
When you press the mouse down, record the X and Y.
Then move the camera (As long as the button is pressed) to the mouse's X and Y minus the original recorded X and Y. (I believe)
I don't like draggy scrolling because it makes your wrist sore from clicking and dragging constantly. I like clicking, then moving the mouse creating a velocity line. I do it for all of my camera movements.
I see what you guys are saying about the scrolling. I think it may be a preference thing but I would agree that the default behavior should be making the terrain draggable. Feel free to re-download the .love file as I updated the camera as well as demonstrated multi-z-levels. I'm not going to post for awhile however until I have something real awesome to show. Thank you guys for checking it out.
ninwa wrote:I see what you guys are saying about the scrolling. I think it may be a preference thing but I would agree that the default behavior should be making the terrain draggable. Feel free to re-download the .love file as I updated the camera as well as demonstrated multi-z-levels. I'm not going to post for awhile however until I have something real awesome to show. Thank you guys for checking it out.
-Nin
Uh. Are you ever going to fix the images making giant white boxes?
ninwa wrote:I see what you guys are saying about the scrolling. I think it may be a preference thing but I would agree that the default behavior should be making the terrain draggable. Feel free to re-download the .love file as I updated the camera as well as demonstrated multi-z-levels. I'm not going to post for awhile however until I have something real awesome to show. Thank you guys for checking it out.
-Nin
Uh. Are you ever going to fix the images making giant white boxes?
I've padded the cube image so this should no longer happen. Let me know if it works!