How do I make a shooter


#1

so im a very new 2d game developer and i would like to know how to make a shooter whit downloaded assets so can anyone help me?


#2

When you start up GDevelop, and create a new project, there are a number of game templates available. One of those is a complete level of a side scrolling shooter, with assets included.


#3

thanks! wait do you mean the physics one


#4

No, the 8-bit space shooter, as highlighted below:


#5

Yes, that is a good example.

Basically

If “x” key released and the player is turned left then create a object/bullet at the player position and then moving to or away from the player i.e. +50 pixels/sec for right and -50 pixels/sec for left on the X-axis.

And if you want a precise shoot location, lets say from the barrel of the gun then do this:
Ps. Forgive me if I forget some of the names of menus ect.
Im on my phone so I cant go and check.

For this example we will assume the player character has a gun as part of his animation.

Go to the Player sprite’s name and animation editor.
Form there press on the points bar next to the edit hit-box.
Then at the center bottom there should be a button that you can press to customize the points. Click it.

Then add a custom point and name it FirePosition.
Then go back and save changes for that sprite.

Then go to the actions and events.

Add a event with a condition “on button release (your choice)”
And another condition below that “trigger once while true”
For the action
Create a object at the players position, it should look something like this:

For example:

Condition:
If “e” key released
Trigger once while true
Action:
"Create object Bullet at Player(“FirePosition”)

After that just add a force to the bullet + for right and - for left on the X-axis.
To stop the game from overflowing, add the “destroy when outside of screen” event to the bullet.