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 to capture it. The top part just keeps moving relative to bottom part. I have to confess , 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?