Xfire - LospecJam2

Xfire is a turned-based combat game inspired by Advance Wars and Rebelstar. I’m developing the game for the Lospec game jam which has the limitation of a virtual game console with quite limited specs.

Turned-based games can be complicated and I have only a month to make this one. My initial design approach was to strip out most unessential aspects of such a game but still produce something that is both simple and engaging.

The current design is single player against the computer or two players competing on a last man standing basis. I’m constructing the code in a way that could easily be expanded to any number of teams, for example 4 separate human players, each with their own team. That wont be in the jam version but should I expand the game after, extra teams would be an option.

For the computer controlled team, I am using the pathfinding extension by @selimanac and some relatively simple rules. I want the ai to suprise the player and not be too predictable. Difficult to make an ai as smart as a human player so the computer team will likely have more units, or some other advantage to make up the intelligence shortfall.

The game jam concludes at the end of May and I should have a web build ready before then.


good luck then :slight_smile:
Looks great (as always), I’m already eager to play.


Nice! I remember that you worked on a more ambitious RebelStar made in Defold a few years back. I look forward to playing this simplified version! Also, it reminds me that I’m following the progress of Arch Rebel (https://twitter.com/UBadler). The developers is quite active and usually posts updates on Turnbased Thursdays, https://twitter.com/TurnBasedThurs. Perhaps a way for you to build interest in this game too?

1 Like

Been following this with anticipation as well. It looks really great!

Will post something up on X later this week for Turnbased Thursday.

1 Like

Some gameplay footage



Beta version is online ready to play in browser. Play against the computer, a friend or watch the computer play against itself!

Let me know how you get on without instructions :thinking:

Password: defold


super cool! yes, no need for instructions. ui is quite clear on movements left etc. i got only the doubt of what to click right away at the beginning - ‘x’ is not obvious (for me!).
a little too much ‘walking’ before getting to the real action. clearly it’s a beta level, but in the final game I would do some simple starting levels that introduce the mechanics and act as tutorials without being tutorials


@benjames171 I know this is the part of your style but I agree about that. At least ‘return/space btn’ will be a better choice for me either.

And agree with that too.

Playing with gamepad is much more fun for me, it works quite well.
I love turn based games and I have few ‘kind of a polish’ suggestions.

  • Generally using mouse for selections(selecting units and tiles/enemies) is a fast and better solution for user experience. first click might be a set(for seeing how many movements left or how many damage to enemy) and second click might be a confirm.
  • I would like to have ‘End Turn’ button separately on hud which I can press quickly(sorry but again with mouse).
  • On cursor mode, when I press ‘C’ it would be better to select a unit which has a movement left first.
  • I would like to see a message when ‘No more movement/fire left’ for quickly ending turn.
  • I would like to see my selected unit’s movement and fire range. Perhaps you can use .solve_near to highlight the tiles and selecting target tile(or enemy) with a mouse click.

Just suggestions… :slight_smile: Life is easier with mouse :slight_smile:

Edit: I didn’t know this is for a Jam, sorry. It is wonderful as it is.


I understand the current controls are part of the jam rule compliance. There’s an old-school gamepad, just a cross pad and two buttons.


Oh, I didn’t know that. sorry :slight_smile: I just jump the game(cause I love @benjames171 games) and didn’t read the title, my bad :frowning:

Single player is more entertaining and clean rather than vs computer and 4 players.

Beta has been updated to v0.2b! This update includes improved ‘AI’ and the new game mode ‘Capture The Flag’.

Some challenges I faced improving the AI:

  • The bottleneck problem. Particulary at the beginning of a game, the squad is bunched together at their base. Given there might be few routes out of that area, the units can get in on another’s way. To mitigate this, the fastest units are placed nearest the exit routes and allowed to go first. As the game progresses and the AI squad spreads out, then little bottlenecking occurs.

  • The target problem. Whilst the pathfinding algorithm can skirt around obstacles, if the target tile is occupied, the pathfinding will fail. This is an issue when a waypoint is occupied by another unit. To solve this, I check the target tile before attempting pathfinding and if occupied, try nearby tiles until an empty one is found. Simple but 99.9% effective.

  • The priorty problem. Particularly in the new Capture the Flag mode, having a unit decide which possible action to take can be problematic. Obviously, capturing the flag is a high priority but if the unit is taken out straight after, it’s a pointless action. So, engaging the enemy and retreating to cover is always the highest priority.

The link to web build again:


Yes, this is a bit of an issue and I had it before when I was prototyping a turn based game. Your solution is quite good actually. I did the similar thing but on the library side.

I’m developing a new version of this library(astar) and I’m planning to implement a async(non-blocking) solver on separate thread. Maybe I can add this future as a build-in solution which you can pass object/obstacle ids. But you know, it takes time…

That would be cool if, as an option, the pathfinding could return a nearby free tile if the end tile is blocked.