CHRISTOPHER GAN YU HANG
Practical Work 2: Stencyl Shoot Em Up Game
Work Duration: 2 weeks
Team Size: 1 person
Game Type: 1 player vs NPCs
In this assignment, my task was to build a Shoot Em Up genre game from scratch based on what we were taught.
Noteable Implementations + Criticisms
Criticism: The code can be reduced with way lesser if statements. In Stencyl, user inputs can be converted into a number by using the "as number" function.
The code reads all the user's inputs and converts them into numbers, for up and left its negative, for right and down its positive. The intent was to mimic the way Godot reads and converts user inputs into numbers.
If the player presses any diagonal buttons there will be a movement speed offset to prevent the player from gaining too much diagonal speed since Stencyl handles Vectors additively.

8-way movement


Bullet Hell Bullet Patterns



Criticism: I could have created more complex patterns and different styles of bullet travel but due to engine limitations I wanted to make sure the NPCs did freeze the game every time they shot. Maybe there was a way to optimize how to create and move a large batch of Actors in Flash but I did not have the time to research a way.
The code is a loop that creates a Bullet Actor at each loop using a math function that calculates where to place said Actor at a certain radius at a certain angle.
There is then a function that directs the bullets to move at an angle at a given speed

Boss Attack State Changes

Criticism: It was an oversight but I should've compared y coordinate values instead of x and y coordinate values to compare the distance between the player and the boss so that it makes the boundary for state changing clearer.
The code is constantly updates each frame the distance between the player and the boss. If the player is between certain distances, the boss attacking state will change.