Hello everyone! I am making a game in which the player will be pursued by an enemy (one or two). If we are talking only about movement to the right/left - everything is simple and it is implemented, but how to make movement up and down? The game is 2D side view. The enemy needs to jump and jump off. I am trying many options, but I cannot achieve stable enemy operation. The environment is made of tiles.
as an example of enemy behavior - the game Nuts and Milk
Are you trying to create an enemy that jumps when approaching the player?
If so, you can create an event that compares the distance between it and the player, and when that distance is met, it performs a jump animation and some sinusoidal movement with increased speed towards the player.