top of page

DEVELOPMENT CORNER

Nicole Ng

MICRO C.H.I.P (Stencyl)

Micro C.H.I.P is a 2D platformer shooter, survival, puzzle game made back in January 2020. It is mostly targeted towards skill and memory based gamers.



Camera Movement 1
Camera Movement 2

Applying the camera movement of the scene to be attached to the player actor. I used this because the game has a wide width game scene and I wanted a smooth transition throughout the scene rather than switching scenes.


Explosion

Simple code to add in an explosion actor and a delay before the game scene is reloaded. It is easier than using presets explosion behaviour.


Trigger Metal Rect

I manually added the Metal Rect actor into the game scene after a player collides with the Trigger Cube because I wanted the Metal Rect to appear at specific locations throughout the map.


Create Score and Sounds
Using Score to Trigger an Event

I wanted the player to collect 10 Cubox (Tiny Cube) to destroy the Laser Gate and so, I set the scoreTarget to 10.


Enemy Behaviour

This code is attached to an actor, in this case, an enemy actor. The first IF-statement basically allows the enemy actor to flip direction according to where the Player Actor is at.


The second IF-statement is the enemy actor's attack code. It only allows the attack to happen if the Player Actor is at the same y value of the enemy actor, only then would the Enemy Bullet be spawn at 30 force in the x direction from x and y center of the enemy actor. An attack delay of 2 seconds and a switch animation is included as well.


Enemy Bullet Collision

When the player actor collides with an Enemy Bullet, it gets a 5 health damage and if the health of the player actor is less or equals to 0, it dies.


Healing Collision

Here, when the player actor collides with a Micro Chip, it increases 5 health points and if the current health of the player actor is more or equals to 70, it remains at 70. This is because I want the player actor to have a maximum health of 70.


Setting the Timer
Drawing a timer with mm:ss format

The minutes is set minutes to floor of Timer/60, to indicate the intervals of which it will be converted into the "minutes" attribute as there is no time function in Stencyl. Next, set second to floor of remainder of Timer/60 is basically the remainder numbers that has not been converted into "minutes" will be shown as the "second" attribute.


Timer Game Attributes

I used a game attribute (purple block) with the same name and set it to the attribute of the same name, because I wanted to carry over the Timer into another game scene. An attribute (blue block) can only be used in the same scene it is created in, while a game attribute can be used in all scenes in the game.


Player Shoot

When the player holds down the Z button, and the shoot attribute is true, the player can shoot. I set the direction of the bullet depending on where the player is currently facing by checking for the current animations used. There is also a delay of 0.3 seconds, before the player can shoot again.


Patrol Behaviour 1

I set the trigger event under the name ChangeTarget in when created event, to start the behaviour every time the scene is executed.


Patrol Behaviour 2

This code is attached to an actor, I set it to the gears in my game. It is used to move the actor to any coordination in the game scene and back to their original starting point.


Patrol Behaviour 3

This is to check when an actor is at the starting point, it then triggers the behaviour and moves to the coordinates configured and if the actor has reach their configured coordinates, then trigger the behaviour again to move them back to the starting point.

Once the script is attached to an actor, the main coordination will be configured in the scene itself.


Disappear Collision

This was also added into the Patrol Behaviour. I wanted the gear actor in my game, to disappear once it is collided with a player actor and I want to configure the time of each actor myself, so with the code above, I am able to configure the time in the scene for each individual actor.


Player Movement

I made a player movement from scratch, because the preset walk movements from Stencyl is giving me sliding problems and I did not want the player to slide around especially with my game having circle collision shapes.


The jump movement actually gave me the most issues during development, I have fixed all the issues but just to help you visualize it, below are some problems I have encountered.



Comments


bottom of page