Technical Working #1
The Goal:
Shortly after starting on this game, I decided a large part of it would be flexible and modular to make it easier for me to work on it AND for future modding.
I have somewhat achieved getting their, but currently how everything is organized it is getting harder to maintain it.
The "Battle System":
Currently, the Battle System is a jumbled mess of connections between subsystems.
It holds a reference to both the player/current battling enemy, and another reference to all the UI buttons that are clickable.
In a single ready function, I connect the signals between the objects and the battle system. The system handles determining when a turn is started, ended, and when either the player or enemy dies. It also does some extra setup between turns (i.e. setting AP points). So far, there's nothing exactly wrong with this except for the fact I directly edit players and enemy's variables, which could have been reduced to a single function call on the objects themselves.
tldr; Here's a visual for the above relationships
As you can see here, it's good for the parent to have direct access to the child but not vice versa. UI buttons has direct access to both the player and enemy but should absolutely not because this can cause other problems, like if I changed values for either in the buttons.
10:28pm edit:
God I'm so tired right now. I've been working on this since 4pm on and off.
I'll end this devlog now; the next is going to explain how I fixed this AND made it better.
Work Ethics
Status | Prototype |
Author | preggy |
Genre | Role Playing |
More posts
- A BETTER way to make a RPG Turn Queue: How-To Techlog #1Jul 16, 2021
- Overworld Design #1Jun 03, 2021
- Tech Work #3: Old Habits Die HardMay 24, 2021
- Technical Working 2: Electric BoogalooMay 21, 2021
- Spaghetti code and badly drawn ratsMay 20, 2021
- First devlog and some thoughtsMay 18, 2021
Leave a comment
Log in with itch.io to leave a comment.