Dragon Ball Z V2

by shilpan
  scripts
  sprites
See inside
Notes and Credits

Name of the Game:
Dragon Ball Z

Main Objective:
We are creating a game in which two main fighters of Dragon Ball Z Goku and Vegeta are fighting against each other.

Data Structure and design:
There will be 4 sprites in total. 2 of each character.
There will be a total of 8 variables of which 6 will be visible on screen.
The variables are:
Goku's: Health, Power and Energon
Vegeta's Health, Power and Energon

Controls:
Goku's movements shall be controlled by the keys a,s,d and w. His attacks will be controlled by the keys z,x and C. He can power up by the spacebar key.
Vegeta's movements will be controlled by the keys, up arrow,down arrow, right arrow and left arrow. His attacks will be controlled by the keys 7, 8 and 9. He can power up by the 0 key.

Note: Goku's and Vegeta's powers will decrease if they use their special attacks(the 'c' key for Goku and the '9' key for Vegeta) and they wont be able to use their special attacks if their power bar goes beyond a certain limit.

Sensing:
When the game starts both the characters will always look at each other.
If either one attacks and it touches the other then his health will decrease.
If the health of either character reaches zero.It will broadcast 'Game Over' and everything will stop.

Special Move:
Both characters will have a special ability to transform but will only be able to do so if their Energon Bars have reached 10. When that happens. There will be special keys which when pressed the characters will broadcast their transformations.

They original sprites will go into hiding and the new sprites will show. Their movements and attacks shall be controlled by the same keys but their attacks will be different. Their health and power will also increase. The keys by which they will transform are:
For Goku: The 'T' key
For Vegeta: The 'V' key.

Instructions:
Their will be a set of instructions shown in the beginning of the game.
The person playing the game will also have the choice of choosing the background and background music.
Their will be 4 options the background and 3 options for the background music.
The player can also see the instructions during the middle of the game... There will be 3 different sprites for each song and 4 different sprites for each background. If sprite 1, 2, 4 is pressed the costume will change its costume to that particular sprite. If sprite 5, 6, or 7 is pressed the stacge will play the background song written on the sprite. At the starting of the game, 2 of these sprites will switch to their first costume. And when one sprite acting as a button is clicked, the other sprite will change into another costume, that is, another instructions page. When the last costume i.e. the last instructions page shows several other sprites will also show along with it and when clicked will carry out the above commands. Once this is done and the button sprite is clicked, all the sprites will dissapear and another sprite acting as a button will appear. When this sprite is clicked only the first two costumes of the instructions page will appear and only the first and the last costume of the next and play button will appear. The user will not be able to change the stage and song during the game.

Setup:
Before the game starts.
Goku will be at position x=100 y=100
Vegeta will be at position x=-100, y=100
Health of Goku=100
Health of Vegeta=100
Power of Goku=100
Power of Vegeta=100
Goku's Energon=0
Vegeta's Energon=0
When the game starts sound 'bong' will play.
When transformation of Goku is broadcasted,
Health of Goku=200
Power of Goku=200
When transmission of Vegeta is transmitted
Health of Vegeta=200
Power of Vegeta=200
There will be two variables, "Goku ssj4 visible" and "Vegeta ssj4 visible"
When Goku attacks Vegeta if "Goku ssj4 visible"=0 and "Vegeta ssj4 visible"=0,
Health of Vegeta will decrease by 20 and vice versa.
If "Goku ssj4 visible"=1 and "Vegeta ssj4 visible"=0, Health of Vegeta will decrease by 40 and vice versa.
Every time a character touches another character when he is attacking, the character will change his costume.

Testing and observations.

Test 1:
We found that sometimes when one sprite was attacking the other, the costume of the attacked sprite was not changing or sometimes his health was not decreasing.
This is probably because we had written two different scripts for the same command for the same sprite. We used the If command and used the 'touching sprite' sensor block. We can maybe fix this by adding a new type of sensor block. If 'distance to sprite'....

Test 2:
The attack sequence of the sprite is now fixed and the sprites can now sense when they have been attacked and are now working accordingly.
When one of our player is attacking, he moves back and sometime goes out of the screen. The position of the sprite displayed on top indicates that the centre of the sprite is at that unique position. But when the costume of the sprite changes, the new costume may vary in length and breath, causing the position of the player attacking to change but the central position of the whole sprite to remain the same. We might be able to fix this if we literally change the position of the sprite while he is performing the action.

Test 3:
We changed the position of the sprites while he was performing the action. But the sprite switches between many costumes and moving the sprites position just once wasn't enough. So we tried moving the position 4 to 5 times in between the script and we were successful in decreasing the attacker's movement if not totally abolishing it.

Test 4:
The instructions we have built are not working properly. We think this is because we made some mistakes while applying the broadcast and receive command and working with the 'hide' and 'show' blocks. Our whole instructions page is made up of over 10 sprites some of them having more than one costumes. Thus, sometimes it so happens that the wrong sprites are showing up at the wrong time with the wrong costumes. Sometimes some of the sprites are not showing up at all. We are now looking into the situation.

Test 5: We solved the problems regarding the instructions page. we added more boradcast and receive messages, making the whole data structure of the instructions page more organized. We have also fixed certain positions for the sprites making up the whole instructions. Now whenever they show they will show up at fixed places. Everything is working in order and the whole game is now fully operational.

Shared: 4 Jul 2011 Modified: 4 Jul 2011
Favorite this project 18
Love this project 13
Total views 3952
View the remix tree  8
  
More projects by shilpan