Tag Info

New answers tagged

2

What is the problem? Generally speaking, you want to do a topological sorting, where the nodes are your bricks and the edges mean "is this node behind that other node" relationship. So all you need to do in order to sort anything anywhere is to decide on "is behind" relationship. It seems that your code treats bricks as uniform objects in a grid, ...


1

If you have the height of each corner you can easily find which tile to use. For example on the following drawing, the tile number 1 has hills on its top corner and left corner. The tile number 2 has a hill on its left corner. To know which tile to use you would write something like that : if (top_corner_height == LOW && bottom_corner_height == ...


0

When creating your tileset, you need to set up your tileset parameters such that the whole column becomes a single tile. Once you have that working you can tweak the "tile width" and "tile height" properties of your map until your tiles align correctly on the grid. Easiest is to enable a grid in your image editor so that you can experiment with the size and ...


0

Summary: Make a 3d mesh exactly the size of your terrain. Then do a raytrace trough the mouse towards the terrain. This will give you the x and z coordinate of the tile. Now from the z coordinate you can calculate the y coordinate of the tile without elevation. Then you can use one of your links to calculate the tile at that position. Now some simple math ...


0

To understand my proposal you will have to stop thinking in tiles for a while, even if your finished game needs to guarantee that all objects will be tile aligned. I suggest you to adopt the same design I'm following for my current project. Position your objects in 3D, they have x,y and z. In my case, x is positive to the right; y is positive upwards; z is ...



Top 50 recent answers are included