Monday 2 March 2015

Games Encounters Spring Submission- Scripts I have done for the game!

These ones are my scripts for the game. Some of them have been used in the prototype as well, and have been updated by my colleagues, depending on what they were doing.
As you can see I had some difficult time with some of them, trying to make them work exactly as I wanted. I have made a universal mover, that we used to move all the objects in the game, even the backgrounds. In the end I decided not to make the backgrounds move(we have 4 of them), but make them scroll, giving us the advantage to make the level last as long as we wanted. The background are made big enough, so that you will not feel the strange sensation of repetition.


1.Destroy By Boundary Script. This was made especially for the enemy and bullets that they were firing. So that after they exit that trigger to get destroy from the game.

2. Destroy By Contact Script. Made for when the enemy(and the bullets) hit the player. I basically destroys both targets on collision.

3.Game Controller Script. This script help us with swapning the enemies. As you can see,I have tried several times to improve it, and still think there is space for more.

4.Level Load Script. This one basically helps us to switch between our 4 levels. For each level we changed the time a bit, soo you may spend more time in the last level, then in the first.

5.Mover Script. Oh mover script. Think it is the one that gave me the most headache from all of them. I took me a while to make it work as I wanted it to. Basically because we made x our horizontal line of the game.

6.Reset Game Script. I made a button that will allow the player to reset the game when ever he wants to. I haven't included the score reset script, because another colleague of mine is doing that.

7.Scroll Background Script. As I told earlier, I wanted to have a bit more control on how much our game will last. This why I moved from the mover script to a scrolling one. Is basically give the advantage to our game to be a infinite runner game.

8.Spawn Again Script. I am not done with this one. I don't do exactly what I want it to do, and in the end I think we will end up without using it.

No comments:

Post a Comment