Samstag, 2. November 2019

The problems that come, without even starting to program

How to start programming a game (or anything really)

In my studies, where I learned to program little things like calculators or alarm clocks, we learned pretty quickly, that you can't predict every problem that comes with it. Still, you need to try because with a little bit of work, bevor you start your programming, you maybe don't need to rewrite hundreds of lines of code afterward. Since this should be my first proper game, I want to make a good plan, about how I structure the game code and how I can solve problems about design and gameplay along the way. What should a class inside a program consist of:
  1. Should have a clear and unique task
  2. This task is solved inside the class, without jumping between multiple classes
  3. UI, LOGIC and STORAGE classes should be separated as best as possible
  4. Every code, that is used multiple times, should (based on the scale of the code) an own method or class
But still, after all of this, you really can't plan everything out to the last detail.

How I try to structure my game code

First of all, I try to split the game code into two sections:
  1. This will be the roguelike. It will have a classless system, where you get your spells and skills based on the items you created in the crafting system. The crafting system, on the other hand, needs the resources you find in the dungeon and by slaying monsters and bosses. I think about adding a skill system, where you can put skill points, to get better at crafting, fighting, etc. On the other hand, I think it would be better to get all kinds of skill points through weapons, armor, and tools, that you yourself created. 
  2. This will be the RTS. After slaying the boss and leaving the dungeon, you can search for a good place to start your own town. You can upgrade the buildings and get passive resources. You can build things like smiths or barracks, to upgrade yourself or your tools. After a while, you will get more resources through the town, than through killing bosses or finishing dungeons. But the roguelike part will still be important since this will be the only place of getting rare metals or material, that you need for end gear or buildings. 

The problems that I see

But even after planing and thinking about so much, I still don't have an answer to all problems:
  1. How do I structure my crafting? Will I do it like Minecraft with a 3x3 Grid? Or can a player just insert their resources into a pot and if given the right materials, becomes something out of it? Will there be things like crafting books or recipes? Or do I expect the player to write down their creations?
  2. How do I achieve, that the RTS Part doesn't get repetitive? Given that there still be a permadeath (or maybe a second chance, when you build a church or something), there is a good chance that building your town will get boring.
  3. How do I want to generate the world and dungeons? The only thing I can do is the "simple" rooms with paths structures and I don't think that is the right way. Maybe there should be a digging feature since you need to mine your resources?
  4. And how do I get to stay sane after dealing with all of the problems? :P
Thanks for reading my blog and maybe next time I will have an answer to the problems. Maybe you have an answer? I'm open to any kind of advice or idea.
Till next time,
Age of Roguelike Dev