Jirka1111 Posted August 1, 2014 Share Posted August 1, 2014 Hello, my question is very simple. I have 10 platforms (each has different length) and I want them to run to the middle of the screen. But every platform has to be on that position before the next one. And each platform must be on its position before the previous. Generated position is random (between 100 and 1000 velocity). Link to comment Share on other sites More sharing options...
szocske Posted August 2, 2014 Share Posted August 2, 2014 I'm not sure I understand completely, but if you are looking to place 10 platforms back to back to cover the whole distance between two fixed endpoints, then you could generate just the 9 random numbers in that range, where a platform ends and another begins. Just make sure to sort them :-) Link to comment Share on other sites More sharing options...
Jirka1111 Posted August 3, 2014 Author Share Posted August 3, 2014 I'm not sure I understand completely, but if you are looking to place 10 platforms back to back to cover the whole distance between two fixed endpoints, then you could generate just the 9 random numbers in that range, where a platform ends and another begins. Just make sure to sort them :-)Thank you, szocske, I wrote that before I went to bed so probably you cant understand my question. I had draw an explanation picture of what I meant. http://imgur.com/tXgmQ9u Link to comment Share on other sites More sharing options...
wayfinder Posted August 3, 2014 Share Posted August 3, 2014 Just get the code from this: http://www.html5gamedevs.com/topic/7908-we-made-a-very-difficult-game-zoi/ You already have the idea. Link to comment Share on other sites More sharing options...
Jirka1111 Posted August 3, 2014 Author Share Posted August 3, 2014 I know Zoi and I was inspired by that great game. But my platforms are meant to be generated random. So no levels, just platforms with, lets say, same length but different speed. Link to comment Share on other sites More sharing options...
Recommended Posts