Colludium's Recent Forum Activity

  • I've spent the last two years slooooooooowly learning how to do that AND how to program with C2, itself. Anyway, long story short, I appreciate the feedback and the suggestions. I need it so I can try things out and figure out what works for my ultimate goals.

    This is exactly the same boat that I find myself in. I've had a bunch of false starts and only recently found satisfaction with my sketch book project. I enjoy the maths and technical side of working with the c2 editor but it takes so much more to stick with it until everything is done to a good standard.

    More than happy to help!

  • Here you go - try L Race 1 because there are a few obstacles in the way for you to steer around. No forces, only manipulation of the car's velocity to accelerate at the car's angle, to decelerate when not accelerating (you would need to add to this to make it variable to whether or not the car is skidding), and to control the car's angular velocity if it's steering (same deal with respect to whether or not it's skidding). Hope this helps!

    link to file in dropbox

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • , I didn't mean to come over as if I was flaming the use-physics idea. I think I would also use physics to tackle this, just for the collision behavior between cars. I'll try and put together an example of how I would address the controls etc - either I would not use extra physics objects at all (and just manage the car's velocity and rotation by equations and variables) or, more likely - use a physics action object attached to each of the car's axle points (intuitively easier to manage the car's behavior, but I suspect that controlling skids, understeer and oversteer would be v hard).

  • I would rather see an exponential like interpolation being added.

    Yes! I remain perplexed that c2 doesn't contain a native set of tweening functions / behaviour.

  • I'll ask some questions while I humbly offer my thoughts - I hope this makes sense! Firstly - why use physics - is it to enable car bumping and the like on the track? If so, seems like a good idea to get around the problem of overlapping car sprites etc. I can't think of another reason to use the engine for this type of game.

    I see no point in applying forces to the car's wheels to make the car move. In fact, I see no reason in attaching the wheels as physics objects to the car by using joints - remember, it's a viewed from above racing game, so you can manipulate the main car sprite to achieve the 'being driven' visual effect that you desire without making it too complicated to manage under the hood.

    Also, rather than applying a force to the car, I would manipulate its velocity directly through events. Doing that won't kill the physics behavior but it will allow you more precise control over the car's velocity - like whether it goes where it is pointed, how quickly it rotates and appears to turn etc (so you can make it change direction on a dime or appear to slide - heading and velocity vector not the same, for example).

    I have no idea why it should veer to the left like that in the example - perhaps the wheel positions are not equidistant from the car's center of mass, which causes the gentle apparent turn. I also saw that collisions between the car and the wheels were not disabled, so all sorts of strange joint fighting could be going on between the wheels and the car's body...

    Just my 2 pennies' worth - hope it helps!

  • So - in a fit of crazy optimism, I have entered the game in the Green Light thrash-athon. I think I need to put some more work in - luckily I'm enjoying making it!!

  • - I agree with your calcs when using large lerp values. For the case A = lerp (A, B, X), the lerp equates to A = A + X * (B - A).

    So, the lerp won't work correctly if the value that is added to A (which is X * (B - A)) is greater than the difference between B and A ( which is simply B - A).

    So, X * (B - A) must not be greater than B - A

    So, at the max value for X the equation becomes:

    X * (B - A) = B - A

    So max X = (B - A) / (B - A)

    max X = 1

    I think it's a good lesson (for me, at least!) that care should be used when putting dt inside a lerp in this way, because an inadvertent value greater than 1 will cause unexpected behavior.

  • Somebody - it has been an emotional 30 minutes! I went from total confidence in using dt to a horrific realization that I had to go through my game and edit my lerps all the way back to where I started.

  • Ashley / Aphrodite,

    The use of a = lerp(a, b, z * dt) to compensate for variations in delta time is correct. I've just crunched an example to illustrate this in LibreOffice Calc. The lines in the image equate the results from using lerp with dt for fps values of 60, 72, 120 and 144. As you can see, the end result after 1 second at each frame rate is the same (well, the same within a value of approx 0.002).

    The x axis is number of frames, so the right hand side of each drawn line equates to 1 second of time, the y axis is the result of the lerp using cell value for B3, for example =B2 + (1 - B2) / $B$1 where B1 contains the fps value. I am not a LibreOffice guru and couldn't figure how to stretch the x axis for each line so they would overlap....

  • If you're using Chrome, it's entirely possible that this could be an artifact of the vsync non-adherence problem. Does the same happen when running on the 120 Hz monitor but in NW 10.5?

  • I agree. Android users don't seem to expect or wish to pay for apps, whereas Apple users are quite happy for fork out less than the price of a coffee on an app. Android development holds no interest for me because of this - I probably sell 30x more of my apps on iOS than I do on android.

  • Thanks GenkiGenga!

    Update: 48 levels now completed. Some are easy and some are quite hard. I've got lots of tidying to do - instruction screens and the like, then I think I'm just about ready to put it in a store! One more give to the beta test team and then my excuses start to run out. Gulp...

Colludium's avatar

Colludium

Member since 26 Aug, 2013

Twitter
Colludium has 11 followers

Connect with Colludium

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies