Dealing with a lot of pathfinding calls for a grid of 192×192, possibly going up to 256×256. Using A* doesn’t slow things down, yet, but it will do later, especially once the game is dealing with very large numbers of NPCs interacting with each other and the environment.
Having looked at Jump Point Search I’m going to go with that. It can’t deal with varied cost of terrain. That’s okay. Its worth it for the extra speed boost without resorting to HPA*, which would be problematic for the kind of game I’m making.
Because of the possibility of many NPCs making pathfinding requests on the same loop of the game logic I’m putting in a limit to how much CPU can be consumed per refresh. If the JPS algorithm runs out of bandwidth it will be suspended until the next run through the game logic loop. I’ll represent the wait by a little ‘thinking’ icon above the NPC or something like that. Not sure how necessary this will be but its better to do this now than wait until its potentially a problem.
The world in Biosphere will transition from day to night as time progresses. Its important to have this because it adds some potentially interesting game mechanics, not just (more aggressive) monsters coming out at night. I was wondering how to do this in a straightforward way for the prototype game. No bells and whistles. OpenGL has some simple texture colour changes that will do for now. Below is a preview of what it might look like, without lanterns and other light sources changing the night light balance. More on that later. Anyway, this shows midday to sunset to night to sunrise:-
I’m using procedural generation for the play areas in Biosphere. Like the early versions of Minecraft I’m using 2D Perlin noise heightmaps for basic terrain. Unlike the early versions of Minecraft I don’t need to generate content on the fly since each area of Biosphere is currently self-contained in individual large areas. After testing I felt that mobile devices were going to struggle a bit with procedural content on the fly once other more interesting stuff was added to basic 2D Perlin noise, especially if other noise and random map creation routines were layered on top of the basic terrain. So, contained areas have some advantages. Working in 2D without the need for immediate map creation I can afford to be a little slower.
I created a short video of how the map generation routine was coming along some time ago, much of which is now obsolete:-
So, want to start a game that is more ambitious than the fun throwaway things I’ve done before. While ambitious the actual game itself will be relatively simple compared to typical indie games. At least, that’s the plan to begin with. The complexity comes in what the player will do with it. In some ways it will be like other sandbox games that involve procedural/random world generation and freedom to change the world to your own designs. I’m talking about Minecraft, Terraria and similar. It’ll be top-down 2D to start with. Maybe later I’ll go with isometric or 3D. The reason I like top-down 2D is that its easy to understand visually and also easy to control. Easy to control is important because the game will be designed to work on desktops as much as touchscreen devices. The name of this game?
The idea of ecosystems is going to be important, hence the name. My initial idea is to create something that is free to play as a prototype. It should be available on Android devices, Windows, Mac and Linux computers and maybe browsers with decent HTML5 implementation as soon as something playable is ready. If the game works well as a prototype and people seem to enjoy it then I’ll get more adventurous and try to get a team and funding together for a big project. Nothing ever goes quite according to plan and honestly, the stage I am with in game development is so early that anything could happen. Whatever the case, something is happening. I’ve planted the seed. Now I’m curious to see how it will grow.
Currently Working On…
Jump Point Search pathfinding
Updating some old games to make them available on Android