Game research and coding

Continuing on with the project I did some research on Martial Arts, Rhythm games and how to code a Rhythm game. I stored my research in a Google Slides document which I shared with my teammates so that we could collectively gather research for the game in one place. 

These are some of the slides:





With my research on how to make a rhythm game, I then started to try coding the game.

I then used knowledge from the coding lessons on Wednesdays to make a Beat index and array which would go through Prefabs which I had assigned, each with a number as its name and then it would add the prefab to the game a few seconds before the beat timing is the same as the time since the audio started. I added this delay since there will be some time when the beat is moving. This also results in a delay before the first beat, I shortened this to 3 seconds. 

After coding the beats to spawn in I then added a script to each of the cubes in the Prefabs to make them move, I did this because each Prefab has waypoints and if the script was in the Parent Prefab (The empty object that the cube and waypoints are children of) all of the children will move including the waypoints so the cube will not move in the right way. I found this out with trial and error.

I also added to the movement scripts a few lines that destroy the cube when it reaches a certain point, using a bigger cube which when the cubes collide with it/enter it the cubes will get destroyed. I did have them get deactivated but I changed the code so that they get destroyed so they are no longer in the game.

This is the slide I made showing my scripts, I also added a video of the blocks moving.


I then adjusted the speed of the cubes moving because they were a bit too slow and adjusted some things. After this, I went on to implement the keyboard input and the scoring.

We also discussed some other aspects of the game and what parts we are working on as a group, these will be shown in the research slideshow.




Comments

Popular Posts