How do I create meaningful spawn timers and windows?

0 favourites
  • 3 posts
From the Asset Store
Get Ready for the New Wave of "Bottom Screen" Games!
  • I've been playing around with this for a hot minute but I can't seem to get this one right. I am making an infinite runner game and I'm almost complete. I'm just trying to get these trees to spawn in a meaningful way, where it's simplistic in the beginning, and progressively gets harder. I think the simple ones are working out well, but once you get to the first loop, the game launches all the things at you the first moment it can.

    I've played around with the timing of these windows and sometimes it does come out okay, where the trees are spaced apart well and it feels good, but other times they are either too clumped together that they are right on top of one another, or they're so far apart that the player cannot jump over them. I thought about adjusting the jump height/float but I don't want it to be Super Princess Peach runner. Any ideas how I can take the code that Rojo has provided here and make it feel better as a player?

    Since meaningful is a subjective term, I will tell you I am looking to have the trees spawn as close as right next to each other, but never far enough apart that a jump won't clear it. I'm using platform controls with the standard jump height if that helps at all.

  • I've decided to forgo this for now in favor of releasing the game as is. What this means is that it's a bit more simplistic than I'd like, but, at least it's done and complete. Maybe I'll come back to it later when I have a bit more experience with the software, but for now, I'm going to hang up the hat on this and be done. I will still take suggestions from the community if you all have any.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One idea to avoid the trees being clumped too much is to use a single nextSpawn timer for all of them. That would let you specify the min time between trees. You’d just have to rearrange things so a random tree sprite is created.

    The other idea to only allow trees to be places so that it is actually possible to jump over is much harder. A rough idea would be to simulate the path of the player jumping and see if it can clear the trees and land. Might be able to simplify that with a calc of how far before a tree you have to jump and where you’d land after, then combine them somehow. Probably would need to add some tolerances to allow for reaction time and variance from the engine. Anyways could be a rabbit hole of ideas to try.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)