Arcticus's Forum Posts

  • Here's my input, sorry to butt in and all, but i used to make tick based games, granted i was no expert, but as soon as i found out how to use timedelta properly, i found my games were MORE accurate if anything else PLUS they weren't dependant on the refresh rate being a certain speed.

    With timedelta, you can do everything per second, how fast things move, accelerate or turn, or how long things take to do something, etc etc, i found i had a huge control over everything and knew the exact speeds and everything.

    Plus with time scaling, using timedelta just becomes even more fun!

    Everything just depends on how good your events are.

    After working with timedelta, i can't actually think of a need to use a tick based engine :S

    I'm sure it's been explained but there's certainly a lot of text in this thread

  • To emphasise my point, from the example i posted, try making the faster object a solid and delete the collision event

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • They will only both bounce if they collide when going opposite directions, if they collide whilst going the same direction it looks weird, which was my whole point

  • Hey everyone

    I've been working on one of my engines using the physics engine since it has been fixed recently, and i came across an error that never happened before.

    Basically, if my player character stands still for too long, you CANNOT get him to move BUT the X and Y components are still updating as though he were moving.

    Here's my current engine, see if you can tell me why he doesn't move if you sit still for too long, hopefully you can fix it and it's just bad coding on my part.

    http://www.mediafire.com/?nkdern9zaba

    (P.S. In this example, if you click on the player sprite and go to the animator tab, you will also see the reason why I would like multiple direction import options from the animation editor as well as preset animation angles and easier angle editing options, it took AGES to write all those in and then paste each frame in)

  • If i do it that way, only ONE of the ball objects bounces, what happens if you roll one ball slowly and then roll another ball faster into it?

    the fast ball does indeed bounce off the slow ball, but the slow ball doesn't just continue on its merry way as though nothing happened.

    What i was trying to point out in my example is that the bounces for the ball behaviour only seem to work well if it hits something, not if something hits it.

    It's not an entirely huge problem, but a ball behaving like a ball would be cool you know, newton's cradle and all that

  • and on top of all that, the one thing that would be almost finish off the ball movement, as this example shows, is something a little more realistic than the current way if it bounces off something that hits it from behind...

    http://www.mediafire.com/?arrvjeumvri <-- See

  • It works with other behaviors, it should work with ball too.

    But anyways, since it seems like i'm not going to be able to set the ball movements X/Y velocites, how does the ball behavior determine the angle of bounce?

    Because I've got a custom movement set up and I really need ball/physics type bounces but those are dam hard for me to code.

    Wouldn't it be cool to have some sort of generic 'bounce off object' type function, regardless of behaviour, where you put in the player object's X and Y velocites, and that of the obstacle (if it's even moving) and then construct does whatever it does to figure out the bounce direction for the ball and returns the new X and Y components for the player object which you would then have to store somewhere obviously.

    I understand this is a pretty flighty, unrealistic and almost fictional suggestion, but it would be cool to be able to do realistic bounces (as in those that take into consideration the shape of the sprite) to custom movements. I'm not sure how you would go about it since the X and Y velocites would be stored in variables so if that system ever worked you would have to find a way to return two separate values which you can then assign to whatever you want.

    If you're thinking, 'But Arcticus, just use the ball behaviour, it bounces fine', yes it does bounce fine, but not when it's angle of motion is fixed because of using varibles for X and Y velocites instead of editing the ball's X/Y components directly. Setting the angle of motion and speed i can do fine, it's the bounces that it stuffs up.

    Here's a little example of what i mean if you don't get me, it uses the platform movement only to show that proper bouncing whilst using the Set X component and Set Y component is completely possible, please ignore the odd direction of the platform bounce as it is not intended to be used this way:

    http://www.mediafire.com/?zr2keikuwnn

    Hopefully that conveys what I want

  • But the ball behaviour's X/Y components will change automatically upon collision would they not? whereas if i had to use variables i would have to find a way to calculate the new velocities

  • You sure? Cause if there was a set X/Y component, I wouldn't be using variables and wouldn't have to override the velocity.I would be adding a certain value to the component's current value, not setting it to a fixed amount. Making it, to my understanding, so the ball will still bounce off obstacles.

    So let's say when i press forward it adds 2 to my X component

    Say the ball object is travelling at an X component of 50, i press forward, it takes the current X comp and adds 2 to it, making my ball object travel at 52 pps

    Suppose then the ball collides with something, the ball behaviour, to my understanding then calculates the new angle of motion and adjusts the X and Y components, so let's say that after said collision, our X component is now -52

    I press forward again and it adds 2 to the X component again making it -50

    See where i'm going? This way, the current X/Y component is taken into account when moving the player. Is my thinking wrong? Did I explain myself properly?

    Otherwise i WILL probably have to make my own custom movement.

    The only problem I can see with making my own ball movment is I can't get the bounces and angle of motion after the collision as accurate as the ball behaviour does. As in, the ball behaviour seems to take into account the shape of the sprites, whereas i cannot find the shape of things using events very easily.

    Anyways thanks for reading and all the work you're doin

  • Sorry to ressurect this slightly older thread, I've been unable to use my internet for a long time. Thanks for the suggestion fantasyjam but i think what i want is slightly different.

    What i want to do is similar to the movement that i made in my super speed example in the 'your creations' forum.

    I want to update the X and Y components of movement every tick to give a controlled 'space' type movement. I can get the movement moving exactly how i want it to move, except i can't for the life of me code in the right collision code.

    See with something like:

    set angle of motion (0, 0, Xvariable, Yvariable)

    set speed to distance (0, 0, Xvariable, Yvariable)

    The movement works prefectly, until you collide with something, the ball/player just tries to keep going through the obstacle rather than bounce off because it's X and Y components of motion are fixed into variables rather than being updated upon a collision, meaning, so is the angle of motion.

    What i would like (semi pseudo code):

    Always:

    set angle of motion (0, 0, Ball X component, Ball Y component)

    When W(forward) is down:

    set ball X component to ball X component + (cos(player angle) * AccelerationVariable)

    set ball Y component to ball Y component + (sin(player angle) * AccelerationVariable)

    If i could alter the ball movements X and Y components directly, just like i can in platform or physics, i would still be able to get the spacey type motion but bounces would work perfectly fine too because the ball behaviour works out which angle to bounce at and changes the X/Y components accordingly. It would also open up more avenues for advanced ball movement controls, like what you're doing, you could easily make multiple gravity wells.

    I hope i made myself clear enough :S

    Anyway, to summarise my post, I'm begging you Ashley to add set X/Y components to ball behaviour!!!!!!

  • I'm at college so i can't check, but does the platform movement bounce? I'm really using the ball movement so i don't have to code realistic bounce formulas

  • I usually run it around 10x motion blur vsync, but i lowered it so it would be easier on other people's systems, I also left it on unlimited fps to demonstrate that it isn't a fake slow motion/super speed, the game is -actually- making the player move dam fast.

    For fun, you can change the global variable TimeScaleTarget at the start of the layout to like 0.000001 to make the player move ONE MILLION times faster than normal speed, it makes it look like you froze time. But I have experienced one or two crashes when doing this. I figure the one thousand times faster is still pretty impressive

    I would prefer not setting the time scale every tick even when there is no change in time scale but it returned inaccurate results if i did otherwise.....

    Also as a side note Ashley: The type of movement in this example is what I'm trying to make with the ball and physics behaviours, which is why I wanted to be able to set X/Y components for the ball. It works fine with physics (once the new engine is fixed . Personally I would prefer to do it all as a custom movement but the collisions are SO hard to code right, so I figure I will let the ball behaviour sort it all out for me.

  • Hey guys

    I been working all day on this one. It's a refresh rate independant example of messing around with timedelta and timescaling to create super speed similar to that of jedi knight.

    It's a little buggy still but I reckon it's cool as all hell (yes i realise the irony of what i just said...)

    Side note: I usually don't comment my files, although I know it's a good habit to get into, but i'm not so good at it, but I did this time just so you could understand a little better what it was i was doing, any questions or feedback just gimme a yell.

    Cap right here

    http://www.mediafire.com/?xn0gc2me2zi

  • I was originally doing something like that but what I found was, since i was using variables for my 'Xforce' and 'Yforce', it messed up the bounces pretty hardcore. The object was trying to push through obstacles rather than bounce off them since the X/Y components were 'set in stone' so to speak and it was hard to alter the variables upon collision to make the ball bounce off at the right angle.

    If you don't think it's appropriate to add them, that's fine, I guess I am using the ball behaviour a little differently than it should be used.

  • It does ask you to save, just at a different time than I expected.

    But after poking around with this close project bizzo I stumbled a across a bug.

    If you close the project from the project tab, the contents of the other tabs (with the exception of the animator tab i think) remain as they were when the game was open. Upon clicking on the items remaining in any of these tabs, construct crashes to the desktop.

    I have added it on sourceforge