After a bit more programming work, I’ve finally got the core game to a point where I can spend some quality time actually building content. In this case, I’ve been working on building the first areas of the game.
Actually, before that, a bit more about that programming work. A big obstacle to my work flow at the beginning of the week was that whenever the player entered a level it stopped to generate a navigation map for the enemy AI to use. On a small map that’s no big deal, but especially these early areas tend to be vast mostly-empty expanses of rolling hills and the like, which completely destroy the nav map generation algorithm just due to sheer landmass. Something clearly had to be done. Thus, I created a button specifically for generating nav maps, and made it so any generated nav map will be automatically saved alongside the level.
I also quickly ran into some critical issues with the flood fill algorithm, an extremely helpful tool for building levels quickly, especially in the early stages. First, there was a bug which was causing it to hit an infinite recursion when it hit the edge of the map, which was clearly just a dumb fuckup on my part. However, making the function recursive in the first place was starting to seem unwise — not only do recursive functions give incredibly unhelpful errors which made the debugging of the above problem take about five times as long as it should have, but filling large areas of level seemed to be causing stability issues as well. It was only a few minutes of work to rewrite the code to be non-recursive, and it’s fast and stable now.
So, once I got that done, I started working on the starting areas.
I think my tilesets could use some work. I mean, obviously I’m not planning on using the monochromatic grass and stone tiles here, but I mean more fundamentally – I tried to cram too many different things into one or two tilesets, and now it means that a lot of the tiles I expect to have aren’t there. There’s no smooth stone slopes, just steps. There’s no transition tiles with stone on the inside and grass on the outside. Lots of stuff like that which I expect to be there, which should be there, and probably would be if I’d planned this out better. Therefore, that’s going to be my next step: Planning it out better. Basically, tomorrow I’m going to build a list of all of the tile types I’m going to expect to need and assign each one a number. So grass is bank 1, dirt is bank 2, cut stone is bank 3, rough stone is bank 4, dirt/grass transitions are bank 5, etc. Hopefully I’ll have enough banks to go around – I have 255 set aside, which sounds like a lot but I worry they will go quickly.
That does need to be the immediate next thing I do though, because the sad reality is that any work I do building the levels before then is going to be broken when I end up rearranging all the tiles into new banks. I don’t like wasting work, even though this level building work has been one of the most effortless, fun, and hypnotic tasks I’ve had on this project. Once I know what tiles go in what bank, I can fill them with placeholder tiles so I don’t get bogged down. Once I have the levels sketched out with placeholder tiles and every placeholder tile is firmly in its place, then I can start adding detail, since I’ll actually know what I need.
Aside from the work building levels, AnxEdit is progressing as well. I added working framerate controls and improved the registration point editing to handle multiple frame reg points better.
It is truly extraordinarily ugly, I must admit, and I may have to do something about that, but if it works then that’s my main priority.