I will be expanding upon the game I made for Assignment 12. (Forum Link: Art & Music: Designing Games (Spring 2024))
I have two main goals:
- Make my game more aesthetically pleasing (add nice animations, maybe some music, etc.).
- Add difficulty. Right now, once you get the hang of it, it's pretty easy to just start racking up points. I want to increase the difficulty by adding enemies that are harder to kill (probably signified by a different color) and/or by limiting the effectiveness of the powerups.
If I can, I also would like to add more powerups that the player can get, such as a special attack, increased power or speed, or even upgrading items that spawn on the field. I think adding the simpler powerups like increased power or speed will be doable, but if my experience making this game so far has taught me anything, it's that being ambitious is dangerous when working with scenes. One wrong block can completely shut you out of even being able to work on a scene.
I'd also really like to fix the key-sticking problem that affects the player movement between scenes, but at the moment, I'm not sure how to.
Update (4/21):
I started putting in assets ripped from the original Legend of Zelda game. This process in and of itself actually has helped to increase my game difficulty. In order to capture the animation and movement of the original game, Link's movement is no longer as fast or fluid, which already limits the player's mobility, making the game harder already. I will add more assets and increase difficulty as my next steps as the Cave is very incomplete.
I've also set the attack to use z instead of space.
I've made an area in front of Link that is meant to act as a collision detector for enemies, rather than relying on Link's proximity to them to attack them. It works pretty well, but I've noticed that despite following the same movement, it gets out of sync eventually.
Update (4/24):
New Link
https://snap.berkeley.edu/snap/snap.html#present:Username=gmtsuh&ProjectName=Assignment%20Final%20-%20Final%20Project%20No%20Music
I fully redid the powerups to use assets from the original Legend of Zelda (though I don't think the extra speed matches up--it's just a blue orb). I also added extra speed as a powerup and added a new enemy (blue Deku Scrubs) with more health and faster movement speed that will start spawning in after a while. Interestingly, the extra speed can make the game more difficult because the player loses some control and precision due to how the "increased speed" is implemented, which was part of what I was hoping would happen. Even something as simple as using the original rupee sprites increased difficulty to some degree due to their significantly smaller size. The sword also only attacks directly in front of the player, so you must be more accurate than regular sword swinging.
To look more polished, I also added a Game Over screen that allows the player to start from the very beginning.
Thanks to Jo's help, I was able to fix the movement issue that would cause the player to continuously move in one direction by dividing up the main movement if-statement (if up arrow pressed, go up; else if down arrow, go down, etc.). The monsters hurting the player via the player's attack animation also got resolved using the helicopter method of sprite sticking in class.
There is only one weird bug I have found, but it doesn't impact gameplay, so I'm not as concerned. Sometimes, the harder enemies will spawn in initially. However, since the player can't fight them anyway, they are easy enough to avoid while running to the Cave. Once the Scene change happens, the harder enemies no longer spawn before they're supposed to, so the player can engage in combat as intended. Weird, but certainly not game-breaking nor even much of an impact.
Overall, I'm very pleased with how this project is coming along. My final efforts will be towards adding background music and cleaning up my code. I already have sound effects from using the Sound blocks provided, but I want to put in the original theme via Tunescope (hopefully without sacrificing my sound effects) if I can. And my code definitely needs organizing.
Feel free to try the game. Make sure you start on the first scene, which is the one before "Field." The green flag should be clicked on the first scene, wait for it to set up, then press space when you're ready. You move with arrow keys and press c to go in/out of the cave. When you do get the sword, press z when facing enemies to attack them. When you want to buy powerups in the cave, be sure to pick them with z, not just walking on them.
(This originally got posted as a Reply, but I prefer having it in one place.)
Final Forum Update (4/29):
This is the final link to the final draft of my final project:
I have compiled all the important information for understanding the game in this update, so some of it is a bit repetitive.
I'm really happy with how this game turned out. I wanted to create a Zelda-inspired minigame of some sort, and after incorporating the original sprites and animations as well as the old background for the cave and Legend of Zelda Main Theme and Great Fairy Fountain Theme, I have achieved the Zelda-ness of that goal. My game works, and it's pretty fun! (At least, I think so.)
Guidelines for Play:
Move with the Arrow Keys.
Attack on the Field with Z. Use Z in the Cave to select items to buy.
Use C to enter/exit the Cave.
Use the Points you get from Enemies and Gems to buy powerups. You can buy a Heart to recover your Health, Extra Time, or Speed.
After some time, the Enemies get stronger and faster.
Your final score is determined by how many points you have and how long you lasted.
Structure of the Game (Behind the Scenes):
Start on the first Scene (with the rules). Click the Green Flag. This Scene sets and clears the variables the player uses. This is important as the player can play the game again, so a Scene is needed to clear out the old data. Pressing Space switches to the next Scene (Field).
From there, the Player will switch between the Field and Cave scenes via the Cave Entrance Sprite. The Field scene holds the enemies and is where the Player can attack. The Cave scene functions as a shop, allowing the Player to trade in their points for powerups: Heart, Speed, and Extra Time. It is also necessary to go into the Cave to get the Sword before the Shop becomes available.
Between each Scene, the Player's data (if they have the Sword to attack, their points, the time remaining, etc.) is passed through. When exiting a Scene, the time counter is stopped, and the Player's Data List (the data structure that gets passed) is updated. When entering a Scene, the local Player Data List is updated, which allows the data to be saved and used in that Scene. The timer (after being updated with the time remaining) is started to continue counting time.
Time is managed by using an infinite loop, a counter, and the wait block. Once invoked, the player's remaining time is decremented by 1, and the total time they have survived is increased by 1. Then, the code waits for 1 second before incrementing/decrementing again.
Enemies (orange), Harder Enemies (blue), and Gems are managed by a Spawner sprite, which carries out the cloning actions. The original blueprint sprites for these are sent offstage so that they don't interfere with the player. When the player enters the Field scene, the Spawner activates, cloning both enemies and gems. How many it will spawn at any time is determined by how many it has spawned already (so that there are not too many enemies or gems) and whether the player has the sword (more enemies once they do). The type of enemy is also determined by this sprite based on how much total time the Player has survived.
When the Player comes in contact with an enemy, they take damage, the code for which is in the enemy's behavior. The Player is also forcibly moved back to their starting position on the left of the stage. Normally, games would use knockback, but I decided to move the Player in order to keep difficulty up; resources that could help the Player are only accessible by going to the upper right (Cave Entrance), so moving the Player away increases the difficulty. Alternatively, the Player might attack the enemy, and if they hit, the enemy will be knocked back and possibly destroyed if it is out of HP (1 HP for orange Enemies, 2 HP for blue Harder Enemies).
Music is managed using the Tunescope Library. I put all of the notes for each theme in its own list. When the respective scene is switched to, the list is iterated through, and each note is played. In order to prevent overlapping notes (which sounds terrible), a rest of the same duration of the note is also played immediately after, which results in the theme sounding as planned. Originally, I did use the Play Tracks block, but I was able to more easily control when the notes stop at Scene switches using the list iteration method.