How to make Fire Emblem / Conclave Style Movement

3
  • 0 favourites

Stats

396 visits, 650 views

Translations

This tutorial hasn't been translated.

Tools

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

See .capx files for code and example (at the bottom). I split it into multiple event sheets for easier readability. Please keep in mind you will need a subscription for the .capx file as I have used 'Families'. Without this feature I'm not sure how complicated a system like this with multiple characters will be.

There are basically the following components playing together:

  1. Grid Setup
  2. Movement & Mobility
  3. Turn System

The Grid Setup:

What you are looking at is a sprite named 'grid' to be created as often as possible depending on the grid size that is set at the very top of the page. So if you want a bigger grid (less tiles) just ramp the number up. i.e. from 64 to 128. Make sure to use the same numbers on width and height to make squares.

Movement & Mobility Part 1:

What you see here in the first half 'Movement' is the movement logic via Click & Drag to be both PC & mobile friendly. If the character is not on top of a green square, it will reset to its origin and not count as movement.

The logic is that I made 2 families of the identical sprites, PCs and PCs2. That is the only way I found to easily manage whether or not you are trying to stack characters on top of each other and then obviously avoid that.

The logic includes if you try to stack them on top of each other not only does the UI show you that it's a no go. But also it sets the character back to his original spot where you grabbed him from AND does not count as a turn. Since no movement has been done.

Furthermore the mobility instance variable on a character defines how far they can move. 1 = 1 in each direction; 2 = 2 in each direction, 1 diagonal, and so on. This grid system is like most people are used to from tactical RPGs such as Fire Emblem, Vandal Hearts, Final Fantasy Tactics, Conclave, etc.

I also added extra logic that you can't put characters at the very left and right edge of the screen as well as you can't move them into the UI.

After you moved a unit you have to hit 'end turn' to be able to move again.

Movement & Mobility Part 2:

In the second half of the code 'Mobility Overlay' you see where all the magic of the green squares that show you, your movement range happens. A grid is created based on the clicked characters' mobility value.

In order to get the 'cross' movement effect those that are on the edges are deleted right as the grid itself is created. I have found no more effective way to achieve the 'cross' system.

Turn System:

What you can see here is a very simple turn system. Click the button, turn counter goes up by one and then resets character movement and action (I left the latter in for you in case you use this tutorial as a basis for your project).

Credit would be appreciated if you use any of my code in your project. I hope you found this tutorial useful. If so please leave a comment!

Sincerely,

Andreas Lopez

Tl;Dr:

  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!