How to make a Enemy in a 2d topdown game


I was wondering if anyone has some sort of tutorial of bit of code that could help me find out how I make a enemy in my 2d topdown game.


Hey there @Doeglas! So in Paper2D, unless you’re working in a 2.5D or 2D environment with true height, you’ll likely be handling your enemy AI movement by hand instead of navmesh. Here’s an example:

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

Thanks! I hope this tutorial can help me figure things out.

This should give you the basic idea, running players and enemies off of the character control system is an easy way to get basic AI running, but if you start needing more complex state changes besides walking, stopping, attacking etc, you may have to get a bit more involved. Many of the 3D aspects of the engine transfer well to 2D but not all of them, navmesh would require a good amount of designing around if you’re using tilemaps to be able to use it. You’d likely implement your own A* or similar pathfinding based on the tilemap instead.

Took me actually ages to make this even though it looks so simple. Finally got some sort of basic 2D A.I. that moves to the player every tick.

1 Like