#CGDD 2D Game: Documentation of game structure


The image above is the flow chart of our game system. The player controls the position of the fish by adding force onto it through WASD and space keys, which is the act of fishing. When the fish is in a good position, the player shoot at it and decrease its health. When the player adds too much or too little force, the fishhook will break and the fish will escape, which means the player loses. When the fish’s health enters zero, the player wins, and he gets the access to the next level.

There are four levels in this game. The harder the level is, the stronger force the fish adds on itself and longer health it gains. The image below is our scene of choosing game level:

The challenge of the player is to keep the force on the fish in a certain interval. He has to try to add the force of the fishing rod to make the fish jump out of water to make it easier to shoot, but he cannot make the force too strong so that the fish will not get off the hook.

The video below shows the UI:

When the player wins, the exclamation mark on the level will be remove and the player could access the next level. We have just built one level so that I could skip the easy level in the video. When the player loses, a restart button will appear on the canvas.

The videos below show how the player loses the game:


In this video, the player fails to set hook in time so that the fish escape directly.


In this video, the player adds too little force on the fish and the fish escapes.


In this video, the player adds too much force on the fish and throws the fish away.

The video below shows how the player wins the game:

#CGDD Create a real ‘Fake’ game

I chose the game Rolling Sky as my sample, here is a video of how it plays: https://www.bilibili.com/video/BV11V411Y7VM?p=3&vd_source=637c310ef910b08826920d2defc0a6f5
I’ve decided to create a simpler game where the player moves forward and avoids obstacles.

Firstly, I created a UI scene with a button to transition to another scene. Initially, I attempted to add text as a component to the button, resulting in an error. Upon watching a tutorial video, I discovered that text should be a separate game object, and when creating a button, a text object is automatically generated as the children object of the button.
Below is a video of it:

Secondly, I bonded the character and the main camera together under an empty object, which enables the camera to move accordingly with the character. I also asked Chat-GPT to write a script to move the character forward and a script to control the x position of the character with the key A and D. Below is the video of it:

Thirdly, I learned about collision trigger events and applied them to my game. Additionally, I created a canvas to display the “game over” message during gameplay, initially hidden at the start. When the player collides with obstacles, the canvas appears, allowing the player to press a button and return to the home page. Below is the video:

Then, I asked Chat-GPT to generate a script that randomly creates a fixed obstacle with a collider set, limited to a maximum of 7. However, I realized that continually adding new functionalities to the script without losing the original ones was challenging for Chat-GPT. Instead of repeatedly asking, I find it more efficient to request individual functions and incorporate them into the script myself. Here is the video:

After that, I thought of a game experience in the game DREDGE, which can be applied to my game.

I thought I could decorate the character as a fishing boat and the collisions as reef. Below is a video of DREDGE where my idea come from, the sudden appear of the reef is much similar to how the obstacles appear in my game.

Therefore, I searched free material on Unity Asset Store (https://assetstore.unity.com/zh) and replaced the symbol objects with new models and materials.
Rock and cliff models: https://assetstore.unity.com/packages/3d/environments/landscapes/free-rocks-19288
Ocean material:
https://assetstore.unity.com/packages/2d/textures-materials/water/unlit-stylized-water-pack-142285
Fishing boat model: https://assetstore.unity.com/packages/3d/vehicles/sea/fishing-boat-23181
I also tried to use fog (https://assetstore.unity.com/packages/vfx/shaders/dynamic-vertical-fog-189939) to block the view of the player, but I failed to apply it on my game. So, I asked Chat-GPT to generate a script to create the cliffs and ocean ahead of the player and destroy them after the player passes them. However, I embedded the script on the object that I wanted to generate, which made the object keep generating the object with the same script and caused the Unity to freeze. I had to shut it up with the Task Manager, losing what I hadn’t saved. Anyway, below is the video of what I worked in this stage:

Next, I added a skybox (https://assetstore.unity.com/packages/2d/textures-materials/sky/allsky-free-10-sky-skybox-set-146014) and modified the script of the character moving forward. The character now starts from a low speed and moves faster as the game is played. Below is the video:

Finally, I created animations for the home page scene and the lose scene with Stable Diffusion. (https://stablediffusionweb.com/zh-cn/app/image-generator) Moreover, I added a music box (https://opengameart.org/content/deadly-sea) to play a horror music to enhance the game experience. Last but not the least, I modified the UI with new materials (https://assetstore.unity.com/packages/2d/gui/fantasy-wooden-gui-free-103811) Below is the video for the final work: