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!
  • Not enough free time to add any new features so i focused on cleaning up the night fog of war.

    I made it so you can see partially into the next zone by another square, and created a quick tile set for the fog edge. I also added a sprite over the layer with multiply applied to it at a low opacity to give the tiles beneath a darker look.

    I'd like to add a glow or radial light around each visible unit which would cancel out the multiple effect so where the light shines the colours are normal. Does any one have any ideas how i can achieve this. Preferably on the same layer? Thanks.

  • Damaged units can now be healed if they are occupying a captured town. Units heal 25% of their max health each time.

    Thats the last of the town code. Adding the battle stuff next.

  • Damaged units can now be healed if they are occupying a captured town. Units heal 25% of their max health each time.

    Thats the last of the town code. Adding the battle stuff next.

    https://dl.dropboxusercontent.com/u/159885981/tbs/tbsHeal.gif

    Wow, that looks pretty slick in terms of animation.

    How did you get the image (text) to scroll down the box without having it clip out of the box? S

  • icugigasoft thanks.

    I knew when i started the project that eventually i wanted to have slick animated menus (current ones are just temporary).

    The menus and interface elements are on a layer below the game layer, then i have a sprite which acts as a mask with blend mode set to destination out. The text (also sprites) are animated on the interface layer. Hope that helps.

  • Really nice work so far looking forward to see where this goes!

  • icugigasoft thanks.

    I knew when i started the project that eventually i wanted to have slick animated menus (current ones are just temporary).

    The menus and interface elements are on a layer below the game layer, then i have a sprite which acts as a mask with blend mode set to destination out. The text (also sprites) are animated on the interface layer. Hope that helps.

    I've been puttin my interface stuff on the highest level... guess I need to learn about blend modes now, ha.

  • Ethan very impressed by everything here, worldgeneration, good pathfinding, fast menu's and interaction functionality, starting to look like a very solid base, im thinking bit of possible concepts and this could also be a great base or turned into a spacegame concept, also great use of the masking, i used it before, but i find it annoying to have an extra layer for masking, wish it was an object-based thing

  • hey looks good so far, I'll be following your progress!

  • Looks interesting. What kind of algorithm do you use for the pathfinding? cheers

  • I will follow that with interest, I would like make something with this engine one day

  • EXPFall, vtrix, jobel, icugigasoft, tatogame, thanks guys for your kind words.

    Fireche i'm using a rexrainbow plugin for the pathfinding. I find it easier and faster than the event based ones coded before.

    I'm playing about with the ai at the moment, hope to post an update before not too long.

  • I'm not so sure that this

    Is the best way to make an easy level editor... How you define the (eventually) custom prop of a cell? Ex: custom sound, custom tile image, custom life value etc...

    Also the image-animation-frame trick definitely isn't a best practice... why not use external files like .json? You can make it with a custom internal editor or with software like Tiled

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As I am also developing a tile-based wargame in Construct2, I am following this with interest.

    Good progress so far, and good luck with further development.

  • tatogame thanks for the suggestion but i don't quite follow what you mean about it not being best practice though, the image is only used at the start of the layout to set the tile image then destroyed, all the info is passed on.

    Small update.

    Heres a first look at the ai.

    It shows the tactical phase. I loop through each ai unit (black units) able to move, check every move position, check all adjacent squares around it, create an "influence map" where the tile gets a score based on a number of factors like, the terrains attack/defence bonus, is there an enemy there? Can kill enemy? can enemy kill me? how much damage can i inflict? how much damage will i sustain? whats my hit/block ratio? Then it picks the highest scoring tile and if its above a certain threshold then it moves to attack, else the unit is ignored and is passed over to the next ai phase which will be the capture town phase.

    There are still some things its doest take into account, which will be added later.

    Another example.

    Kyatric please can you move this topic over to the wip board, thanks.

  • Ok i need a bit of design advice.

    I'm currently working on the ai code to my game. I've split the logic up it into various stages. I've done the tactical and capturing stages and i'm currently working on the recruiting stage.

    Basically you get money for capturing towns. Your commander unit is the only one which can recruit new units, and must be on a keep tile to do so. New units when bought are spawned on connecting castle tiles. It's a copy of the Battle for Wesnoth system which i prefer over other tbs games.

    Right now i simply have a routine to work out which units to recruit based on the enemy units on the board.

    I loop through all the enemy units, record their weakest stats in a list, loop through the ai units, for each one that can beat an enemy unit in battle i delete it from the list (as they will move and attack them in the tactical stage). What's left in the list are all the enemy units the ai needs to recruit against as it currently has no units on the board that can beat them in combat. I then prioritise their creation by finding the enemy units, that are the biggest threat, that the enemy has the most of, and recruit a unit that can beat it in combat first.

    My problem is i have a number of variables the ai needs to take into account to decide - when to move to a keep, which keep to move to, and what units to recruit.

    Heres how my system works. It's a work in progress so other variables can be added later to improve it, but for now i use the following-

    Check to see if ai has any money, if not then skip recruiting.

    Check to see if any empty keeps with empty castles are in move range, if not then skip recruiting.

    For all those keeps within move range, that are empty and have empty castles, generate the following scores.

    The distance of keep to Commander.

    The number of empty castles keep has.

    The number of enemy units in attack range of the keep and the combined damage score it could inflict on commander if it moved there.

    The units the commander needs to recruit to oppose each of those enemy units, and the combined cost.

    Whats the best method to use and combine the information i have to pick the best keep to move to and which units are a priority to recruit?

    For example, the commander obviously wants to move to the safest keep, but that might only have 1 castle connected to it, where as it might have enough money to recruit lots of units.

    I guess i'm wanting to figure out a way to somehow combine all these values into one general score or something.

    Any suggestions or advice?

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