ESCAPE: 2D Topdown Retro Game

Add to
My games
Add to
Wishlist
Save to
Collection
No reviews
Exceptional
Meh
Skip

About

Introduction

This is a 2D topdown game invovling different types of basic traps. All you need  is to control the character and manage to escape, while collecting as many coins as you can. Easy to play, hard to get a high score!

Playing the game, you'll be able to experience 2 scenes. One is trying to get into the car by grabbing the key first, while bypassing the bomb, going through the spikegate and avoiding the fires. The other is to drive the car rushing to the finish line, escaping from the bullets, lasers, and passing the spikestrip. Try not to be hit by the traps, or the limited health won't guarantee a win. Meanwhile, try to collect the coins on the road since they are worth a lot in the final score.

Have fun!

Post Mortem

There are few points I'd like to address in learning Unity and developing the game.

First, apart from the player's key input, this game is mainly triggered by colliders. Box collider, circle collider and mesh colliders for walls and different traps. However, whether to add rigid body components depends on the exact actions I need. If the trap is transformed by scripts like the bomb or the fire ring, or is exerted by a force like the bullet, then a rigid body component must be added. On the other hand, custom animation without the rigid body like the spikegate, spikestrip and laser could also be used. An extral help of no rigid body is that, the gameobject won't be limited by other colliders, for example, the laser would go through the wall instead of beating the wall and being destroyed. 

Second, there are some tricks I figured out in solving problems about the animations. To change the animation states by a delayed time, I tried to use StartCoroutine, yield and WaitForSeconds at the beginning, only to find out it didn't work. Then, I set a transition bool parameter controlled by scripts using Time.delataTime, still failed. Finally, I deleted the transition bool parameter and used script to control the play of animation state directly, it worked. This is specifically useful for letting the spikegate close and reopen for some seconds.

Another trick I find out is to use animation events to tell the script when a state begins and ends. GetCurrentAnimatorStateInfo(0).IsName() didn't work. This trick is used for waiting and playing the end animation of scene 1 (car starting up) and then load to scene 2.

What's more, to rotate a gameobject smoothly,  Quaternion.Slerp may be used. However, it is not the case with the fire ring which turns around and around and around in 360 degrees. Using slerp results in rotating to the angle less than 180 degrees. Therefore, it won't rotate from 0 to 359, instead, from 0 to 1. To solve this problem, a very simple line can be introduced -- transform.Rotate(new Vector3(0, 0, 100) * Time.deltaTime * speed).

At last, this game is still in very early development. The game mechanics and game play runs well. But there are still a lot more work remaining in the visial part.

Appendix

Here is the design draft of the game.

Platforms
Release date
Developer
royyang
Age rating
Not rated

System requirements for Web

Read more...
Edit the game info
Last Modified: Oct 1, 2021

Where to buy

itch.io