10/7

Start thinking about your next project

The theme is Night at the Carny, how you interpret this theme is entirely up to you (but keep it school appropriate. Maybe it's a a game where you wander around the carnival and play traditional carnival games? Maybe it's a horror game? Maybe you are a Carny and you have to get the riders on the ride before it starts? The world is yours so start dreaming.

This will be a two person team project (you will choose your own team) and this will likely be the last one before you begin your final game project 1984. This will be your sandbox for whatever ideas you can dream up and possibly incorporate into your final project.

If you fancy yourself a programmer, I would suggest partnering with an artist and vice-versa but it is up to you.


More details to come

 Start off the day with the warm-up

How about a little good news for a change?

Summarize and add your opinion

https://gamerant.com/fromsoftware-employees-raises-april-2024/


What are you learning?

GDevelop - Fire Bullets

Why is it important? What is the assignment?

Many games have weapons so let's add them to this game

Let add the ability to fire a weapon

First let's create a new sprite called Gun and draw it in piskel

Drag your gun into the scene


Open up your Hero Sprite

Select Edit Points

Add a Point Called Gun

Move point to where you wish to place the gun

Move the Center Point to the Center 

You will need to modify the Points on your Gun to make it fit nicely

We want to set the gun on top of the pumpkin

Go to events sheet

Add a new event group called Gun

Add a new event

Action

X Position

Hero.PointX("Gun")

Y Position

Hero.PointY("Gun")

This will set the position of the gun to the Point you set on the Hero Sprite

Now let's add the ability to make the gun rotate

add action

Gun

Rotate toward position

X Position
CursorX()

YPosition
CursorY()

Angular Speed
0 (so it is immediate)

Let's make a bullet!

Open up your Gun Sprite and add the behavior Fire Bullets and apply

Now Create a bullet object (sprite)

Add a new event in your Gun event group

Condition is always

Action Fire Bullets Toward an angle

Object is gun

Bullet object is bullet

Click okay 

Open your gun sprite

We will need to add another point where the bullet spawns

Your points may be different than mine!

Open up your Fire Bullet Action in your events tab

Click on the Epsilon (expression builder)

Gun.PointX("BulletPoint")

Type in Point

Select X position of a point

Object
Gun

Name of the point
"BulletPoint"

Apply

then do the same for the Y point

Gun.PointY("BulletPoint")

We are going to want to have the bullet shoot at the same angle as the gun

The expression for this is
Gun.Angle()

Speed
100

Open up your bullet sprite and set the center point


We need to set a condition so that the bullet only fired when you click the mouse

Now we will set the bullets to stop so they don't go on forever

Add a new event

Distance between two objects

Bullet

Hero

600

Invert Condition

Time to take out the enemies!

Open up the BadGuy object

Select Behaviors

Add behavior

Find and add Health

Change your starting health and maximum health to something lower than 100 (I'm doing 5)

In last years version of Gdevelop, you had to create variables for the enemies, it was way more time consuming. 

So the BadGuy has a health of 5 and you are going to set an event so that when the bullet hits the enemy, the bullet disappears and one health point is taken from the BadGuy

Open your BadGuy object and create another animation called DeadGuy

Now we want to create a new event that happens when the BadGuy is out of life points 

Create a new event

Condition
BadGuy is dead

Action
Change the animation of Bad Guy to Dead Guy
Wait 1 second so the animation can finish
Delete BadGuy