ErekT's Recent Forum Activity

  • Like the title says. I'd like to be able to get a condition to trigger if variable X is an odd number. I seem to remember that there's a way, like if you have the number 73 and do some math magic stuff you get 1 returned while if it's 74 you get zero. I can't remember how though and I don't have the brainpower to figure it out by myself. Any help much appreciated

  • Hey everybody!

    I'm implementing a downward dash move from mid-air using the platform behaviour where players are supposed to be able to break objects beneath by shooting down like a projectile. I tried using VectorY for this and it works insofar as the player shoots down and gets obstructed by any solid objects beneath. But if I try to use the Is On Floor condition to check if they're on ground the check fails. It's like they're not touching the ground at all even though the two objects are obviously in contact with each other.

    Changing gravity instead of VectorY works fine with Is On Floor, but then I lose control over acceleration so I'd much rather stick with incrementing VectorY for the downward movement. Any suggestions?

    The event structure goes like this:

    System | Chr.Platform.VectorY < 1400      | Set Platform Vector Y to Chr.Platform.VectorY + (7500*dt) 
                                              | Set Platform max fall speed to 1400
    
    *Chr | Platform Is on Floor               | Set Platform Vector Y to 0
                                              | Set Platform max fall speed to 700 (default)
                                              | Set Action to ACTION_ENDSTOMP
    [/code:bqdhobfm]
    * Never becomes true.
    
    Replace with Gravity and the condition succeeds:
    [code:bqdhobfm]
    <No condition>                                         | Set Platform Gravity to 5000
                                                           | Set Platform max fall speed to 1400
    
    Chr | Platform Is on Floor                             | Set Platform Gravity to 800 (default)
                                                           | Set Platform max fall speed to 700 (default)
                                                           | Set Action to ACTION_ENDSTOMP
    [/code:bqdhobfm]
  • Maybe this is the kind of thing you're after? Scroll down to Magistross's capx:

    You can set object timescale to 1.0 even if the rest of the world is at 0.0 timescale. Something like this in events:

    System | Set time scale to 0

    System | Set <yourtextobject> time scale to 1.0

  • I think I figured it out. I had been resizing collision on the collision object to roughly fit with the sprite object animation so when the object landed the collision hull itself got resized. I removed that and it seems to work no problem now. Sometimes I wonder if my brain is too small for game development

    Thanks for helping out

  • lennaert Thanks for the reply It's a good guess but it doesn't seem to be what causes the problem.

    If I set acceleration and deceleration to 0 when IsOnFloor is triggered then the object will slide along the platform until it either falls off the other side or hits a wall. That's to be expected obviously, but it'll *still* slide off the edge it lands near to in some cases. I'll post a couple of images to illustrate the problem better:

    Player jumps:

    And sometimes land just long enough to trigger IsOnFloor but *doesn't stay on the platform*:

    Acceleration/deceleration set to 0 on IsOnFloor:

  • I use a startup layout to create my global objects. This layout only ever gets run once at the start of the game. Maybe that's something you could try?

  • If characters with the platform behaviour land right at the edge of a solid or jumpthru platform they'll slide off it and fall to whatever's down further below. They'll touch the platform just long enough to trigger the IsOnFloor mechanism, which means they'll immediately start falling again but with the landing animation playing. This kinda ruins the feel of my game and I need to fix it somehow. I'm already using very very high values for acceleration and deceleration, 10000000000 or something like that, but it's not enough. Any ideas what to do?

    Sorry about cross-posting and stuff but I really need to find out if I have to write my own platform collision system and the Beginner's Forum doesn't seem to get much traffic so...

  • Hello.

    I'm using the platform behaviour with acceleration and deceleration set insanely high, 100000000000000, to simulate a kind of binary movement; either players move full speed or they don't move at all. No easing in or out. Works fine except if my characters land right at the edge of a platform they'll slip off it sometimes. That's not good. I need them to stay on the platform if they connect with it. None of this slippery slope business please. Has anyone else had this problem? Is there a way to fix it?

  • It's slower than NW 10.5 here too but getting relatively smooth performance at least. The occasional jank. Nothing big.

    The screen tearing though is ugly as balls. Isn't that what vsync is supposed to be for?

    [quote:k794pqf7]It would be awesome if Scirra made it's own custom desktop exporter. Or Monzilla made their own, google has a major tendency to ruin a lot of things.

    Yeah, dependency sucks.

  • 198 updates is practically 200. Come on now

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Browser.screenwidth & browser.screenheight?

  • Yo!

    Just to elaborate a bit on Aphrodite's explanation. Check these out:

    Imagine that the grid you see here is your target resolution, the one you want to scale your gfx up to. Four pixels; blue, green, yellow and red. So if you have four pixels you want to scale up to a target resolution of 12 then you'll have no problem since 4 pixels * 3x scale = 12. Three pixels per each original pixel match up nicely.

    But what if your target resolution is only a grid of 10? You can't scale 4 pixels up and make them fit perfectly within the 10 unit grid. So, what to do? You can either use go-between values to approximate the way it's supposed to look (interpolation), or just go with point sampling and skip rendering the pixels you don't have room for:

    Interpolation works pretty well but it'll blur everything slightly while point sampling makes everything distorted and ugly since the upscaled pixels have to be of an uneven size now. The third, and imo best, solution is to just use letterbox integer scale. You'll get black borders and stuff but eh, what can you do?

ErekT's avatar

ErekT

Member since 17 Dec, 2012

Twitter
ErekT has 1 followers

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies