Alon's Recent Forum Activity

  • Thanks for sharing this code oosyrag! :) with the PathNode sprite you've added it looks much more visually and easy to understated the path calculation result on the layout, very cool!

    Unfortunately, I'm looking at it and I see these overwhelming parameters inside the System on the Repeat loop and I'm even more confused to be honest it's probably not on my level to use Pathfinding.

    Alternative Solution (without Pathfinding):

    I wonder if there is an alternative to something more manually, based on the idea of the way people use to make the a weapon or target "LOOK AT" the mouse X & Y all the time then SHOOT to it's direction.

    So my idea is to make every tick (always) that the ENEMY will "LOOK AT" the Player position on the grid.

    Then when click to END YOUR TURN, it will go on that direction based on the 32x32 grid probably with the Tile Movement simulation.

    Sure, this won't solve how to handle the Solids... but before that, how do I make the enemy to "LOOK AT" the Player's position every tick, and do 1 step on the X (for start) towards the player when ending the turn. IDEAS Anyone ?

    I think this could be the basic enemy's movement mechanic, more manual and not accurate but it should work in theory. I just don't know how to begin with the above.

  • Thanks for sharing your advice and trying to help! oosyrag

    unfortunately it is probably too confusing for me to accomplish as I'm still learning and experimenting.

    This is why I didn't use Pathfinding earlier... as I tried to follow your advice which make sense combine with the Tile Movement (which is VERY easy compare to the Pathfinding Behavior) things makes me more confused.

    So I've attached a VERY SIMPLISTIC Layout you can see what I'm trying to do visually since it's GRID based 32x32 but I removed ANYTHING that is not related to the enemy pathfinding step (which is not exist yet), just to keep the file clean as possible.

    For now, the way to test it is to place manually the player on different places on the grid but of course there is no Enemy AI at all now, I'm just thinking how to test it without adding player movement to make the code clean as possible to focus on the Enemy AI first.

    If you, or anyone else can help me make it with Comments inside the Even Sheet explain what each event / action does I'll probably be able to understand, since my mission is NOT to let somebody do this for me, but to LEARN from examples, this is why I made this starting-point file.

    I believe that combining the Path Finding + Tile Movement behaviors is what I'm first stuck with.

    It is important for me that the Pathfinding won't do weird smooth sliding movements above or behind sprites but keep the Tile Movement priority to how things are moving around the grid board.

    Thanks ahead!

    Download: Clean Start-Point File

    EDIT:

    Here is my attempt to combine guessing Tile Movement but it's super confusing, I can use "choose" if I'll put the simulation directions but it's still a guess for the Enemy AI, probably the wrong way to do this.

    Download: Failed Enemy AI Pathfinding + Tile Movement

  • Hi All,

    I have a grid split to many 32x32 cubes (quick background).

    I made the PLAYER to walk 32x32 (one step at the time) using the Tile Movement Behavior, so far so good!

    Since my prototype is a turn based style of game: Basically each character can walk X steps on the board.

    For the player it was very easy to setup, but for the Enemy I didn't start since I'm not sure what's the most simple way to do so.

    So, after failed tries with Path finding which always sliding and easing-in and out, I liked the Tile Movement best and I want to use it for the Enemy AI.

    THE PROBLEM:

    If I set the same parameters for the ENEMY AI using Tile Movement 32x32 Grid, I wonder how I do these:

    1 - How do I make the Enemy to walk 32x32 but consider not just the X which is easy, but also the Y. How can I make the ENEMY to ALWAYS LOOK for the player and go in his direction, again based on the 32X32 Tile Movement.

    2 - If I put some 32x32 Solid obstacles on the board, how can I make the ENEMY AI understand manually that "THIS BLOCK is an obstacle" so CHOOSE Y (up or down) if one is ALSO an obstacle, try the other option and only then do your X Tile Movement based on 32x32 each step.

    Basically it's a manually path finding but not complex as the actual Path Finding behavior which I don't want to use, I want to make it manually as explained on #2 above.

    I want to limit every character (PLAYER or ENEMY) have 1 step for starting, later I will limit their steps but the test is very important to see if it works so they won't walk all they want.

    HELP or Advice will be very appreciated:

    I'm afraid I'm not good with loops and complicated stuff like this, but if this is possible to accomplish and you can think of a way or even better: SHARE an example file based on 32x32 grid it will be very helpful!

    Thanks ahead and have a wonderful weekend! :)

  • Thanks again AllanR! I had a feeling that I shouldn't mess with construct if I didn't sleep but... that's the the only spare time I got hehe.

    It's still not the best solution because no control on ADDITION MAX slots but as I said it is a very simple version.

    Do you have an idea if there is an action I can add to make the ANIMATED slots play together all the time?

  • Thanks for sharing AllanR I'm trying to simplify this as much as possible, I actually got it to work with 1 Global Variable (for now) to keep it simple and clean.

    In the attached example, you can see that the STILL version on TOP works perfectly fine, So far so good!

    The issue is that on the ANIMATED version on BOTTOM, when I ADD +1 (HEAL) I get weird results.

    I'm not sure what I missed or did wrong, I tried to do the SAME for what I did on the STILL version, I probably missed something but can't see it.

    Can you please have a quick look?

    I think it's the most simplify version for slots I found not the best, but really simple and clean especially after you DELETE one of the versions that you don't need (Animated or Still).

    Download: Still Slots VS Animated Slots

  • Thanks sizcoz I think I'll use this persist feature!

    Now.. I'm trying to think this over:

    So my "Character Selection" Layout, is not actually the character sprites, but a different sprites that represent the characters in the next layout (the game itself).

    What is the easiest or most efficient way to "move" or "copy" the Instance Variables I put for each character on the "Character Selection" to the actual characters?

    Since I'm not using Global Variables, and persist will used if I'll actually use the same instances, I need a way to move these variables to the actual characters of the game, so I can change their stats at any time I want during the game.

    The only solution I can think of is to make the selected sprite form the "Character Selection" (which is NOT the actual character but a representative sprite only) to the other layouts and hide them... is this efficient? or there is a simple way doing this?

    Thanks ahead! :)

  • Thank you AllanR for taking the time to make this example file, I appreciate it!

    I will look more deeply in to it to follow how it work.

    I do have a question based on what you describe:

    Let's say that I selected the character and I want to START the game (move to another Layout)

    Since these are not Global Variables, will they "MOVE" with the characters to any other layout?

    I don't want the starting stats of the orbs to reset unless the character is dead, game over.

    Sorry for the confusion, I have much more to learn! :)

  • Hello All,

    I start working on a prototype and I'm not sure how to solve this thing:

    I know that I could just solve it with Animation and set the frames to the value I want, easy...

    BUT! since I have it split in 2 sprites: (32x32)

    ACTIVE Which is a loopable animated glowing orb.

    USED Only 1 frame BEHIND the ACTIVE Orb.

    Each character should have different amount of MAXIMUM Slots to contain the Orbs.

    Whenever an ACTIVE Orb is used, it will be destroyed (special destroy animation), but it needs to show the USED Orbs sprite behind it based on the MAXIMUM number of slots.

    I'm not sure how to approach this:

    1. Each character should start with different MAX Orbs amount. (decide from the character selection part).

    2. It shows visually the ACTIVE animated orbs lined on a raw (x axis) on screen.

    3. In Game: when USING Energy, it should show the used sprite behind it.

    So what do I do?

    Unfortunately, ARRAYS are not user-friendly and very confusing for me to handle in Construct 3

    I tried to mess with the basics of setting them in X but I got super confused as I always get with Arrays and gave up on this solution.

    As I mention on the start, I can only think about making MANY animations for each number of Active Slots and connect it with Variables to control the changes, but I would LOVE to use just one sprite of 32x32 and place them using the X and 32 spaces to add and reduce (which is why I tried Arrays and run away after 2 minutes of confusion in Construct 3).

    I still have a strong feeling that ARRAY will be the easiest way and this is why i'm asking here of HOW exactly to accomplish this.

    So.. how do I connect the VISUAL appearances of the ACTIVE and USED slots using variables or 1D Array?

    Used Slots should probably called MAX Slots, but it's just a start-point anyway:

    Download Clean Example

    Thanks ahead for any help!

    Tagged:

  • Yes, I use the same email from day one since I registered.

    Thee good news is that that I start receiving email notifications after I post this!

    It's probably fixed now, thank you! :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks WackyToaster I will give it a try! :)

  • Is it also for Sounds and other things or sprites only?

    That's what I'm not sure about, I want to load anything possible ahead.

    I'm not using URL / WEBSITE so I don't need to load links or anything but in-game assets / materials that will appear on the level.

  • Are you using the 'Load image from URL' action for your random sprites? There is a 'On image URL loaded' trigger you can keep track of to determine how many times it fires/how many times total you expect it to fire.

    Hehe, I just posted another question and saw your post... timing!

    So that's where I'm kind of scratch my head since it's new to me... "On image URL loaded' is not what I'm looking for I think, not sure...

    Because I'm not loading from URL, but from my next layouts.

Alon's avatar

Alon

Member since 20 Feb, 2014

None one is following Alon yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies