Reflection on Mini-Game Cycle 1

Student Name: Wai Man Ho

Student Number: n9659340

Working as a team

I have learnt a lot of useful things in this Cycle1, things like working as a team with individuals that have different ideas and backgrounds.  It looks “refresh” to me that we are argued about individual ideas before agreed to a solution or brainstorming like a storm before it finally settled.  In several occasions, we need the tutor to do the final judgement before it is clarified for some questions about the project.

Clever trick that has learnt

When working on the SHMUP Sample Project that has given to us, I was surprised that a Cube is created and then remove its Render Mesh before putting a “Fighter” game object as a child to it.  So the Cube is invisible in the game and I wonder why it is doing like that.  I could not figure it out until I have asked the tutor  He just said “All the scripts are working on the Cube only!”

Then I suddenly realised that I have learnt a very clever trick: We can changed the Game Object to anything without changing the script and it will behave exactly the same as before.  That is quite a powerful way of implementing Game Object in a game as we can switch the Game Object to a different look during the game, but at the same time using the same Game Mechanic without the need to “reinventing the wheel” by adding the Script component to the new Game Object.

Bugs that has found

When working on the Game Manager of the Sample Project, I have found that the Screen Boundary on x-axis does not work – The player character is simply moving out of the screen!  While the z-axis is working fine but not the x-axis, it is therefore suspect the problems are something to do with the aspect ratio of the play screen.  After a few experiments, it is found that with a play screen resolution setting at 1024 x 768, the correct value of xBoundary is 50 rather than the original 95, in order for the Player does not go out of the screen.  It would be best if the Game itself can detect what screen resolution is currently using and adjust the screen boundary value accordingly rather than using a fixed value.

Instance Consideration

Another issue of the Game Manager is the “Singleton”.  I have a long discussion with tutor about the possibility of having more than one copy of Game Manager running at the same time during the game play.  It seems the Game Manager usually is on the top of the Hierarchy so that it can control the flows of the game and seldom making itself as Prefabs, so the chance of creating more than one Game Manager in a game is very slim. Finally, we conclude that it is because the screen boundary variables in the Game Manager are directly access from “GameManager.instance” which make the Singleton is necessary.

Bugs in Unity and the workaround

I have also found a bug in the latest version of Unity or may be a “feature” that will confuse the programmer.  For example, if you have a declaration something like:  public float damage = 100.0f;  in a script and put it to a Prefabs Game Object, everything is working fine so far.  But if you change the default value of that variable, say, from 100 to 25 in the Script file and save the changes, the Inspector’s value of that Game Object does not update and still using the old value.  You will need to do manually to change the Inspector’s value so that it matches with the Script’s value.  Another way to do it is you need to remove the Script and put it back again before it will use the updated value.  ( Please note there is no Apply button on the Inspector as the change is on the Script itself, not from putting a Prefabs Game Object onto the Scene and change its parameter.)

Professional Practice

Another important issue I have noticed is that most people simply forget/ignore what happen to the Game Object that they have spawned once it has moved out of the screen. The result of this “Out of Sight, Out of Mind” may cause the machine crash as it will run out of memory when the game has continued playing long enough.  All the spawned Game Objects should be properly destroyed and released the resource once they are not used in the game anymore.  It is something similar to particles in the Particle System that they all should have a limited life span.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s