AlderAutomation

Pillage and Plunder Dev Log #2: Some Random Thoughts

So I have been having a bunch of random thoughts as I have been working through reacquainting myself with my C++ game, Pillage and Plunder. So I figured I would write them down to get them out of my head and maybe generate some content of interest.

Startup Script

One thing I hate about this project is that anytime I restart my PC, I have to reopen at least 8 windows, 5 of which are VS Code. So why not make a startup script? So I did. It's super simple and I have no idea why I have put it off for so long.

#!/bin/bash

# Script to start my current dev environ for working on PNP game

# Dev
code --new-window "/path/to/folder"
code --new-window "/path/to/folder"
code --new-window "/path/to/folder"
code --new-window "/path/to/folder"

# Planning
code --new-window "/path/to/folder"
drawio "/path/to/drawio.file"

# Terminals
ptyxis --new-window --working-directory="/path/to/folder"
ptyxis --new-window --working-directory="/path/to/folder"

Now I can just run that script and almost all my required windows open up. I just need to move them around where I want them..... which I may be able to script that as well. shrug

Changing my Gameplay Design

I have also been thinking about changing my gameplay design or making a second game. The reason being is that I am writing a fantasy novel about a guild of adventurers. Sort of like the anime Fairy Tail. Well I keep thinking that I should use this story for my game, but if I do that it would feel better to change the game into more of a guild management simulation, which I think would be very cool. But I would have to change the game design and I have already put a lot of work into the current design, or make a second game which would basically kill this one.

Honestly though, I think that the best course of action is to stay the course with this game the way it is and just write a story for it.

Commenting

In returning to this game, I realize I need to make more comments about what I am doing and why I am doing it. As I go through programming, I was already trying to write comments and/or documentation, but it was not nearly enough. I have been so lost trying to get back into programming this game. Now I have been adding more comments and more TODO's which I turn into additional comments once they have been completed. I have been taking notes as I go and one of the notes I have written down is "WTF am I doing?" hahaha. But this note kind of leads to my next thought

Complexity

I have made this so complex. And that was intentional to show off skills and abilities when applying to jobs, but oh my word, this could have and should have been so much simpler to come back to. For instance: in order to create the Entity Editor companion app, I first need the SQL setup, the SQLHandler, the DTO and DAO for all entities, and some of the core modules that all systems will use. Everything is modulized and has its own folder structure and git repos. Even in the SQL, different types of entities have different ID ranges, so I need to be able to find the next available ID of a certain range when adding a new entity into the DB, instead of just being able to insert and not think about it. Why? So that the DB stays organized and I can find all the things by human means as well as programming means.

### SQL ID Map

0-100  - Class
101-200 - Race
201-9,999 - buffer/unallocated for now 
10,000 - NPC
20,000 - Enemies
30,000 - Speech Tables 
40,000 - Loot Tables 
50,000 - Armour
60,000 - Shields
70,000 - Weapons
80,000 - Ingredients
90,000 - Consumables
100,000 - Recipes
110,000 - Quests
120,000 - Quest Items
130,000 - Skills 
140,000 - Vehicles

150,000+ - Players

I really hope that these ranges are enough to sort all the data that I have in mind.

Conclusion

If you want me to elaborate on anything, please message me on Discord, Mastodon, X, or email me. I’ll be happy to go into more detail one-on-one or to create more posts.

#c++ #devlog #gamedev #pnp