I enjoy roguelike games for their simple and charming mechanics, but there are peculiarities to the genre that I do not think necessarily positively contributes to the gaming experience (necessarily -- I agree that this can make it fun!) and so my goal is to make a more story-driven game that allows for complex NPC interactions, deterministic environments rather than the traditional randomly generated ones, and no permanent death. I am largely influenced by my positive experiences with the Elder Scrolls games Morrowind, Oblivion and Skyrim as well as the few roguelikes I have played such as Crawl and Pixel Dungeon. Another large part of my motivation is to put the Godot engine to the test, which is a relatively new engine so in my view needs more stressing in terms of game genre.
What it does
At the time of writing, the game has no AI, but rather the NPCs currently wander aimlessly without a direction. Enemies with low disposition towards the player will attack the player if they are near, and the player can also attack those enemies. NPCs with higher disposition will not attack the player, and the player will converse with those NPCs. The game is able to load types of weapons and armor, as well as conversation trees in the form of JSON files. Although there is no saving functionality implemented yet, loading a config files has been implemented so saving should not be too difficult.
How I built it
I mainly worked within the Godot engine editor. For image editing I used the GIMP. Godot is able to handle most other things such as providing a text editor, a visual scene editor, and a tilemap exporting tool.
Challenges I ran into
Initially my main challenge was figuring out how to deal with a concept of "turns" when I am used to programming real-time games. Busy waiting with a while loop was not the correct solution because it completely froze the window, which was not at all what I wanted. Instead I implemented a slightly different version that is conceptually the same as busy waiting, but conforms better than a while loop. This solution instead checks if any input was detected, and if not, let the process finish what it is doing with neither the player nor non-players taking their turns. This way the window does not freeze, but eventually control gets back to checking for new input.
Aside from that, there were many smaller challenges but they were fairly uniformly distributed during my efforts. Obviously each feature I implemented had a few failures before the correct solution came to mind. For example, it was not obvious to me that conversations should be stored as JSON files, but after conceiving the flow of these conversations as hierarchical it became apparent this solution would work.
Accomplishments that I'm proud of
I am proud that I have managed to implement the beginning of a conversational NPC. In the past I have implemented various enemy NPCs but this is the first time I have tried to implement dialog of this kind.
What I learned
I have learned a good way to implement turn-based games, as well as a method of structuring a conversation as hierarchical.
What's next for Generic Dungeon Game
At the time of writing I am implementing different species, items, and areas. After today I intend to continue developing the game to expand this into a much larger game, and if possible invite the player community to contribute their ideas to be integrated into the game.