R0J0hound's Recent Forum Activity

  • Why is 5mb too big? You can't split that file but you could do your own level file format and load that as needed with Ajax.

  • I think you need to detect which side is being collided with for it to work right.

    Maybe you could do something like this?

    Sprite on collided with tiledbg

    Sprite.y<tiledbg.top

    Or

    Sprite.y>tiledbg.bottom

    bounce vert

    Sprite.x<tiledbg.left

    Or

    Sprite.x>tiledbg.right

    bounce horz

    A more robust way could be to compare angles like

    Angle(tiledbg.x,tiledbg.y,Sprite.x,Sprite.y) is within 45 degrees or 0

    bounce horz

    Anyway just some ideas

  • Seems to be a general problem with destroying objects with this behavior. Not sure when I'll have time to really break it down and see what design flaw I used.

  • You can do this already.

    First select all the relevant events.

    Then right click on the selection and click "replace object".

    It will then let you pick the object to replace and what to replace it with.

    There are restrictions though. Like you can only replace sprites with sprites or tiledbg with tiledbg objects. And if any of the events access a variable or behavior, the object you replace it with needs it too.

  • I did a game like that a while back here:

    https://dl.dropboxusercontent.com/u/542 ... 9tile.capx

    It could be simpler but i was going for a dragging mechanic.

    korbaach

    I solved that by starting with it solved and then having it do 100 random moves or so.

    ajvar23

    You can greatly simplify your capx in a few ways:

    * use different animation frames instead of different sprite types.

    * only position detectors around the sprite you tap.

  • shinkan

    Well, with webgl on it uses the same drawing method that sprites use, and it is two triangles.

    Oh wait, if you're trying to do perspective it won't look right because there is no z.

    The picture here sums it up:

    https://en.wikipedia.org/wiki/Texture_m ... orrectness

    So basically the distortion only looks right if opposite sides of the quad are parallel. Something like a skew would work, but not if you do a trapezoid shape.

  • shinkan

    That's when webgl isn't used. The canvas workaround draws as two triangles and the anti-aliasing causes the seam.

  • For the infinite background portion you can just move a tiledbg that's a bit bigger than the screen so you always see it.

    Here's an example for horizontal scrolling:

    https://dl.dropboxusercontent.com/u/542 ... ledbg.capx

  • To make it smooth like that you need to create sprites in the in between locations so it looks smooth. But that can be a lot of objects for a long trail so you'll probably want to tweak it to a point it looks good enough and is still fast.

    /examples30/smooth_trail.capx

    https://www.dropbox.com/s/d3711s0s2zhty ... .capx?dl=1

  • Just use the blend mode on the objects, not the layer. Then set "force own texture" to true for the layer.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What about textures skewing, distortion etc... is this still a thing? if I remember correctly it should be possible only with webgl2, right?

    It's possible with webgl now, even C2's webgl renderer can do it, although the canvas render can't as of now. Which is why it's not a feature currently.

    I've utilized it in the draw textured quad action of my paster plugin, but had to use a workaround to make it work with canvas.

  • The procedural portion of it is easy. you can think of the whole cave as just a polyline since the top and bottom walls turn at the same x position. So then you just need a bunch of random y values. The visual part of it just needs some way to draw a polygon (canvas or paster plugins can do this).

    Here's one possible example:

    https://dl.dropboxusercontent.com/u/542 ... hrink.capx