HadesDC's Recent Forum Activity

  • I am trying to get the timing right to make a monsters body segments follow its heads path. like a snake but in all directions. I need a way to account for any frame-rate by using dt but I don't really understand how to get it right....

    [attachment=1:1yervzs3][/attachment:1yervzs3]

    Can I make these wait commands frame-rate independent?

    The timing needs to be perfect otherwise the whole thing falls apart.

    .capx attached

    Also side note: If I use dt in a "On Start of Layout" event does it not work right? I did some testing with a textbox to see if that was so and it seems to not like taking any dt values on the first tick

  • If you don't understand Ticks or "Frames" do some reading on it because it will save you hours of headache. I just figured this out (Still new to Construct 2 and Game-making in general). This is ESPECIALLY helpful if you are trying to ensure perfect movement of a Sprite or other precise operations that will fail if they are off by a single tick (Which is guaranteed to happen if you use time since frame rate (ticks per second) will vary over the course of gameplay).

    This will make an event trigger every 10 ticks:

    [attachment=0:pe01ub3a][/attachment:pe01ub3a]

    DO NOT try to time these events using seconds or dt (duration of most recent tick in seconds) in the event conditions as they are always changing and different.

    P.S.

    Is There a command to make an event stop at a wait action for 10 ticks and start again? I tried using dt but it almost seems useless since it is not constant. Per tick is the only reliable method i have found so far and its complicated to implement per tick. Does "Wait 10*dt" always everytime start to execute the below again after 10 ticks? or can it be off?

    Thanks Have a Nice Day

  • ooooooooooooooooo just got a brilliant idea. I'll just make them run into that black stick i have on the head that I was just using to see if they were straight and when they touch it set their angle along the sticks angle!

    p.s. tried using the same 60*dt here is a .capx ..... if anyone cares lol.... which shows the movements. they all line up but they aren't lining up on the stick so ill just force them to....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is a .CAPX that better shows the issue. I don't know if it is a bug or what but the times given to each segment are different. Can I control this somehow? can I set the ticks per second to a constant amount? each 60*dt value seems a bit different. If I just use the first dt value for all iterations will it matter or do the ticks still bugger it up since they arn't constant?? ill try that next...

  • **keeping the .capx updated as I progress in this reply. Disregard my replies below.

    Hello this is my first post. I am new to the construct community but am very interested in the software and what it has to offer. I can see myself purchasing a license in the future and hopefully sharing some games with the world.

    I have spent very near 12 hours trying to figure out how to get one of the bosses I am designing to move as I imagine him to. He is a series of balls like a caterpillar or snake. The head will guide the body by randomly changing directions and turning around when hitting a wall. My problem is getting the segments of the body to follow the path that the head has moved exactly. They can’t be off by a pixel (well okay maybe one…).

    Movement requirements:

    *** Must accept any angle change, at any time, at any speed and have every segment move in the exact positions the head moved in.

    I have my best attempt in this .CAPX file attached. This is a very very simplified version of what the boss will be but that seems to be the best way to iron out the kinks. If I can get it to follow this simple path I can get it to follow a more complicated one.

    Here is a link to a similar (okay I totally ripped it off…. But whatever it’s such a fun boss) Boss from Zelda a Link to the Past (Best game ever made): youtube.com/watch (Notice the precise movement of the body).

    Important points:

    - I do not want to use to PIN object to hold them together (tried that it was a mess… too unpredictable).

    - The head can change angles whenever it hits a wall so a set time will not work it must be able to handle a direction change after 4 seconds or 0.2 seconds at any time. (I attempt to pass along the time travelled in any direction as well as the angle to travel in that direction using variables. I believe problems arise when a variable is changed before a segment can get its hands on it to know where to go. I don’t know how to fix this problem).

    - The boss will change speeds too (This Test has him moving at 60 bullet speed (60pixels per second) since that’s the frame rate construct runs on my computer which makes any time*dt easier since its always multiples of 60).

    - I’ve tried using “move forward X pixels”, bullet behavior, and some random things I’d rather not repeat… Bullet behavior seems to be the most reliable and looks like it could work (If I can get the angles and times to the segments before they are changed.

    Sorry for the long post and complicated question… Maybe I just needed a break from trying to get it to work heh but if someone knows of anything that would fix this I would be VERY happy.

    - Thanks

    P.S. There are some array based “Classic” Snake Game tutorials I have seen on the forums but they are too simple and aren't much help in recreating the Moldorm (Zelda Boss) movement in Construct 2.

HadesDC's avatar

HadesDC

Member since 26 Jan, 2015

None one is following HadesDC yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies