R0J0hound's Forum Posts

  • justifun

    I think the version of chipmunk used is just kind of spongy. The only thing you can tweak is "space iterations" but that has no effect on the sponginess there. It won't be as spongy if you move by changing velocity or even better acceleration I suppose, but that may not always be possible.

  • SamRock

    0,0 on the map goes to 320,240 in the iso view. Do you either have to move the map or change the scroll position to a better center location.

  • It's 12500 pixels/second^2. You must be setting a max speed to the behavior otherwise the platforms would keep going faster and faster very quickly.

  • I've never tried it but it should be like what I typed, just tweak the numbers I suppose. However from the sound of it it doesn't work, but no matter, it was something to try.

  • Neither, they are the same.

  • Apart from shrinking the collision polygon you pretty much need to make your own collision detection.

    This is really only relevant for boxes though. If you're using a grid you can use an array to lookup collisions. Also you could do manual collision detection with integer positions. I've used that before for a retro platformer where I wanted the player to fit perfectly in passages his same size.

    The sizes needed to be even, or as long as the the edges of the sprite were on integer positions you could test for a collision with:

    bbright > wall.bbleft

    bbleft < wall.bbright

    bbbottom > wall.bbtop

    bbtop < wall.bbbotom

    and then objects right next to each other won't count as overlapping.

    Apart from that I've done stuff like

    set size of everything a little smaler

    check for collisions

    put the sizes back to normal

    or

    if the hotspots are centered you could do a compare right after the overlap condition.

    abs(sprite.x-wall.x) < (wall.width+sprite.width)/2

  • digitalsoapbox

    No plans really. It's rather involved and I lack to time to do it currently. Basically it takes understanding C2's renderer at a low level and reworking it in a drastic way. Previous attempts have run into a few issues:

    * I wasn't able to get all the parameters passed to effects to be correct. I mostly understand the math the renderer uses, but none of it is useful for me, since i'm not dealing with screen sized or screen oriented rectangles.

    * Multiple effects are done by juggling multiple textures, aka sprite with first effect is drawn to a blank texture, then that texture is drawn back to the screen with the second effect. More effects are done in a similar way, but at most I think only two temporary textures are ever needed. C2 does this easily by keeping some temporary textures the size of the canvas. For this plugin the size of the temporary textures depends on the size of the paster object, or basically each paster object will need 3x the amount of vram. Creating the temporary textures only when needed or trying to share a pool of them shared between all the paster objects were some ideas, but is more complex.

    Anyways, unfortunately I won't be doing it anything soon.

  • That may just be a limitation of the debugger that "on key pressed" events still run when paused. Functions are actual triggers that will run right when you call them, but they won't be called when the debugger is paused.

    I do not know with your second question. I do not have much experience dealing with input while in the debugger.

  • Increase the friction value on the boxes and the floor.

  • "svchost.exe" is a part of windows that runs services. Services are things that runs in the background, the audio playback service, printer service, networking service, etc... Basically it's mainly essential windows stuff plus services added by other software.

    Html will never deal with that file, and in fact cannot access it in most browsers, let alone with javascript. But that isn't javascript, it's vbscript which is a windows thing.

    Anyways C2 does not generate that stuff in it's exported html, which means something on your pc is putting that in the file. It's probably a virus/tojan/spyware/etc of some kind infecting your pc. That html probably tries to run something on your computer that's encoded in that hexadecimal string. Good news is it probably only does something if run from iexporer. Well, if you can call that good news.

    Your solution is to get an antivirus to clean your computer, and/or have someone tech savy that you know help you.

  • The bullet behavior has a property "set angle", set that to "no" and the rotate behavior won't change the angle of the bullet's motion.

  • totoyan

    You probably should create a new topic for the issue. This topic is for Construct Classic, not Construct2. That said if you exported game is getting that in it then something is amiss with your system since C2 never creates code like that.

    Look into getting a antivirus or other such software to clean your system, if the exported html gets that in it then something infecting your pc is putting it there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use the rotate behavior.

  • C2 considers a sprite mirrored if it's width is negative, so you could use (sprite.width<0) in your expressions to see if it is mirrored.

  • Hmm, I seemed to have missed your last reply.

    The math is the capx is simplified for just horizontal ground. The first step would be to make it work with any angle. Actually you can do this by taking the velocity and using a dot product with the angle of the surface to get perpendicular and parallel velocities that can be plugged into the equations already there. That covers getting the bounce math to work.

    Next the collision detection and resolution would need an overhaul. This is what keeps the football from falling through the floor at low speeds and lets us know when to bounce. It is also what gives us the point of collision. Right now we have oval vs horizontal line working. New would be oval vs any line. The math there isn't too pretty which explains why ovals aren't usually a common shape in physics libraries. Also you'll need to work out the formulas. Either that or use the iterative approach.

    Ok, next we need oval vs oval collision detection. The simplest solution is to convert the oval to a polygon first. Then you'd take the two ovals and see if they overlap. If they do we need to separate them till they collide at only one point. The two ways to do this is to either move backward in time to they just touch, or use something like SAT or GJK/EPA to move them apart.

    That just covers the simple case of only one moving oval and everything else is static. For collisions between two moving objects the bounce math now needs to use the relative velocity (Va-Vb) between the two objects instead of just the velocity of one. Otherwise the stuff above is more or less the same.

    One caveat is when there are multiple objects that need to be pushed out of each other, then correcting one pair can push them into other objects. This is usually solved by repeating this check multiple times to reduce the amount of objects overlapping. You'll also want to make collisions faster by checking if the object's bounding box is overlapping first, before the other more costly oval-oval collision check.

    In summery you will be creating a full blown physics engine. I have roughly outlined one approach, but there are many tweaks that improve speed and accuracy.