Microsoft MakeCode

Shark Frenzy

I am finally ready a have submitted my #featured-game #game for the Ocean Jam:

Please let me know if you find any bugs or issues running this on handheld devices. I look forward to your feedback.

Feel free to take any code/ideas from the game; you can find the source here:

and you can play the game full screen in a browser here:

6 Likes

Great game! I love the art and animation! The intro and the boat are really awesome.

I struggled a little to get the strategy down, but once I realized the best way to kill sharks is from the below the game opened up! The post 30 score game is fun and challenging! My high score is 45, but I’ll have to load this to my PI zero and give it some more play-throughs.

2 Likes

Thanks Andrew.
The game works really well on my PyGamer and you are definitely right about the strategy. I figured that some players may not get past a score of 30, and I want to give them something which encourages them to keep trying. I was quite happy with how the highest 10 scores are kept at the end of game, considering I could not store a string array in the Settings extension.

Something that I wanted to mention in my previous post, is that the player can move in between the sharks. The player is only bitten if the front half of the shark overlaps the player and the shark is half through its ‘biting’ animation. So there is definitely more realism in the game then just programming something where the player dies if it overlaps an enemy; as you see in most games. :wink:

1 Like

Wow, nice work! I just looked at the code too, and there’s lots there I want to try out.

The intro and original graphics like the boat and diver and waves are beautiful.

I find the diver can get stuck facing one direction, and needs two or more clicks to make them turn around sometimes – which can leave it quite tight when there’s lots of hungry sharks nearby!

1 Like

Thank you for your feedback, I’m glad there are functions you could use. I think this is one of my best games to date, as there is quite a lot of animation, but also more realism in how the sprites interact. I would like to have the sharks move up and down, but I think the game is challenging enough without having to use that movement. I had to separate the knife from the player, otherwise the player could kick the shark when attacking and that would have counted as an overlap. Since the knife is a separate sprite, and is moved relative to the player, when attacking the player cannot move in the other direction until finishing the attack, which is real and reasonable. It can be that you have moved the joystick in the opposite direction, but the code has not captured that, and since the joystick movements are queued, the player moves in the other direction later on but the last recorded direction was the previous direction. I could also add a check in the game update that also sets the variable ‘facingRight’ based on the vx of the player. The sharks also have four states, stored via the sprite data extension; swimming, attacking, injured (after 30 points) and captured. The waves are two sprites at screen width that constantly move across the screen behind each other. There are two rows of waves, where the top row moves slightly slower then the bottom row, also against the background that has a wave, hoping to give appearance of more depth to the scene. The coral reef at the bottom of the screen moves relative to the player, but has a higher z value so that it looks like the sprites swim behind it. All sprites set their X value based on their y value. This does mean that the player can move from behind a shark to be in front of it later. I wanted to stop the player moving vertically through a shark, but given the amount of screen space and number of sharks, that might have made the game too hard. I am glad there is a built-in function to have a sprite follow another sprite, as that is what is done when the bottom part of the net overlaps an injured :shark: to capture it. The top part just keeps moving relative to bottom part. I have to confess :shushing_face:, the player animations were taken from a game made in the 80’s. The arcade version was called Jungle Hunt. It was one of my favourite games as a child. You can footage on YouTube. I would like to make all parts of that game.
I like the game you are working on at the moment, where the player moves up and down a ladder and the waves in the background have depth by moving sprites in front of them. How do get the moving waves to stay on screen, since you are using a tilemap?

All sprites set their X value based on their y value, should read,

All sprites set their Z value based on their Y value

Regarding the animated background – I did it using the ‘on game update’ function to cycle through four images of the water just below the islands. Here’s a demo:

3 Likes

The shadow on the right side of the island makes it also look 3D; I love it.
You set the reflecting water to be relative to the camera. What does that do?

The relative-to-camera thing is to ensure that the reflecting water sprites don’t move when the player starts moving along through the tilemap, or jumps or something.

1 Like

#ArcadeJam just tagging my game :face_with_hand_over_mouth:

1 Like