Chris PlaysOldGames's Forum Posts

  • On a whim I decided to try and make a turn based strategy/board game movement system without using arrays, grids, or tilemaps.

    It turned out to be quite a bit of fun.

    I am trying to figure out the best combat style right now and can't really decide on what I want. Each unit has either a melee detector or a ranged combat detector (or both for archer) attached to them and if it is overlapping enemy then they can attack it as it currently stands (I removed enemies in the example below since they aren't done yet). I have several ideas on how to implement it but would like opinions on what people expect for a turn based game... should cursor turn to combat icon if a unit is selected and detector overlapping an enemy and then calculate combat when enemy clicked.. or should I have a popup window with stats and a "battle" button come up when units can engage... no idea is to crazy. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    If you would like to see how it works thus far then click the link below.

    Drag the units you want into the starter squares (light green) and then click "Start". If you drop one without placing it, it will pop back to where it began.

    As it currently stands once you click start you can no longer bring in reinforcements as they are grayed out now.

    Depending on the movement style you have selected (allow angle or 4-way only) you can now click a unit and see where it can legally move to, once you click where you want to move it will go there. If you decide not to move you can click the small cancel icon that pops up on a unit when it is selected.

    Once you have moved all the units you want you can click "End turn" to reset their movement to begin again. There are no enemies yet so end turn just reverts back to you for now.

    The "Reset" button does just that, resets everything like it was when you loaded in.

    The Forest and Swamp overlays cost additional move points to enter. Forest I think cost 1 move and Swamp 2.

    The black squares are just to demonstrate squares like Mountains and other unaccessable squares.

    The units have the following movements:

    Infantry: 3

    Archer: 3

    Cannon: 2

    Ugly ass Horse: 5

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

  • Ahh ok thanks

  • [quote:3rl6g7tj]One is to give the the object the bullet behavior and add an event like this:

    Every tick

    --- sprite: rotate 10*dt degrees toward -90

    Is the *dt necessary in events using a movement behavior, they already include it in the behavior movement according to Ashley's tutorial on *dt that says using it in behavior controlled movements could actually make the event framerate dependant again. Or am I misreading this...

  • If your intended movements for your enemies (aside from the going over objects) is the same as the tutorial then if your not getting the same result as the tutorial you need to redo it because the tutorial is correct and works.

    As far as "go over objects" this is an extremely vague expectation. Exactly how would you like them to go over objects, overlap, climb, jump, and what are these objects; solids, sprite, other enemies? What is your gameplay top-down like the tutorial or other?

  • If your using an every x seconds (or fraction of a second) condition it already has framerate independence.

    https://www.scirra.com/tutorials/67/delta-time-and-framerate-independence

  • Bullet can be used for most anything

  • You could put it in a loop.

    When button pressed and opacity greater than 50 -1 from opacity and repeat until opacity is = 50.

  • Does the enemy fire automatically during the game? Ie. is he scripted to begin shooting as soon as he is created?

    If so your problem is that the off-screen instance of the object is doing like its told to, game starts, I got to fire... pew,pew,pew...

    My off-screen explosion orbs were doing this in my space shooter (in my sig) since they are timed to explode after creation so they drift a little first. I used an audio tag on them called orb and then made a variable called canExplode, set it to 0 by default and then 1 after waves are >1 (my waves are currently 7 seconds).. they still explode but by then the enemies are on you and you never notice. Its all about what works for you. I still have a shot at start I have to hunt down, but I will get him next update when I add music volume slider..

    Your only other option I know of would be to trigger their start after game starts instead of making them active at start.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If your in windows it should save to a screenshot folder, google that question will probably tell you exact path.

    I for one immediately open my paint program (paint.net, free and easy) and then choose "paste-as new image" since windows screenshot also places the pic in your clipboard.

    Then you can edit the image to the size you want or make other changes if need be to the picture file.

    Many times its easier to get answers if you attach your .capx instead, go to file area of construct2 and choose "save as single file" while in project. Then at bottom of submission window when adding a post you will see area to attach file.

  • I think you missed this part of the tutorial...

    [quote:sh2ccbxr]Making monsters a little smarter

    Right now the monsters just wander off the layout to the right. Let's make them a bit more interesting. First of all, let's start them at a random angle.

    Condition: System -> On start of Layout

    Action: Monster -> Set angle -> random(360)

    Event 4 of the tutorial.

    They will still wander off forever when they leave the layout, never to be seen again. Let's keep them inside. What we'll do is point them back at the player when they leave the layout. This does two things: they always stay within the layout, and if the player stands still, monsters come right for them!

    Condition: Monster -> Is outside layout

    Action: Monster -> Set angle toward position -> For X, Player.X - for Y, Player.Y.

    Run the game. If you hang around for a while, you'll notice the monsters stay around the layout too, and they're going in all kinds of directions. It's hardly AI, but it'll do!

  • If the path finding behavior is rotating the sprite to face along the path you will need to manually change its facing angle.

    If you attach a capx. we can probably solve this for you in no time.

  • You could do an every x seconds, is-overlapping wall, subtract from variable.

  • You would gather the information into a variable through the actions of an event. To get the X and Y values of an object click on the window that has its opacity reduced whenever your doing conditions/actions. This window contains all objects in your project. Find the object referenced in the condition the actions are being generated from and scroll down to X and Y... it will then read something like objectname.X in the field of the variable instead of a number.

    If you post a .capx of what you have so far.. or just the part where your dragging and rotating the piece I can edit it for you to look at visually.

  • I forgot to add.. this probably won't matter since your updating it by setting it width with an event of keypress, but I will add if you update it via a variable at anytime (like say for a healthbar type use where your setting the width from a heath variable) you will need to make sure to use a set width to (variable) action or it won't visually update.

  • How do the levels vary? Do you have to build different shaped towers each time or does it just get faster?

    I got some ideas but don't want to waste time on something that may not be what your envisioning.