Turn Based Strategy (like Advance Wars) - DevLog

0 favourites
From the Asset Store
Hand-animated Sprite Base for isometric game/animation development
  • <img src="https://dl.dropboxusercontent.com/u/159885981/awtest1Animation.gif" border="0">

    This is the very early beginnings of a TBS game like Advance Wars.

    The demo can be found here.

    Right click to reset map.

    Left double click on a unit to see its path. No actual movements yet.

    The highlighted path indicates all the possible routes the unit can move.

    This is calculated by having a certain amount of action points per turn which is reduced by the cost of each terrain type it will travel over during the journey.

    This is different for each unit, for example Tanks can't go through woods or up mountains so the cost of that tile is above the max action point (obstacle), but they are fast over grass and up hills so they only incur -1 cost when traveling over that square. Soldiers travel -1 over grass, and -2 over woods etc. You get the idea.

  • Advance wars was great so I'll be keeping an eye on this! :)

  • Solid work! There aren't enough games like this, and I'm excited to see where you take it.

  • Advance Wars is one of my favorite games of all time! I was planning to make a game similar to this one, but I still have a lot to learn. I can definitely help you create the game. Just let me know if you need help with the graphics or sound effects.

    Here is a preview of my work:

    dropbox.com/sh/aobt89swgxvkoe2/TeQmZDJxEr

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the replies guys.

    Heres a quick updated test 2.

    <img src="https://dl.dropboxusercontent.com/u/159885981/AWtest2/awtest2Animation.gif" border="0">

    Each unit now has a cost to fire.

    The yellow path area shows where the unit can move to but can't fire.

    The green path shows the area where the unit can move and still fire. So you can move further but sacrifice the ability to attack or move less and attack.

    Also Each unit now has 1 terrain type where they will get an attack and defence bonus whilst on that square. This for the moment is represented by the circle. For example soldiers can hide in woods for a defence bonus or attack in woods where theres cover. Tanks get an attack and defence bonus on hills.

  • Added the ability to choose a path and view the route before you ok it.

    <img src="https://dl.dropboxusercontent.com/u/159885981/AWtest3/awtest3Animation.gif" border="0">

    Test 3 here.

    It was a little bit more tricky than i first thought because i have to manually work out the angles and also insert the corner sprite images based on the angle of the current point in the path and the last point in the path.

    Next up moving the unit.

  • Oops, just noticed a bug where the arrow path sometimes ignores the terrain costs. I'll look at that.

  • The bug is more serious then i thought. I did a number of tests and my code checks out ok.

    It seems to be a problem with Astar Pathfinder which i'm using thats ignoring cell costs on occasions.

    Heres an example.

    <img src="https://dl.dropboxusercontent.com/u/159885981/AWtest3/awtest3Bug2.png" border="0" />

    The path above is correct. The tank unit has a cost of 100 for moving over woods and mountains. It only has a cost on 1 for moving over grass and hills. There for it has picked the quickest route available.

    <img src="https://dl.dropboxusercontent.com/u/159885981/AWtest3/awtest3Bug1.png" border="0" />

    Yet the square below has generated a false path. I checked the cost of squares from aStar pathfinding expressions so i know they are indeed a cost of 100, yet for some reason it has chosen a route with a total cost of 104.

    I'm afraid with this bug i might not be able to continue.

  • This is a very interesting project - I hope you keep at it. Thanks for showing all the pictures that help illustrate your game. I loved Advanced Wars series, so really hope you continue.

  • Thanks Manley.

    Unfortunately i have no way around the bug. It's a 3rd party object and i don't think 00Rez updates.

    The only other option is to recode the game with the official inbuilt pathfinding behaviour. I've had a play around with it today and have it working on a grid but i can't understand how it handles costing. For it to have any effect i have to set it to a value of around 100 or else it just seems to ignore it completely, which presents a problem at the moment.

  • There an abandonded .cap you could base this code from construct classic to construct 2... unfortunately his server seems dead :/

    http://www.scirra.com/forum/unfinished-project-advance-wars-style_topic42223.html

  • Thanks Manley.

    Unfortunately i have no way around the bug. It's a 3rd party object and i don't think 00Rez updates.

    The only other option is to recode the game with the official inbuilt pathfinding behaviour. I've had a play around with it today and have it working on a grid but i can't understand how it handles costing. For it to have any effect i have to set it to a value of around 100 or else it just seems to ignore it completely, which presents a problem at the moment.

    Well, isn't that the fun part of engine building? No, not really. It is always a bummer if you have to recode and rework vast chunks of your game. But on the plus side, by using the built-in pathfinding, you'll have better support and I would assume it works well. I haven't tried it out yet. So, anyway, hang in there and keep working. Don't look at the hours and hours of work - just take baby steps to stay sane.

  • Okay so i had no luck with the inbuilt pathfinding. The cost seems to based on distance so if you're only moving a few squares it will always cut through a high costing square, even if the surrounding squares have a lower cost. The distance may be longer going around the but the total combined cost of the journey would be less.

    Therefore i wen ahead and coded my own A*pathfinding engine in construct.

    <img src="https://dl.dropboxusercontent.com/u/159885981/myApath/myApathTest1.png" border="0">

    The only problem is that its quite slow at the moment. I hope some one can have a look at the source and suggest how i could speed it up.

    Heres the Demo. It will start working as soon as it loads. Give it a few seconds to find the path.

    And here is the Source.

  • Hi Just curious if you ever made any more progress on this. I came here after googling "turn based strategy" + "Construct 2" on Google. Would you be willing to share any of your previous work?

  • lylepratt I found a solution to the problems i was having but moved on to other projects. Construct has also moved on a lot since this thread so the methods i was using is outdated but theres no reason a turn based strategy couldn't be made in Construct more easily now (if you're familiar with the software).

    Rexrainbow has also made a lot of cool plugins that might help with boards, pathfinding and movements etc. http://c2rexplugins.weebly.com

    Sethmaster has experience working on some really cool looking turn based games. Maybe he can help?

    https://www.scirra.com/forum/rpg-made-in-construct-2_t121088?start=10

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)