Shot em up game advices

Hi! I am Walter and I am developing a shot em up game where you play on the ground so there are some mechanics with the positions and hazards.
I need help, I can’t make the bullets spawn on specific position of the player collection.
And how are the best practices for pooling objects?
Best regards!

There’s usually no need to pool game objects. Creating and deleting is cheap.

When you spawn a game object you can also pass in a position as the second argument. You can use this to set the position of the spawned object. Is this not what you’re after?

hi! here is the code:
this is in the init function

and here is the factory code.

best regards!

It needs to be self.right_canon in the factory!

3 Likes

Strict mode should be able to catch this kind of bug.

1 Like

FYI…you can use code fences to post your actual code in this forum. It makes it a lot easier and cleaner to post.
image