Well, here we are at the milestone post with the number 50. I am only counting posts that are clearly labeled as bringing new features or progress in the development. Unfortunately, post 50 kind of crept up upon me and I did not prepare something well in advance.
So something from the back log will have tot do. Something that I have been foreshadowing in the past. I did not get to finish it back then mainly because of the blasted ramps. But now, as a rampless engine, I managed to get the final touches in. So, without further ado, here it is:
Alternative topdown view
Wait a minute. Topdown again? Are we back to that? Now don't worry. This mode is an alternative view point on the action and it will never be the default and will not take up any development resources. With a press of a button you can switch in the fly from isometric to this:
I'll go right ahead and list all the advantages having an alternative "2D" mode has:
- It is basically free. I had to write it once, but it was very easy. Unlike isometric, rendering in a topdown mode is very easy, just two loops. This mode is an alternative view, this means that it only renders the map and you can issue commands like in isometric mode, but the rendering code is a separate and stand alone entity. What works in one, works in the other. Resources and content is only created once.
- I do not need a second set of graphics. As you can see, the game looks pretty much the same in both modes. Isometric tiles are converted into square tiles by the editor automatically. This conversion is not perfect, and an artist could do so much more than an automatic conversion, but since I do not want to greatly invest into this alternative mode, it will have to do.
- It is almost impossible to break. Since rendering like this is so easy, it is almost impossible to break. I can test for something having a bug in this mode and thus can rule out the rendering engine having bugs and concentrate on the real source of the problem. Also, developing new features can be easier for this mode first.
- It offers a good view point of the action. Maybe not at this zoom level, but once we zoom out a little:
At this zoom level the contrast could be a lot better. Maybe a schematic strategical overview rendering mode should be added in the future.
- Free form zoom. This is not implemented yet, but since topdown does not have strict tile size and proportion rules, you can create any zoom level. In the future I'll add this possibility and make this rendering mode play double role, the second role being of strategic whole map display. Maybe a minimap also.
- It is the perfect point to relaunch the 3D investigation. The previous 3D engine was a failure, but the new one might take the 2D mode as a starting point. The first phase would be to draw the same thing, but this time using polygons. Then add a little zoom and rotate. And then a tiny bit of perspective.
- More performance. Rendering top-down is faster. While I do try to make the isometric engine as fast as possible, topdwon mode might enable a few extra people with relatively old hardware to run the game.
- Good starting point for portable port. Imagine that: DwarvesH on an iPad or and Android tablet (on a phone it is harder because of the small screen, but maybe doable). The added performance from the 2D engine, together with some platform specific optimizations (I have one special optimization I can do to top down mode that is a lot of effort for PC but could greatly improve framerate on weaker devices) could enable the game to work on these portable devices.
There are a few other advantages that do not come to mind right now, but you get the idea: having this secondary render mode is an advantage, especially if it only took 80 lines of code to implement.
One additional feature this mode has is current level highlighting. Let's start with the above map, but viewed from another point:
Here we only see a single Z level. But if we go to a higher level, where more than one Z level is visible, we get this effect:
I'll add here a few more images, each taken from a consecutively higher Z level:
One thing I could change is make the effect change in intensity according to height difference, to give a better overview of elevation. Not a priority right now.
This dual rendering mode caused me to reorganize the cache folder's structure, streamline tile loading and ordering and made all tile sheets use 256 tiles (in the past some had 400). This keeps perfect uniformity between isometric and topdown, and make both my life the life of future moders easier.
Very precise mouse cursor
You may have noticed in my past videos that mouse movement is kind of awkward. I had to maintain a high level of concentration to partially hide this fact while I was doing my videos. The fix was easy but tedious so I did not bother with it until now. But the new precision is a godsend! I can now do very precise selections and it is near perfect. There is a small accommodation phase if you turn off half height walls (the default is on) because the mouse tracks the surface of floors, not the top of walls, but after you get used to this you should have no troubles in either mode.
With this last change I consider the rendering and input engine done! From now on it is only content and new mechanics.
I still have a few posts to do, but after that a new pre-alpha phase will be started. This phase will also consist of third party (but probably not open) testing and once it is finished version 0.1 will be complete. I looked over the feature overview I did a few months ago, and things are looking pretty good. A few things were left out, a few things were added and I am roughly in schedule.
But with the new added things, "Stoneage" will probably not make the deadline. If this happens, I'll try to think of something to compensate. Maybe a public tech demo. I don't know.