2d Game development

how does one spawn multiple sprites from a circular boundary outside the game scene and move it towards the centre of the screen?

You can’t do anything “outside of the scene”, you meant outside of the viewport? That’s possible. You basically just calculate a vector from the center of the scene using an angle.

But I wouldn’t do that because then assuming that the player has a rectangle display (usually people have), then it will spend more time outside of the screen when the sprite comes from above or below than left or right (if the screen is landscape).
Just span the sprites outside of the viewport and start to move them, the player/viewer would not notice if they come from 5 units away outside of the screen or 1.
Just try to build the script and when you stuck somewhere post it and we can help fix it, but we won’t write it for you, that’s your job.

Break your problem down into smaller chunks and get each one working individually. Put them together only when each individual piece is working well:
Start with this:

Then add that the sprites are spawned in a circle:

Do this part separately with a single object at first:

If you can do each of these individually, it should be easy to put them all together!

1 Like