Good evening, beautiful community!
Here I have another issue that may have a simple fix, but it's just something that my head can't figure out at this time of the night! What I am developing is some sort of infinite jumper - YES, I used the built-in "Infinite Jumper" template as reference - but with my own twists.
- To limit the spawn of some 32x32 platforms to be WITHIN the window's width only. <font color=red>Current problem:</font> Everything spawns great on the Y axis (every 32px up), but on the X axis it sometimes ends up spawning continuously outside the viewport.
- To make the platforms spawn on the X axis either by exactly +32/+64px, or -32/-64px of the previously spawned platform. <font color=red>Current problem:</font> The way I approached this was by saving the recently spawned platform's X in a variable (NewPlatformX) and telling the next one to spawn random() (like in below's pic). It works, but not the way I want - duh!
<img src="http://i60.tinypic.com/211utyh.png" border="0" />
Hope that covers my bases and that it turns out to be a relatively simple fix, but right now, like I said, the night isn't helping me.
Thanks in advance!