Turn Based Strategy (like Advance Wars) - DevLog

0 favourites
From the Asset Store
A well commented RPG game template to learn from or use as a base for your own game!
  • Rebooting this project and perhaps combining it with my other one.

    Any way had a quick play about with procedural map generation and how i might go about it. It's my first attempt and lots needs adding and the values need tweeking but i'm already getting interesting island shapes.

    Heres basically how i did it. First i populate an array with random values between a set range. Next i loop round the values and average them out based on the values surrounding them, this generated a height map. I normalise it which smooths it off into bands or contours. Each height then represents a different land type like water, sand, hills, mountains etc.

    Still to be added, lakes, rivers, towns, perhaps different biomes like deserts or iceland.

    Also at the moment its really inefficiently coded and the generation time could be speeded up a lot.

    You can try the test here https://dl.dropboxusercontent.com/u/159885981/islandgenV1/index.html. Refresh browser to generate new map.

  • I've been thinking about how battles will be handled. Doing some research into how many tbs game handles things they tend to use complicated formulas that require tables or calculators, i wanted things to be much simpler so players can see at a glance which units are good or bad against other unit types. So i harked back to my board game days and thought i'd try a simple dice roll system and made a quick mockup.

    Attack successful.

    Defence successful.

    Each unit has 1 of 3 types of attack, ranged (like guns), melee (hand to hand) or arcane (magic). How strong that attack is shown by its Strength value.

    Each unit then has a defence against each attack type shown by their Toughness value. This creates a rock, paper, scissors approach to combat.

    Both these values are then modified by being added to or subtracted from depending on 2 factors, what terrain the unit is on and if that unit has been set to guard.

    This finally produces an Attack value vs a Defend value, each represents a roll of the die with a 50/50 chance of a hit/miss or block/miss. Hit and Blocks cancel each other out and any hits left over is the damage inflicted. The percentages shown represent the probability of the attacker or defender winning the battle.

    What do you think about this?

    Also do you think in a battle the defender should counter attack like in advance wars or should it just be attack and defend like in most boardgames?

    You can try the mockup here. https://dl.dropboxusercontent.com/u/159885981/tbs/tbsBattleMockup/index.html

  • I made myself a mini map editor of sorts as a quick way to develop and test the game.

    Say my level map is 64 tiles x 48 tiles, i create a sprite 64x48 making each tile 1pixel in size. I then use different colours to represent the different terrain types like water land etc.

    Then i do an x y loop and get the rpg colour at each pixel position and depending on the value create a different tile when the layout starts.

    So this...

    becomes this…

    This also allows me to have each level as a frame in an animation, and each animation as a different campaign.

  • Movements are now in which includes move costs over different terrain types for different units. It also shows how far the unit can move and still have enough action points to attack or the player can sacrifice this ability and move further using all the units action points.

    I've added a basic menu system for now which will be greatly improved later. It includes a help system which tells you why an option is not available. The help info changes depending on the situation.

    Recruiting new units is in as well. It works like Battle for wesnoth where the commander must be on a keep and units can only spawn on connecting zones. Zones are connected dynamically using a flood fill so it can be altered easy in the level editor with no extra work.

    Also made a start on capturing towns, which provide a source of money each turn so you can buy new units.

    Lots more to add.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Will be keeping an eye on this. Looks promising so far. Can't wait to see what this will progress into. I'm quite curious about the procedural generation of maps..

  • Great to hear this thread still alive therefore the continuation project of yours, Ethan.

    I'm preparing a tutorial that will cover ranged movement and blocking. But that will be a story for another time.

    This is what I came up with:

    https://dl.dropboxusercontent.com/u/659 ... index.html

    Your effort is far beyond mine and you really show that. Salute

  • Thanks guys.

    alextro i like what you've done so far. I'll be sure to check out your tutorial when its done. It's always good to get another perspective on how others do things, there no reason to assume that mines in any way better.

  • Thanks for your kind words. Currently I am building my own astar system that will be applied for second part of tutorial. Nice to know someone is in the same direction.

  • Trying not to let myself fall into the usual trap of making things animated rather an just functionally static to begin with, it should really be left to the end when the game is being polished, any way i added a dynamic hud which displays the current turn, number of towns captured and players money.

    It's dynamic for a number of reasons. It uses a mask created with a blend mode so the digits (which i've actually created with sprites) are on the layer beneath the map.

    The map scrolls so i couldn't use the anchor behaviour, instead i position the hud through events, but it also has to adjust to the browser being resized under letterbox integer scale which of course changes the window size. The hud size also changes so the number of digits always fits.

    I then tied it all together so turns are in, but theres no ai code yet so the computer just ends its turn and it increments. When a town is captured the town counter increments and player receives money, currently set at 12 per town per turn.

  • Ethan

    Hiee... I am developing a game using Construct 2... But I'm facing some issues....

    The game I am trying to develop is a online

    tic tac toe

    which is a vs CPU and also online multiplayer game...

    If anyone can

    help me

    please please reply me soon so that we can have a discussion on it...

    I would be very thankful to u....

  • pritam721 tic tac toe ai should be fairly simple as there are only so many moves you and it could make. You would just have to look for patterns and block the player where necessary. I've never made one so can't go into specifics. As for multiplayer i'm sorry i have no experience in that area. Good luck with your project though.

  • Love Advanced Wars, looks like you're on your way with this. Cant wait to see how it turns out. Cheers

  • pritam721 tic tac toe ai should be fairly simple as there are only so many moves you and it could make. You would just have to look for patterns and block the player where necessary. I've never made one so can't go into specifics. As for multiplayer i'm sorry i have no experience in that area. Good luck with your project though.

    thanks alot for reply Ethan ... if u know someone who could help me with tic tac toe and online multiplayer gaming, please let me know...

    Thanks alot once again...

  • Territories.

    I've been doing more work on Towns. Up until now you captured them as a source of income each turn and used the money to buy new units. Now they play a more strategic role.

    Each town now has territory surrounding it. Hovering the mouse over a town reveals it.

    When you capture the town you also capture it's territory.

    A sides collective territory is shown by a boarder.

    Territories do 2 things. First they give units a bonus in combat if they're in their own territory.

    The second purpose is they provide zones for Fog of War. I've implemented night and day cycles, currently 2 turns day and 2 turns night.

    During the night enemy territories are blacked out. They are revealed again once a unit crosses into it.

    I've updated the hud to show the time of day a long side the turn count. "morning, afternoon, evening, night".

    Lastly when a unit is capturing a town and moves off it before its 100% captured then the town reverts to 0% again.

  • great idea

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