R0J0hound's Forum Posts

  • Something like (Scrollx-originalx)*0.5 for horizontal parallax. Vertical is similar. Replace 0.5 with the whatever rate you want.

  • Shadowblitz16

    Have a look at the "paste object" action, it will draw another object to the canvas in the same spot it is overlapping the canvas.

  • justifun

    First you need to make the box movable.

    velocity way:

    set velocity to rect((mouse.x-sprite.x)*10, (box.y-box.y)*10)

    and set it to 0 when not dragging

    acceleration way:

    Keep the box from falling from gravity with:

    on box prestep

    --- apply force rect(0, -gravity*mass)

    and give the box a max speed at the start of the layout.

    then to move:

    apply force rect((mouse.x-sprite.x)*1000, (box.y-box.y)*1000)

    and when not dragging give a slowing force.

    apply force rect( -velocityx*1000, velocityy*1000)

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.