oosyrag's Forum Posts

  • The memory footprint of images goes up exponentially as they get larger. A 100x100 image has 10,000 pixels, while a 1000x1000 image has 1,000,000 pixels.

    Note that for mobile devices especially, even though the resolution on modern devices is as high as monitors, the dpi density is also much higher. Basically even though it is high resolution, the physical screen size is still very very small. You can use much lower resolution textures, with scaling, and it will be much harder for an eye to discern the difference on a mobile screen versus a monitor, even if both the monitor and mobile device have similar resolutions.

    To further optimize, similar texturing techniques to 3d can be done in 2d with repeating backgrounds and the canvas plugin (optionally with effects as shaders). Use the canvas plugin to draw the shape, and layered repeating backgrounds to texture large areas of it.

    Edit: As with tiled backgrounds, by extension the 9-patch object can also be used in certain situations to lower memory use significantly.

    More traditionally, 2d games make very heavy use of tilemaps to reuse a set of textures over large areas. When that is still not enough, different tilesets assets are loaded and unloaded as needed (via layouts in Construct). This is usually done when areas don't have much in common and assets can't be easily reused or shared between the two, such as different biomes.

    Note that tilemaps are not only useful for terrain. With a little creativity, they can be applied in other situations as well.

  • Pick a random point near the player to move to instead of directly on the player. Use for each, so they don't all move to the same random location.

    For each enemy, move to player.x+random(-100,100), player.y+random(-100,100)

  • Force own texture on a layer will prevent blend modes from affecting anything on other layers below it.

  • The things that stood out to me include abrupt change in speed (instant deceleration) upon jumping, complete lack of bouncing when hitting flat surfaces, and staying in place on the circles, even when clearly off center.

    If you're looking to go the physics route, I would look into pinball examples and mechanics.

  • I recommend using invisible helper sprites on either side of your main sprite. Upon pressing a direction, the respective helper sprite gets "activated". If the helper sprite is in activated state and not overlapping a wall, then apply the "turn".

  • I was intrigued so I downloaded the game. I'm almost certain there is no physics involved. I would treat it more like a Sonic style platformer instead, with slope sensors (you can use the line of sight ray cast feature) on either side to determine acceleration.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You're looking for the signed angle, which you can then check if it is greater than or less than 0.

    construct.net/en/forum/construct-2/how-do-i-18/angle-difference-directions-87779

  • You're looking for the signed angle, which you can then check if it is greater than or less than 0.

    construct.net/en/forum/construct-2/how-do-i-18/angle-difference-directions-87779

  • Just because a layer is invisible, doesn't mean that it isn't interactable. If the buttons are in the same place, then you are hitting both at the same time. You then end up with a classic toggle problem - If A then B, if B then A - Both will run, resulting in A.

    Use else, or add the "layer is visible" condition to your button event.

  • Also check to see if stepping mode is enabled, if you're using a movement behavior.

  • Loopindex+1 instead of loopindex

  • Yes, use the date plugin expression date.now to get Unix time. Subtract that from your target Unix time. The resulting number is the number of milliseconds until the target time. Divide by 1000 to get seconds, 60000 to get minutes, 3600000 for hours, ect.

  • One thing to try is linking the new layout to the correct event sheet.

  • Lag between layouts is usually caused by the loading of textures into memory. Either reduce the amount of textures used in the layouts, or don't use layouts for anything you need smooth movement across. You can teleport to a different area of the same layout instead.

  • I'd try a different phone and/or browser, and look into filing a bug report on github then so they can proceed with a more thorough investigation.