Zebbi's Forum Posts

  • 99Instances2Go Is it because the larger sprite is going to the starting tile before it begins moving/the starting node isn't at the same place as the hotspot? I can't quite work out what it looks like what is happening, even on debug, the player just seems to go back a bit before moving along the path:

  • Zebbi

    rex_moveTo behavior moves object every tick with dt. Dt will be changed depended on frame rate. It does not necessary to make another feature to move in lower framerate. imo.

    Set position at specific event is another issue, it is better to have another new behavior for "MovementLinkedToAnimation". But I don't have plan for this behavior.

    Is there a way to do this with events, so the object is only visibly moving at intervals, to give the appearance of a lowered frame rate?

  • Why dont you just write in events what you think ?

    https://www.dropbox.com/s/faxsqtisyypfl4f/ntr.capx?dl=0

    Dont give me hell for the search time for completely locked up tiles. You was warned.

    Any idea what this little jiggle is that happens when you use a big sprite upon initilizing the walk? It only happens on this latest version. https://www.dropbox.com/s/yk55s50hevvph ... .capx?dl=0 (thankfully the pathfinder always just uses the hotspot rather than the sprite size!)

  • Follder22 sorry i dropped this projet.. the reason is collision and slow frame rate when you mix C2 with treejs with more object it's not interesting and become harder for most C2 user to build 3d world ...

    However i am waiting Construct3 ... be patient like me

    Regards

  • rexrainbow is it possible to make the movement appear as though it uses a lower framerate by only showing intermediate positions related to the animation speed in the move? If you see his motion here: https://youtu.be/WjvD3C_nvBk?t=172 he's only repositioned if his animation frame changes, which takes away some of the "glide" effect that smooth motion adventure games have. AGS had/has an "anti-glide" setting: http://www.adventuregamestudio.co.uk/wi ... oAnimation Is this something that can be done with moveto, presumably by using delta?

  • I don't quite understand what you did with those events and the "but" variable. Best I can tell you're setting it up so it controls when the scroll buttons can be used.

    If it helps here's the capx I did to figure out that expression above and work out how things could be simplified. As I said I didn't understand that bit so I did it a different way.

    https://dl.dropboxusercontent.com/u/542 ... y_mod.capx

    I think I was trying to figure out which page the player was on and set the height, but I couldn't work it out with maths so I used some silly variables, I really appreciate you simplifying this!! I estimated it could be done in under 30 events but you took it down to 19, wow!! <img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked"> <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    I really appreciate this, I'll update the main post with this version!

  • R0J0hound

    Having a slightly hard time working this one out:

    I need to figure out the X size of the array dynamically, at the moment it's kinda hard coded and I need to work out how to test for a change in the size of the array to correspond to the pages/slots?

  • This will give you the maximum scroll value:

    max(0, ceil(count/4)-2)

    If you're setting the animations like this:

    For each inventorySprite

    --- set animation to array.at(loopindex+scroll*4)

    Just a quick heads up to thank you, I'll be implementing it as soon as I figure out what the hell I wrote last week!

    EDIT: Seems to work so far! I'll add the other shortly...

  • Why dont you just write in events what you think ?

    https://www.dropbox.com/s/faxsqtisyypfl4f/ntr.capx?dl=0

    Dont give me hell for the search time for completely locked up tiles. You was warned.

    Well, that works perfectly as far as I can tell, thank you! Sorry if I've been too fussy, I try to find things out by myself, but I'm really useless at intermediate programming, I spent 2 years reprogramming a webforum system with tons of help from a community, took me 60x as long as any kiddiescript coder, but I did it in the end and learned a lot!

    I mean, I'm just trying to find the perfect engine for pathfinding for an adventure game, and all this great stuff is being shared with the community, which to me, is the whole point, for as many people to benefit from an idea as possible, and you've been single-highhandedly invaluable for helping me do this, and I really appreciate it! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    I tried earlier to find a place to figure out the equivalent of "if player is on the same tile, and therefore no pathfinding is being checked, MoveTo: mouse.x/mouse.y" to allow for pixel precision movement at any tile size, it probably would be nice to be able to go to the exact pixel clicked on within the tile, but I don't think easystar logs that info, just the tile, or am I wrong?

  • They have no free spot on a vert or hor position.

    Cross the two 'loopindex("..") = 0' conditions in event 11 to have the diagonals available.

    That will also mean that they are taken into account when calculating/choosing the shortest path.

    Up to you if you like that or not. The results are very different. I did not like it at all in a example that i made.

    Also, it will be slower. In the end, when you dont limit the search tree (and that is ALWAYS true), you end up checking to many possibilitys.

    It is not a case of finding the shortest available walkable tile to the click position, that is pretty easy, you can do that on your own.

    The case is to find the shortest available walkable tile that can be reached.

    So, if you got a clickable tile buried deep down, and you want to check for every walkable tile arround it (dont matter how far away) if it can be reach and if it is the closest reachable, your search tree goes deep and exponential in amount of choices.

    But that is up to you eh.

    Now it checks just hor and vertical (4 tiles) in a simple loop. Whatever loop you want to choose will work (in exponential longer ticks).

    I understand, now doing this allows for something to happen when clicking a buried tile, but the player is now offset by a tile, usually diagonally? Is it possible to have the player arrive at the same tile as clicked whilst also checking buried tiles?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, i do.

  • 99Instances2Go

    Any ideas why the tiles sandwiched between tiles aren't working?

  • Tried on a 2 x 2 tile. Works perfect. But. It drops in FPS with a big size tilemap, which is understandable.

    Really? I tried that and clicking on the unwalkable tiles doesn't work anymore, it only works when you click walkable tiles, which I assumed had to do with the size of the array or something?

  • Magistross is there a way of smoothing nodes so the tiles dont cause a gridded/quantized motion? I think it's possible, if i'm not mistaken, using lerp?

  • 99Instances2Go Also, can I adjust this so it works with smaller tile sizes? It doesn't seem to work on really low tile sizes?