dop2000's Forum Posts

  • Is this a platformer game? Using Solid behavior with moving player and enemies is not a good idea. I would probably do this with events instead, using "is overlapping" and "is overlapping at offset" conditions.

  • You mean like a decreasing timer/energy bar?

    Or you draw the line across the bar and cut-off pieces of it?

    You need to provide more information.

  • There are 4 or 5 great tutorials on multiplayer plugin by Ashley and they are a must-read! Start with this one:

    scirra.com/tutorials/892/multiplayer-tutorial-1-concepts

    Also, check out other tutorials in the Networking section:

    scirra.com/tutorials/top/page-1

    Here is one example with a lobby:

    scirra.com/tutorials/1003/tic-tac-toe-part-3-multiplayer-with-a-lobby

  • Maybe the area you think is transparent is not really transparent. (maybe it's white or black or semi-transparent)

    Use "Browser Log canvas.alphaat(x,y)" to check alpha value in different points.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • R0J0hound, well, OP never explained what he needed this for. Based on his question if he could use 1px sprites, I assumed he wants to generate something like a solid terrain from custom images.

  • If you want the gravity to be constant, then on collision increase bullet speed. For example:

    set Bullet speed to (Self.Bullet.Speed*1.5)

    If you want to change gravity:

    set Bullet gravity to (Self.Bullet.gravity*0.75)

  • One of the ways to fix this is to add an invisible sprite ShipBase. This will be the object that player will be controlling, so move Drag&Drop behavior to ShipBase sprite. Also move the "Bound to layout" behavior to ShipBase. Set ship position to ShipBase on every tick.

    When you attach other parts to the ship, adjust ShipBase size accordingly, so it would always cover the entire ship.

    .

    If your ship is irregular shape (not rectangular) and it can rotate, then the above method will not work. In this case it may be easier to add several frames/animations to the ship sprite for different ship configurations. For example, first frame for ship with no attachments, another frame for the ship with attached weapons, another frame for the ship with attached engine, another frame for both weapons+engine attached. The image in all frames can be the same, but the size of the frame and collision polygon will be different.

    Here is an example:

  • You need to paste the red image to canvas object. And then use alphaAt or redAt expressions to detect the shape of red image.

    See this demo (you need to install Canvas addon for it):

    dropbox.com/s/u95o1fwrdcz7if7/CustomShapeObjectWithCanvas.capx

    .

    Note that this method is quite slow and only suitable for small images. To improve performance, use bigger tile size (2x2, 4x4 etc.)

  • System compare two values

    mid(text, index, 1) not equal " "

  • Remove/disable everything and try this simple code:

    Is touching LeftButton -> Player simulate pressing Left
    
    Is touching RightButton -> Player simulate pressing Right
    
    Is touching JumpButton -> Player simulate pressing Jump
    

    If it works fine, then you can add sub-events to each of those 3 events, in which you can check if player is on the floor and change animations if necessary.

  • And why do you need to do that?

    If the red area consists of 3 rectangular sprites, it's farily easy.

    If it's one sprite, you will need to define its collision polygon, and then it will be possible to fill it with small sprites or tilemap.

    If you can't change the collision polygon (for example for images loaded at runtime), then you will need to use Canvas plugin to detect pixels.

    .

    Having thousands of 1*1px sprites is a bad idea, it's better to use tilemap, see examples in this post:

    construct.net/en/forum/construct-2/how-do-i-18/simple-scorched-earth-worms-ga-129595

  • Why do you want to do this? If you need to change the color of red area, there are much easier ways - you can use "Set color" effect or blend modes.

  • Use "Is touching object" events to move left or right and "On touched object" event to jump. Also, I suggest previewing your project in Chrome, as Firefox doesn't work well with multi-touches.

    See this tutorial:

    scirra.com/tutorials/4973/multi-touch-movement-controls

    .

    If all of the above doesn't help, please post your capx file.

  • Also, to make the final part of the lerp faster you can increase the destination value a bit. So if you want to zoom from 0.5 to 1, instead of this:

    set scale to lerp(layerscale, 1, dt*10)

    do this:

    set scale to min(lerp(layerscale, 1.1, dt*10), 1)

    lerp will be changing the scale to 1.1, but the min() function will stop it at 1.