Hi,
Sorry if this thread doesn't suit the topic of the forum, but I have not seen any better place to post it. Maybe these kind of topic is too general, so tell me if it is the case.
I have been working on a game, which now I have debugged collision and it is working, I want to let the player to shoot an arrow or a bullet.
As a beginner in C++ I don't now how to do that, but I can wonder some methods:
1. Create one or more static objects "Arrow" inside class "Player", which are set to visible and set to a position (and some properties more) when the player attacks.
2. Create a dinamic object (through unique_ptr) and wonder how not to destroy it when I went out of scope there I created it (saving status and loading status in the next call)
3. Investigate threads and how to launch these objects with them.
Another thing about I am thinking is if it is possible to run animations, like when the player dies, through threads, due these animations don't interact with the player (I think enemies are harder to program into a thread because they have to interact with the player, arrows, etc).
Thank yo for your help!