Grid and Perspective

After the latest rewrite, changing the size of the grid over which our Wizards will move has become a lot simpler. Until now I worked with a 32×32 grid and “checkered” test assets because it is easier to debug and visualize, but for the final game the plan is to have a rectangular grid to simulate depth with a frontal oblique projection.

32x32 and 32x16 cell size

Four pictures using the test assets to clearly identify the relative dimensions of the grid and objects on top of it

Pretty soon Daniele and I settled for what can be referred as a “frontal 3/4 top down view”. This view, technically this projection, was used a lot in the old days, especially in JRPGs.

It is somewhat easy to make assets for this view because they can be mostly “flat” and still work and give a sense of depth. We have an instinctual understanding of depth based on our previous knowledge, and in fact a lot of ancient art used a lateral representation of the objects, eventually changing sizes to depict importance or depth. Our brains are really good at processing what we are seeing to the point of “fixing” images to comply to our spatial understanding, forcibly if necessary (think about the well-known Penrose Stairs). The same also applies for lighting.

It is also very easy to manage from a software point of view in virtue of it being also orthogonal. For one, calculating world coordinates and projecting points to and from screen coordinates is as easy as a simple couple of linear equations, without any need to resort to matrix multiplications or other advanced math, but this is also true for isometric projections. More so it is easy to manage relative positioning, animations (all of them, if not driven by physics, are combination of orthogonal translations), loading and placing assets, manage the z-order and it just makes easy to adjust the grid properties.

The final cell dimensions, and the exact inclination of the view, will depend a bit on how it will look on screen (I am partial to a 32×24 grid), in any way you will have the possibility to toggle the grid in overlay to better examine the situation from a strategical point of view.

During game you will be able to toggle the overlaying representation of the grid to more easily make tactical decision about your next moves (as you can see in the left and right pictures at the top of the page). The overlaying grid can also convey information more readily than by inspecting each cell with the mouse. A rough example is shown in the screenshot below.

Colored grid

Showing information on the grid: green is the selected cell, red are out of level cells

This opens up a lot of possibilities for representing information in a graphical manner, avoiding the walls of text that sometimes appear in strategical games, but the discussion about the User Interface is still very much open to debate.

What are your thoughts? Please share them in the comments or on twitter.

Thanks for reading.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s