Isometric screen tiles

Previous topic - Next topic

MrPlow

Hi Guys,

I am testing out an isometric layout...but I need get some tips on laying down the tiles....

Do I stagger them odd, even etc
Or is there a neat way of laying down the tiles...
My cubes / tiles are 30 x 30 in size.

I have the movement done but everything looks a little off kilter... :noggin:

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Ian Price

Yeah, odd/even staggering works. You have to add/take 1/2 the height and width of the tiles to the next row down IIRC.
I came. I saw. I played.

MrPlow

Thanks...

I think I am nearly there...

Another issue is my WASD movement code is out of alignment to my cubes.

???!
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Darmakwolf

Sounds like a tough task! I have to say though, isn't there a way of bringing them together so that there are no gaps? I'd imagine the surface is supposed to look flat...

MrPlow

Got the gaps sorted now and the WASD movement I changed the factor from x3 to x1.87

GOD knows why that works...

:whistle:
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Darmakwolf

I've encountered that situation so many times... throwing numbers at it and random algorithms that may or may not work, and for "god knows why" reasons it works flawlessly and even I don't understand it.  :D

MrPlow

My latest problem is not so bizarre...

I have a character moving about on my isometric level 0... I have a section higher than the ground level and trying to get the char to work prop with collision detection there.

I am using boxcoll as sprcoll is retrictive and I need the sprites to cosy up to the sides of the staggered isometric sections...

Any my bottom section is working but the section behind it is stopping my collision early...

           -------------------
            -            c         -
              -            www   -
                -           www    -
                  --------------------

so behind the wall the char stops early but in front it works like a charm...

I also needed to draw the char in order of appearence so that the depth of field is maintained....

Anyone know what might the best fix for this....?
 



Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

fuzzy70

The way I done it in the past was to avoid any inbuilt sprite collision checks as they tended to fail for obvious reasons. Doing checks using the char x,y (& z as well for height) against the map array was the easiest method I discovered. Keeping track of fine movements via offsets &/or masks.

That was a long time ago though i.e in the Amiga Days so my isometric skills are very rusty  :D

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

fuzzy70

Sorry for the double post. The following link may point you in the right direction or give you tips
http://gamedev.tutsplus.com/tutorials/implementation/creating-isometric-worlds-a-primer-for-game-developers/

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

MrPlow

Thanks Fuzzy
Will look into that...
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Darmakwolf

Fuzzy's idea is a good solution. Don't use boxcoll / sprcoll for detection in isometric view. In fact, I don't recommend it for map collision at all. Check the array the character is going to move to before it is moved there. So before your move character code, implement a chunk that checks ahead where the new position will be. If it returns a movable tile, go ahead and move. If not, just don't move. As far as layering goes, you need to look at the code where you draw the character.

Let's say hypothetically it looks like this:

drawAllBlocks()
DrawCharacter()

That would result in the character always being in front of every block, which is of course what we don't want. Perhaps go into your code for drawing the blocks itself. Make a variable holding the Z-Order of your character. If the character is at the bottom of the map, the Z-Order is highest. At the top it is 0. Draw the character AFTER blocks with a lower Z-Order, and BEFORE blocks with a higher Z-Order. That'd be my take.


MrPlow

Thanks Darkwolf...

I have gone down that route and all is looking better for now...

Just a tip to anyone else ... dont go for staggered ISO if you can help it!

Nightmare for mapping! Found that out the hard way!  :noggin:

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

Quote from: fuzzy70 on 2013-Oct-16
Sorry for the double post. The following link may point you in the right direction or give you tips
http://gamedev.tutsplus.com/tutorials/implementation/creating-isometric-worlds-a-primer-for-game-developers/

Lee

Thanks for this!
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs