is there a more confortable way to order tiles in a isometric game?

Started by
7 comments, last by EarthBanana 10 years, 3 months ago

i guess its not hard to change later but since im trying to make the map system now i was looking for some insight

should i follow the human reading system?

1 2 3

4 5 6

7 8 9

but for later gameplay i guess (i never thought of it yet) it could be better if i follow the movement flow but it would lead to a more wierd map visually but more easy to handle maybe for pathfinding and stuff

1 2 3

4 5 6

7 8 9

or i could rotate the map which would be easy for everything but more calculation in the drawing cycle (no idea if that could matter or not)

1

4 2

7 5 3

8 6

9

opinions ?

Advertisement

I like treating isometric as nothing more than an effect applied to a normal grid, so I'd pick the third option. Basically, your display code is the only code that will even know you are isometric. That makes debugging easier, and making debugging easier is huge. It also makes a ton of stuff easier to wrap your head around. An example would be that your map file is easily just an x-by-y grid of ascii art that can be printed and looked at and understood by humans quite easily.

Edit: as a note, you should probably think of the cells as having both x and y coordinates instead of a 1D array. It's fine to use map[y * width + x] in your code, but when talking outside of code it's weird to see map coordinate 4 mean map coordinate 1,2.

yes, ofc my map is the usual [x,y] but i sortof wanted to visualize the map faster above :D (Also i followed the draw pattern)

ty for your answer and i sort of agree with you, its just that some days ago i read an article about it and i remember that guy saying we should draw tile like reading but i cant remember the reason so i wanted to make sure i m not missing something that could screw me later

The reason for drawing the tiles as if you were reading them is because of the simple "3D effect" that isometric provides. If you draw everything in tiles 4 and 2, and then you draw your tall x-com soldier in tile 5. He gets drawn in a way such that the top half of his body is drawn in front of all the stuff that was drawn in tiles 4 and 2.

Keep in mind that the reason for doing this was to fake 3D in the olden days, blt'ing from the "back" to the "front". Nowadays, you can usually just render a for-real 3D scene with guys, items, terrain, and walls all standing in the right place, and the graphics library/GPU is smart enough to only draw the stuff you can see.

And in some cases, the standard rendering style would require you to reverse that order. In XNA, when you clear the screen and use SpriteBatch to draw everything, For a given layer, it only draws on blank canvas once. So you'd either have to reverse that order if you didn't figure out the layer, or specify a layer for each row.

- Eck

EckTech Games - Games and Unity Assets I'm working on
Still Flying - My GameDev journal
The Shilwulf Dynasty - Campaign notes for my Rogue Trader RPG

I think the first way you did it is most common

http://www.gamedev.net/blog/33/entry-2250273-isometric-map-in-sfml/

You can also easily do isometric using 3d with a fixed camera - might sound hard to do 3d but it could likely end up being a lot

easier because you wouldnt have to worry about draw order

I think the first way you did it is most common

http://www.gamedev.net/blog/33/entry-2250273-isometric-map-in-sfml/

You can also easily do isometric using 3d with a fixed camera - might sound hard to do 3d but it could likely end up being a lot

easier because you wouldnt have to worry about draw order

yes probably, also im good with math and i studied all geometry about that but... wouldnt 3d make the time to make assets like grow 50 times ?

also dunno i have this personal idea where a decent 2d is more acceptable than a decent 3d

i think 3d is only good when done very well, while a simple and clean 2d might still be cool

You know that you can use full 3D and get the exact same effect as 2D, only without the stupid pain in the ass ordering problems, right? For example, see http://www.gamedev.net/topic/629496-dynamic-objects-in-isometric-map-drawing-algorythms/#entry4968844 Old isometric was pretty much intended to get around the limitation of having old cruddy hardware that couldn't do real 3D. As soon as real 3D capabilities came around, it just wasn't necessary anymore. You can the exact same look by plastering your pre-rendered stuff on some quads.

no, i didnt know since its a beginner forum and i started programming few weeks ago...

also what about objects?

if i put a rock cube onto a rock ground its ok

but if i put a tree over the rock? how can i put a cubic 3d tree onto another cube ?


yes probably, also im good with math and i studied all geometry about that but... wouldnt 3d make the time to make assets like grow 50 times ?

well - not necessarily - the meshes for objects would take longer yes - but if your using a fixed camera angle you can get away with using a rectangle with a image on them for your objects - they will still have 3d coordinates and so you dont have to worry about drawing them in some certain order - you can even do characters with spritesheets that are just drawn on a rectangle - as long as the camera angle doesnt change it will look fine..

For the tiles you can do kind of the same thing - but what I would suggest is to make a simple cube as your tile mesh and then just make different textures for different terrains.. in this way you dont have to make a different mesh for each different tile and your production time is a lot less

This topic is closed to new replies.

Advertisement