I’ve uploaded a new version of the source and binaries to Codeplex if you’re interested.
The new version includes
- Improved the dungeon generation time
- Increased the field of view and torch radius
- Added more AI players
- Removed current threats window
- Increased size of competitors window
- Changed game to use full screen and adjust to current resolution
- Removed field of view checks from AI threat detection
I invested about 4 hours to implement the above changes and I feel the game plays a lot better now. Don’t get too excited though, it is and always will be, a simple game. It’s purpose was to try out some ideas and learn some lessons. In the end, I feel that I got what I needed from the exercise.
There were some elements that I could not easily implement and I will be focusing on these for my next project.
The game started to run noticeably slower when I added a few more actors. I will need to do some profiling to track down the problem, but I expect it to be the A* path finding. I will be doing some investigation on alternative techniques which are hopefully not so computationally intensive.
Generally the codebase needs a bit of refactoring and I hope to go through a few revisions before the next project. I will look at encapsulating game logic, engine logic and UI logic. I will also add all the unit tests for those that are interested.
I wanted to add the ability for actors to be aware of sounds e.g. doors opening, combat, etc. but could not see a simple way to include it in the current design. To implement the feature shouldn’t be hard and I propose to make use of a technique similar to sonar.
Each time an actor completes an action the engine would send out a ping to simulate the sound. The strength of the ping, loudness and fall-off of volume would be determined by the action, racial characteristics of the actor, distance and terrain. My first implementation will probably only cater for distance and terrain but that should be enough to provide a good indication of the impact on game play. I probably won’t even use a ping (modified shadowcasting or raytracing) but would just evaluate the direct line between the actor and each of the other actors (why look for them when the engine knows where they are).