Dynamic shape creation?

Hi.
I am trying to make an asteroid game. I was hoping to randomly generate Asteroid shapes like I can do in Javascript. How can I do that in my Wick code project? Any help would be very gratefully received.
Thank you
Greg

1 Like

At the moment, it’s not possible to dynamically create a shape in Wick Editor However, you can create a clip that has multiple different types of asteroids inside it, then switch to a random frame when you create the clone.

I’m attaching an example that shows how to do this (with a little extra code that let’s us rotate the asteroid!)

asteroids6-2-2020_12-27-03PM.wick (9.7 KB)

2 Likes

Thank you @Luxapodular for taking the time to show me a solution. That is really great and will definitely be good for my project.
Thank you. Greg

2 Likes

@Greg, I’ve made a game with asteroids before, though I quit trying to improve it, but it might help you in your project:

A rocket and astroids (endless flight).wick (1.9 MB)

1 Like

wow!! @Hamzah_Al_Ani, your Rocket game is really fun. Thank you for sharing the code. The rocket looks really good and the controller looks very useful for my project. Thank you very much for your help
Greg

1 Like