R0J0hound's Forum Posts

  • Ruskul

    Nope, I never got around to it. What it would consist of is just what I posted here.

  • Hmm...

    One thing you could try is to use the "set minimum framerate" action to set it to 60. That way dt will stay at 1/60 instead of going to 1/30 at times. That should mostly solve the pixel step varying, but the game will slow on less powerful pcs. Dt will still vary a tiny bit so you may have the occasional instance where things will move 2 pixels instead of one. I suppose this can be tightened up a bit by doing like newt said and making your own movement system but that is really a last resort.

    Another idea to get things smoother is to only use speeds that are evenly divide into 60. 36 doesn't but speeds like:

    1,2,3,4,5,6,10,12,15,20,30,60 will give a more even motion.

    3

  • In your output it looks like the sprites are resized. The actual sprite size should stay the same.

  • [quote:2ap6k76q]Have another question now, since I moved the scroll to center isoView within the layout. How do I translate mouse within isoView to the map grid?

    ou can use the equation posted above:

    mapx = 0.5*x+y+iz-400

    mapy = -0.5*x+y+iz-80

    just use mouse.x(layer) an mouse.y(layer) for x and y.

    For pathfinding you can either try to shrink the grid size, use a grid based pathfinding plugin or do your own pathfinding with events.

    Searching for astar or dijkstra will give some event based examples.

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

  • Try Construct 3

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

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