Random spawning platforms with no timers! possible?

WilliamHWJWilliamHWJ Member Posts: 5

This is a question that I have asked before with no solution as of yet. I am developing an endless runner. The platforms are coming from right to left continuously one after the other. I've tried the Jamie Cross method which does give me appropriate spacing, but I can not randomize the platforms. T-shirt Booths spawner method works a little bit better, where I actually get randomized platforms, but because they are different sizes they over lap one another due to being on a timer.

It seems that the math cannot work with these two methods, and I do not know another way of doing it. Any help on this subject would be greatly appreciated.

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Simply add an offset into the spawned actor to compensate for the size difference.

  • WilliamHWJWilliamHWJ Member Posts: 5

    @jamie_c said:
    What's the problem with timers?

    The problem that I have with Timers is that when you have random, different sized actors being spawned one right after the other. They tend to overlap or have spaces where there should be none. This is because the Timer is set to one size actor and not the other.

  • SocksSocks London, UK.Member Posts: 12,822

    @WilliamHWJ said:
    The problem that I have with Timers is that when you have random, different sized actors being spawned one right after the other. They tend to overlap or have spaces where there should be none. This is because the Timer is set to one size actor and not the other.

    Then related the timer to the size of the actor.

  • WilliamHWJWilliamHWJ Member Posts: 5

    @The_Gamesalad_Guru said:
    Simply add an offset into the spawned actor to compensate for the size difference.

    That sounds like something that could help! When you say "add an offset into the spawned actor", how does this help and how do I accomplish this?

    Sorry if this is a simple problem. I'm a newbie. :)

  • WilliamHWJWilliamHWJ Member Posts: 5

    @Socks said:
    Then related the timer to the size of the actor.

    I was thinking the same thing, and I did try that! I had it timed to the length of one of my actors so that after if came on screen the next actor would spawn. But the timer was set to this specific actor. where the other actors were shorter. Causing overlaps and spacing.

    I tried two timers for the two different lengths but that did not work either.

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2014

    @WilliamHWJ said:
    I was thinking the same thing, and I did try that! I had it timed to the length of one of my actors so that after if came on screen the next actor would spawn. But the timer was set to this specific actor. where the other actors were shorter. Causing overlaps and spacing.

    I tried two timers for the two different lengths but that did not work either.

    I'm not sure what any of that means, sounds a little over-complex to me, I think you can keep it fairly simple.

    These are the three basic elements:

    1) An attribute.

    2) This attribute tells the platform how long it should be.

    3) This attribute also tells the spawner how long to wait before spawning the next platform.

    They are the basics of the system. Here's a quick example of what I mean . . .

    Link: https://www.mediafire.com/?2xr2csp5cccbacd

Sign In or Register to comment.