Random spawning platforms with no timers! possible?
WilliamHWJ
Member Posts: 5
in Tech Support
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
What's the problem with timers?
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Simply add an offset into the spawned actor to compensate for the size difference.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
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.
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.
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