ZRPG (2014-01-06)

So at the end of the last year I entered the Oryx Trial with a somewhat poor entry and unsurprisingly didn’t win. I didn’t expect to but the point of entering was to push myself into writing some classes which would be used in my other game. I must say it’s also inspired me to get back into the game development side of things.

Since the new year I’ve made a big push and managed to get the random city pretty much sorted and integrated with the 3D stage. Now although this is pretty much regurgitating previous posts, a lot of work went into rewriting big ol’ chunks of code for it to work more accurately and quicker.

Now the main thing that’s up with this example is that there’s a delay when you hit the edge of the city block, this shouldn’t be a huge issue as I’ve purposely scaled the map down to down to show this. The map is really ten times the size so by the time the player reaches the edge of the map, the neighbouring block would have already loaded (in theory =P) The way the map works is on a 9×9 grid, when the player reaches half way through a block it starts loading in neighbours. The delay is present as threading in AS3 is still in beta so I’m currently daisy-chaining the processing off the main frame rending. When the player moves to a new block, the loaded blocks shift over so only new blocks have to be loaded. This now does mean that you can walk infinitely in one direction and the city will keep generating buildings around you.

There is a minor issue where some buildings don’t get loaded which I shall have to look into but I’m happy with the progress at this point. There are still a few pieces which can be optimised at this stage but I thinking I’ll work on a different piece of the game for now. I’m really hoping to have something fresh for the next post as this is yet another post which contains the same as previous entries but with minor updates.