BadMario's Forum Posts

  • Circle ignores the object's collision polygon if any, and for the purposes of Physics collisions considers the object to be a circle.

    That doesn't really tell us that much. Where exactly is this circle, how is it calculated? Does it use the bounding box then does the math to figure out the radius ( 1/2 of the width of the bounding box for example )? Or is it something else?

  • You can add a second set of points and let a car choose to switch or remain on its current path to that set when at intersection. That will give you more variety

    The rest of the logic should be the same, just switch from pointA to pointB path

  • A bunch of invisible sprites all over the roads then set cars to move to those and turn towards those.

    Every time it reaches one of those ( at an intersection for example ) make it choose another one that is straight, left or right and move toward that one.

    Then each car can choose these. Avoiding car collisions will require more thinking, depends how far you are willing to go with it. May be faster to use timelines even if you have to do one for each car.

    I am wrapping up a top down racing game, so I do not have to deal with intersections, but creating realistic car AI where cars moving at different speeds go around each other and behave realistically if they do crash into each other is not something you can do easily.

  • Do you know which one performs better: sprite-fonts or text-objects?

    Never tested it, but for me text objects are a no go at this moment. I don't really need to display a lot of text in my games and since in my case text objects cause crashes I see no reason to use them.

  • Not sure if this helps you, but you do mention text objects.

    I have had about 5,6 games where it was definitely text objects causing crashes, from game not loading ( black screen ) or going into a couple layouts only to crash or just remain black when reaching the main game layout.

    In almost all instances removing text objects that were on screen resolved the issue. I just had a game do this today. Worked fine, then I added a text object for some debugging, black screen, remove it and again all was well.

    I only use sprite fonts now.

    I have to add that all of these games are done in Construct 2 and only exported via Construct 3 using runtime v.3. Construct 2 exports work fine.

  • Why not. That is the standard way of doing it. Figure out which platform they are on, then if abs(enemy.X) > platform.Width/2 reverse direction. may need a little offset, a few pixels so they do not fall off if they actually go over the edge

    abs(enemy.X-platform.X) > platform.Width/2

    With Construct you may need an instance variable on enemies to set to this calculation

  • You do not have permission to view this post

  • Seems like you want a lot more precision and realism than I need. I will have music on top of everything, so for my purposes it will do.

    Hopefully you can solve it somehow

  • Actually, I just had a chance to try it and it may work, it is pretty simple. Every tick adjust playback rate based n speed., so my max speed is 600. audio set playback rate to 1-(1-mycar.Car.Speed/600)

    Just play around with it. In the case of what I posted it will go from 0 to playback speed of 1, meaning at full speed you will have the normal sound and at slower speeds it will sound lower,deeper

    I would insert some variables in there so when playback speed reaches certain points it triggers gear changing sounds. You can also use lerp/unlerp to make the pitch go up slowly then speed up

  • I've been working on a top down racing game and I have about 4 files of engine sounds to vary different speeds and 4,5 files with gear change simulation. Right now I am only using gear changing at the start and end of races , the rest of the time I am simply looping those 4 different engine sounds with a kinda trancy music on top and I may just leave it like that.

    Without the music, though I get exactly what you are saying. Sounds bad and I think the only way to do it is with different files. I don't think Construct's audio manipulation is sophisticated enough to manipulate a single file ( maybe I am wrong, should play around with playback rate to find out )

    In older flash games, I had a setup with one file for each gear and switching gears sounds, so just trigger each depending on car's speed. But you have to create those engine sounds that raise in pitch and other details.

    I think having a nice soundtrack on top and engine sounds in the background works well and is far simpler, and who doesn't like good driving music?

  • I've seen some weird stuff there too ( in some variations of these formulas ). Speed not decreasing at all despite being multiplied by 0.99

    Well, like I said in the original post, feels like a hack, but this works in my game, v-synced or full frame setting

    lerp(speed,speed*0.99,1-0.0999^dt)

  • That is what I had originally, but in 2 actions

    object.X = object.X + speed*dt

    speed = (speed*0.99)*dt

    Tried a couple of variations and your example, does not work

    The second way you wrote it does seem to work at 60FPS, but it does not work at full frame setting. I think 0.99 needs to be dtimed somehow, otherwise you are multiplying by 0.99 twice or three times as fast at full frames setting

  • I got things to work, but in a different way, so I am curious what the correct way is to use delta time with multiplication like this. Should have been simple, but it did not work.

    ObjectX = ObjectX + speed dt here is basically Object.X + speed*dt or (speed*60)*dt if redoing an older game that used speed that worked at 60 frames per second without using dt.

    Now I want to simulate drag so I decrease speed every tick by multiplying it by 0.99

    speed = speed*0.99 So what is the correct way to use delta time here?. doing things like 0.99*dt do not work.

    Anyway, I got it to work with something like this lerp(speed,speed*0.99,1-0.0999^dt). It does work, but it just seems like a hack that should not really work

    Just to add. You have to test it with this new beta feature and run full frames, not v-sync

  • The performance of the Apps is far much better than android making it easier to create Apps that need performance, also the colours display is super, I find much easier to create Graphics for the Game Design on iOS than Android

    Hmmm, no, absolutely not true. Maybe if you compare a $1000 iPhone with a $300 Samsung, but if you compare iPhone with similarily priced Samsung it definitely does not look better. My 4 year old S6 Galaxy still looks better than most iPhones to me, although this is obviously somewhat subjective.

  • Yeah, still easy to forget this is a different situation than playstation or Nintando

    If you have a minute, can you try this game on 60hz and 144 hz and see the difference

    http://www.deusx.com/hrd/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads