Tech Work #3: Old Habits Die Hard
The last two devlogs were probably boring and uninteresting because the images for them weren't loading. I have fixed this problem and will continue forward using more images instead of typing up long uninteresting paragraphs.
Fixing the "Battle System" dependency problem:
Creating a BattleContext object in the top of the hierarchy and passing it to children using dependency interjection fixed the problem of everything being able to touch BattleContext.
This diagram displays a good relationship between objects. |
The Battle object passes the BattleContext to only other object that directly depend on it. Unlike the 2nd image, only objects that have the green lines going to them from BattleContext have access to it. Using this method eliminates both the problems of having EVERYTHING access a critical part and having objects that need to interact with each other directly accessing the other.
Next devlog I'll be displaying overall how the system works through loosely connected objects and signals.
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
- Technical Working 2: Electric BoogalooMay 21, 2021
- Technical Working #1May 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.