LF advice for Dragon Quest style battle system

So like the title says, I’m looking for advice on how to achieve a Dragon Quest style battle system. Something similar to the really old ones like 1-3, where the battle system appears ontop of the tilemap and players, like a popup window.

I figured a good idea for this could be the GUI system…? But I dunno how well that would work with flipbook animations and stuff. Maybe instead I should just pause the collection that contains the heroes and the tilemap and stuff, and could run the battle system as a collection directly ontop as a normal collection not using the gui stuff?

I dunno, I’m still pretty new to Defold, known about it for years but never done anything big with it. So any advice would be helpful. :slight_smile:

–Edit

Figured I should explain what the battle system is like. It’s similar to the older turn-based Final Fantasy games, except it’s front-view, not side-view. You generally do not see your heroes, only the enemies. The enemies are front-facing and usually when you do spells or abilities or attacks there are animations that play ontop of the enemies. There are also little windows for commands and stuff and showing HP/MP stuff like that.

–Edit 2
Picture for visualization

I would use this solution with a separate collection that you load and unload when the battle starts and ends. It makes the battle system more isolated and you could potentially test just the battle system by setting it as the main collection. You obviously need to communicate between the main map and the b battle system when the battle starts and ends, but that can easily be achieved using message passing or Lua modules.

1 Like

Yeah, that’s what I’ve mostly done. I have it in a seperate collection. I pass messages to components that need to “pause” when the battle system is going, such as the player’s movement and stuff. I’ve set up the battle system using the default GUI system. So far it works pretty well, but I haven’t gotten to needing to use animations yet…hopefully that works out okay!

This is what it looks like so far.

Just got the selector working. Now soon I’m going to attempt to actually try and get a simple attack animation and turn system going!

2 Likes