I want to make rocks!

hello, I need to make some rocks! I have a tile image for textures, is there anyway i can dramatically defined different shapes with it in gdevelop? Like cloning it and on each clone define a different shape of it.

There is a way, though my methodology will not have it preview within the editor.

What I suggest doing is adding each individual rock texture as different animations in a single sprite object. Then, add an object variable in that sprite object labelled something like “rock_texture” or whatever you desire. Then, as you place the object into scene, you can tweak the number of the object variable in each instance related to which animation you wish to have that instance be when previewing/playing.

On the events, at scene start make it run for each instance of the rock sprite to do this:
Set the animation number of “Rock” to “Rock.Variable(rock_texture)”

1 Like

My game is sandbox, at the moment, and you can use Sprite, for example:
Animation X (Sprite Rock texture X)
Later you can use a Random number to Spawn “Random” in the world (Using creation events) and look is the RESULT do you want!
The extension you can look is “Random number or Random Dungeon generator” Look tutorials, if you believe isn’t good idea

1 Like

Excuse the late reply, I was setting up some stuff for streaming purpose. So use one object and have multiple different animation image and set them randomly to have different rocks of the same object which should help with performance it being the same object and image so just a reference. But i saw someone on twitch in gobot where they dynamically drew the texture of each rock… I’m guessing something like that is not possible? Regardless your suggestion seem to also get what i want done. Thanks for the reply, share anymore helpful knowledge please.

1 Like

Thanks for the reference I’ll check out the tutorial. If you have anything else more to share please do.