Home Artists Posts Import Register
The Offical Matrix Groupchat is online! >>CLICK HERE<<

Content

So I'm easing myself back into work after needing time off to support my partner and recover from general stress and thought I'd talk a little about how I'm approaching the turn based battle tutorial(s?).

My desire is for this stuff to be as compact and widely applicable as possible. There's two approaches one can take with something like a typical JRPG battle in GameMaker. The intuitive choice is to leverage rooms and move to a specific room in order to run your combat. This is nice because it lets you design the room visually and handles clean up of instances, etc for you.

The problem is that it handles clean up of instances, etc for you. So you have to write a way to save your game state so you can return to it after the battle is done. 

Now if you're writing an RPG you probably already have a way to do this just because of the need to move between rooms and keep continuity in general. But where you might accept certain things being reset between room transitions normally, combat can usually happen in a much wider range of places and circumstances you might not have accounted for.

So another way to handle this (and my preferred overall) is to not change room at all, but to instead pause or deactivate the rest of your game while running your battle from a dedicated object instead of a dedicated room. This has the upside of keeping your game state exactly the same at the end of the fight as it was when it started and being able to directly apply any consequences of that fight. It also makes it a bit easier to apply fancy visual transition effects without worrying about the exact moment for the room switch to occur.

The biggest downside is not getting to intuitively design the combat screen "visually" in the same way using the room editor. But there's plenty of ways around this involving making visual mockups (perhaps even using the room editor), and utilizing GMLive etc when creating UI components.

The other upside is that as a generic solution, in-room battles using instance deactivation wins out in terms of being more "plug and play". Which is great for a tutorial or public resource. So that's why I'll be going with it for this tutorial project. Just wanted to let you know the thinking here as I probably won't go into this much depth on the reason for this choice in the content itself!

Sorry it's taking forever.

-S


Files

Comments

Anonymous

Hey shaun, i was tackling this myself. What i did was option 2, and let a object create itself on a negative depth layer for all of the battle UI stuff. Not only that option 2 is a bit more easier / compact than trying to manage 1 room for all battles.