Home Artists Posts Import Register

Content

I'd put off implementing a pause in the ARPG until I was sure of how I wanted to do it. This turned out to be a mistake because I ended up implementing the simplest pause possible and because the later in a project you implement this kind of thing the longer it takes.

The system was just wrapping the step of most objects in a "if (global.gamePaused)" check and being careful not to run per-step logic in draw events. 

The only other issues came from objects that had used per step logic managed by GameMaker internally, such as "speed", "friction", "gravity" etc. There had only been a couple of cases of this where it had lead to really quick implementations and it was easy enough to undo them and replace them with my own defined variables.

It also didn't take too long to implement in this game in particular, because almost everything draws its step from parent objects: pEntity, pCollectable, pEnemy and so on. Even pEnemy is a child of pEntity. This all allowed the pause code cascaded throughout the project pretty easily. 

This inheritance reliant structure has had lots of other fun benefits, as we discovered previously with lifting slimes. We can now cause most objects to have "drop lists" of potential loot when broken, be "hittable" even if they aren't breakable and to react differently to attacks:


Progress progress progress. More to come soon!

Other things not pictured: UI for currently equipped item, bomb & coin drops from enemies and pots, UI icons for different items coming soon and probably other stuff I'm forgetting. 

The code has been updated here: https://shaunjs.itch.io/shauns-action-rpg/patreon-access (Page password if needed for $20 patrons: "LulusAdventure")

-S

Files

Comments

No comments found for this post.