Random stuff
Aasimar
Member Posts: 74
Hi everybody!
I'm working on a platform game to learn GS, I think it's a good begining.
I add progressively features... movement, action, jump, shoot, interaction with decor, trap, etc.
Now I need to add some random stuff, like random platforms in a level.
And... here's my problem.
To do that, i have create a new project, because it's very difficult to debug.
I have a guy, he's static but animated, he can jump & shoot.
I have create many platforms, many sizes, they are not on my scene.
I have an invisible object, when he collide a platform, a random number between 1 and 20 is sent.
The number is send to the good invisible object and he spawn the corresponding platform.
I have create an object to the left who destroy platforms when collide.
All the platforms move to the left.
The Platforms isn't on my scene, it's the invisibles actors who's spawning my platforms.
I have create an invisible object who detect the size of a platform when collide and my idea was to add a random distance between that platform and the platform spawned and use min and max to be sure they can't collide.
And and and...
Wait for it, wait for it..!
It's good.
BUT I have 15 or 16 invisibles actors on my scene to do that stuff!
I think it's very bad for performances, and I hope somebody have a better idea to do that... I'm very new here and GS is not my best friend at this moment.. lol
This forum isn't a great help for the random function...
Sorry for my english.
S.
I'm working on a platform game to learn GS, I think it's a good begining.
I add progressively features... movement, action, jump, shoot, interaction with decor, trap, etc.
Now I need to add some random stuff, like random platforms in a level.
And... here's my problem.
To do that, i have create a new project, because it's very difficult to debug.
I have a guy, he's static but animated, he can jump & shoot.
I have create many platforms, many sizes, they are not on my scene.
I have an invisible object, when he collide a platform, a random number between 1 and 20 is sent.
The number is send to the good invisible object and he spawn the corresponding platform.
I have create an object to the left who destroy platforms when collide.
All the platforms move to the left.
The Platforms isn't on my scene, it's the invisibles actors who's spawning my platforms.
I have create an invisible object who detect the size of a platform when collide and my idea was to add a random distance between that platform and the platform spawned and use min and max to be sure they can't collide.
And and and...
Wait for it, wait for it..!
It's good.
BUT I have 15 or 16 invisibles actors on my scene to do that stuff!
I think it's very bad for performances, and I hope somebody have a better idea to do that... I'm very new here and GS is not my best friend at this moment.. lol
This forum isn't a great help for the random function...
Sorry for my english.
S.
Comments