Checkpoint 04--Graphics/Presentations/Maps/Music


Checkpoint04-Graphics/Presentation/Map

This week we are going to make few maps so that we can change between levels and play different levels.

Firstly, we create a new scene and an empty game object which contains basic background and buttons. Let make these as 3 big levels, each level has 10 small ones.  (I made it according to real situations) >>>>

Secondly, we need to implement some details, each big level has a lock and stars to unlock. If user doesn’t get enough stars they won’t unlock. And after lock each big level they will see how many stars they get (each big level has 10 small level so totally 30 stars). Here are two screenshots describe different states of big levels.>>>>




 

Then we need to add 10 small levels in each panel, each of them has a number, 3 stars, and the lock. If player gets at least one star, the next level will be unlocked. Here are two screenshots describe different states of small levels. We also need to add a sava data function so that the number of stars we got will be shown in big levels. 


 

After implementing the basic selecting map I add an audioSource(actually a music) in main camera so when entering level select scene we can hear the music. Later I’ll add a slider so that we could adjust volume of music.

The next and also the last thing is to create a Resources file in our game assets, and we’ll use this to load each level. This file should include all prefabs of levels. If we make different levels into different scene, it will be a waste of space and resource.

 
Peer's evaluation and related correction

Some of my classmates said that when they want to go to the home page, after clicking home button and enter again, sometimes but not all, everything will be static. I tried for few times and found this bug too. Later I found that when we pause the game, I add a code after pause panel animation that let time stop(it means everything in this scene will stay where they are until time resume). So I add time.scale = 1; in retry and home button and the bug disappeared.

What’s more, one of my classmate (Sam), said that when he retrying a level, he got 3 stars before but this time he gets 2 stars. There should have 3 stars instead of 2 because game should record the highest attempt. So I add an if statement in sava data function to judge whether we get more or less stars to solve this annoying problem.

 

Alternative way or further implements

When implementing the music player, I found I can make an empty game object then put a script on it. In this script, it has a dontDestroyOnLoad statement, so that when changing between scenes music won’t stop being played. But for this case we don't want to play music during play each level, so I think what I've done is just fine.

Further implements: I found a great component which can allow us arrange image or button better—Grid Layout Group, this component can layout buttons or images in different cells, and each of them have exactly the same spacing with others.


 Moreover, I can have some new ideas in each level to make this game more playable and contains lots of fun. This would be reflected in different obstcales' charater, maybe they could move around or invisible etc.


P.S.  

All gifs are made with https://www.gif.cn  and all videos are captured with an app download in https://www.ieway.cn/evcapture.html

Files

Build.zip Play in browser
Sep 17, 2020

Leave a comment

Log in with itch.io to leave a comment.