How can I make bouncy player collision? (2D top-down)

I am in the process of making a split screen top-down 2D game and one of the features is that the 2 players will bounce off each other or obstacles around the map if they come in contact with them.
I originally thought about making bounds for the map and teleporting the player back a set distance when they reach this point but I don’t see this working. This is because the map isn’t the shape of a regular polygon, there are many additional objects around the map (as well as the other moving player) and I doubt that it would satisfy my ‘bouncy’ invisionment.

Eventually, I’ll be making a 2d side-on and 3d stages for this game which will need the same ‘bouncy’ effect but that can be addressed later.

Any help is greatly appreciated.

You can do this with rigid body

As @KingGD already said, you can use a RigidBody2D, add a physics material to it and tune its “bounce” value. If you don’t want to rely on the engine’s physics, you could also code something similar yourself using a CharacterBody2D, as described here.