top of page

Nightmare is the the third game I have created. It is a platformer game. The level is easy but wait until you play it. The game has horror aspect in it. You play as Rith. Lucy, a restlessly ghost has entered your dream and disturbs your from the inside out. You have to collect 6 keys and open the door at the end of the level to escape from Lucy's grasp. 

 

The level design is simple but the gameplay mechanics and rules are the ones made this game hard. There are some interesting features I want to present to you guys. They are:

 

1. Darkness Around Player

 

 

 

 

 

 

 

 

 

                                                                                   

               The picture above shows the player has limited sight.                                         The picture above shows when the map is revealed.

 

What I did to create the darkness around player is to make a very big, black actor with a transparent hole in the middle as a mask and place it on my character with the transparent hole at the centre in the scene design. Then, I create an actor behaviour which controls the mask movement to make the mask follows Rith.

 

 

 

 

 

 

 

 

 

 

 

 

                                                                                          The picture above shows the mask movement.

 

RithFaceRight and RithFaceLeft is to detect the direction of the Rith facing. The above codes will shift the mask a bit to the direction where Rith is facing. You guys can make the mask follow the character without the offset shifiting.

 

2. Jump Through Tiles

To make jump through tiles possible in Stencyl, is to fake the action.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

                                                                                        The picture above shows the animations of Rith.

 

A jump is basically an arc-like motion, where y-speed starts from 0 reaches maximum then falls back to 0.

Therefore, there are 2 sets of physics in a jump. First is y-speed > 0, the second is y-speed < 0.

 

Hence, we need to create 2 sets of animations for the jump action. First set is for y-speed < 0 ( moving up ) and  remove the collision box for this set of animation. The second set is for y-speed > 0 ( moving down ) and do not remove the collision box for this set of animation.

 

After that, make an actor behaviour that switch animation when y-speed > 0 and when y-speed < 0.

If you are having problems standing on tiles after jumping. You need to make a behaviour which enables collision when the top of the tiles hits your character.

 

3. Backtrack

Backtrack is the biggest breakthrough I have achieved in making this game. The end result really satisfies me a lot. If you guys need backtrack, please follow this guide.

 

How my backtrack works:

        When the skills is used, Rith will teleport back to the location 3 seconds before the current location.

 

To track the location, Rith has travelled, list attributes in created to contain the previous coordinates

 

 

 

 

 

 

                                                                                 The picture above shows the codes for backtrack tracker.

 

The list attributes are Backtrack X and Backtrack Y.

 

The logic is: To add the character's x and y coordinates to the Backtrack X and Backtrack Y respectively in every                         second.

 

 

 

 

 

 

 

 

 

                                                                The picture above shows the core backtrack code that is highlighted in red box.

 

The logic is: Since I register a new item in the backtrack lists every seconds, I just minus the number of items in

                       the backtrack lists by the number of seconds I wish backtrack to and set Rith's x and y coordinates 

                       based on the item get from the results of the subtraction.

That's all I have for this game. Hope you guys download and play the game. Stay tuned for more great games and have a great day.

PROJECT NIGHTMARE

2020 by Xynan Lee.

  • LinkedIn
  • Instagram - Black Circle
bottom of page