I need help with game

So I have been making a tiny version of ultrakill for my friend and I need to know two things. how can I add ricochet and how do I add sliding

2 Likes

The main issue is that the “control sprite” block sets the player’s speed every frame, so if you want the player to do any movement that isn’t controlled by the joystick, you’ll need to make your own movement system instead of using the built in one. What I would do is, in and On Game Update block, add to the player’s vx if right is held and subtract when the left is held, and don’t add / subtract if the player is past a maximum speed. Remember to apply some sort of friction when no buttons are held.

After that, movement tech is gonna be a lot of trial and error. If you want to be able to slam then slide, you could make it so that pressing down sends you flying downwards and then you can increased movement speed for a while. It’s gonna be more difficult since it’s 2D, because it’s not easy to make something feel “right”.

Ricochet is easy, you can just set the projectiles to have the flag “bounce on wall” turned on. The block with all the flags in a giant dropdown menu is somewhere in the Sprites tab. You can give each projectile a slightly random y velocity to make the bouncing more interesting if you want.

1 Like

by

do you mean bounce? if so, here you go.

Explanation:

You just have to detect overlap, and the reverse the direction of it. (Note: if you use a projectile sprite, it will destroy itself, so in this example I used a regular sprite.)

1 Like

what I meant in ricochet is the bullet would bounce off of another sprite and “auto target” to the closest enemy sprite(but if the enemy sprite moves it wouldn’t follow it)

Oh, you can just use the “Follow block”