Spawning Platforms Randomly

Hello everyone, so i’m creating a game where the player jumps on block platforms which would appear at the top and then come all the way down from wehre they would be deleted. so the player is supposed to jump on them to get to the next. kinda like that scenario. how do i make the platforms spawn randomly??

Check out the example project:

1 Like

I already did, but that screen size was too small, when i increased it, everything fell apart, that’s why i need the main codes, I’m using a 720x1080 resolution

I’m not sure I understand the question. The example is built into the engine. When you create a new project, you can select the example and see how the logic is set up.

The logic is going to be identical regardless of resolution, you just need to adjust the numbers as needed.

i followed the example up to a point but stopped when it WAS NOT exactly the screen size i wanted and the example was already set with the previous screen resolutions which was about 400x600 or something, and the objects dont appear at the top anymore, they however, appear at where 400 once was, making it kinda hard for me, cos it’s like in the middle. get it?

Yes, unfortunately you’re going to have to examine the example more and adjust all of the math used in there for your new resolution.

Items aren’t locked to resolution in any way. That just defines your viewport (Size of screen, not position of assets). It will be up to you, as the developer, to go through each event in the example and modify it for your needs.

You will need to go through each section of the example, from camera, to platforms, to rocks, etc, to understand how they are setting up the minimum/maximum ranges and positions of each item, and adjust them as needed.

okay. I will do just that. Thanks. :wave:t4:

1 Like