oosyrag's Recent Forum Activity

  • Actually never mind, collisions only care about the bounding box. Have an example capx to look at?

  • Sounds like a browser issue. If it only happens the first time, try playing the sound once (muted) on start of layout?

  • Your player is probably not moving 1 pixel per frame, so if hes moving 9 pixels per frame at the point right before impact, he might be 49 pixels above the origin of worm (not overlapping), then the next frame he would be at 41 (overlapping).

    Otherwise, it might just have to do with the origin point of the worm not being all the way at the bottom of the sprite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can make a loader layout of sorts, I haven't tried it yet myself though.

    Sprites are kept in memory if they are in use on both the previous layout and next layout.

    You can take advantage of this by using the load from url action to preload assets gradually in an intermediate loader layout.

    This is mostly useful to prevent the "freezing" that occurs between layout when loading large amounts of sprites into memory. I'm not sure if this would help you regarding cpu use on start of layout if you're dynamically placing your terrain on start of layout.

    Are you generating the entire map in a single loop/frame? Maybe you can break it up into multiple frames by using a counter. Start by generating what can immediately be seen, and let the rest of the map generate over time.

  • This is actually a good idea, especially as you can stretch out the invisible helper sprite to prevent high speed projectiles from clipping through walls. You can also create interesting effects on your sprite without affecting the hitbox/colissions.

  • FYI - You might get quicker answers if you post to the "How Do I" section of the forums.

    When you use the platform set vector action, that is limited by the platform behavior's maximum speed and affected by deceleration. So however high you set the vector, it is capped and based on the deceleration he will end up stopping at around the same place. Try using a bullet behavior instead.

    As for the blocks... I have no idea at the moment. It works fine when I create a new project with just blocks and a player sprite. Your collision boxes look fine, and its not because of scaling (still happens even when the blocks are 100%).

  • lerp(a,b,x)

    a - Starting number

    b - Ending number

    x - The percentage amount between the start and end number you want to get (between 0 and 1, or 0% and 100%)

    So lerp(10,20,0.5) gives you 15, or halfway between 10 and 20.

    Allan gave a pretty good explanation of why it slows down above - basically when you use the current position as a start point, the lerp amount gets updated every tick to be smaller and smaller.

    Just going to give you a heads up though - lerp is generally used for more advanced gradual motion/inertia. If you're looking for simple straightforward movement, you would best be served by getting familiar with the Bullet behavior. The Bullet behavior is generally the go to solution for almost all linear movement needs.

    Alternatively, http://c2rexplugins.weebly.com/rex_moveto.html is a fantastic plugin that you might find useful.

  • All programming techniques come from math. Math lets you take numbers and transform them into whatever form you need, following rules that a computer can understand.

    But generally speaking, experience and practice will let you recognize what you can do in any given situation.

  • Export as images, import them as a Sprite strip.

  • Here is an updated one where you don't need a second array.

    It simply replaces all single values with a placeholder value "delete", and then afterwords loops back and gets rid of all indexes of "delete".

    https://www.dropbox.com/s/v4u712hdlvnns ... .capx?dl=0

  • It was trickier than I first thought.

    So it looks like deleting the index as you go doesn't work, because the loop index/current x doesn't match up anymore after you delete one.

    So I used a second array to "store" all the singles i found in the first index, then went back and deleted them after.

    https://www.dropbox.com/s/5r4ntrx41u6ia ... .capx?dl=0

    Unfortunately it doesn't work with 0 at either end of the array, because values that are outside of the array range are returned as 0s, so it thinks it is next to another 0.

    Edit: actually now that I think of it some more I feel like I've done this before another way. If IndexOf and LastIndexOf match, then there is only one of that value. I'll experiment a bit more...

oosyrag's avatar

oosyrag

Online Now

Member since 20 Feb, 2013
Last online 13 Feb, 2025

Twitter
oosyrag has 39 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies