Apex Legends Ping System built in Unity

24/02/2019

Let's create the Ping System from Apex Legends.
It's a great system and one of the reasons the game is so successful. It's context sensitive so with just one button you can create a multitude of pings to give information to your team mates.

Comments

If you have any questions please post them in the comments and I'll do my best to answer them

Code Monkey

Ping System! Have you found it useful or do you use mostly voice?It's not the sexiest system but it certainly is a huge reason as to why Apex Legends has found so much success.Communication in Multiplayer games is a must especially for a Team based game and the system they have created works wonders even while playing with randoms.

animgame 935

pls pls pls how to make a save system like terraria i have a random generated world how to make save like terraria pls pls

It seems that you are going to be recreating some of apex mechanics and systems. That is great. The game is great. It would be nice to see how you handle the movement system, basic and advanced (slide, wall / object climb ), maybe port the heroes to Unity. Anyway, I will keep following these apex tutorials because the game is great.

Code Monkey

Movement is a bit of a tricky one since in 2D I'm not sure how I can implement the slide. There's no elevation so slide forever? For a set distance? Not sure.The Pathfinder Hook is really cool though so I want to do that one.The next video I'm currently working on is with the Downed System, player going down, point shield, respawn token, etc.

[MAUS] Mechwarriors Are Us Mercenary Unit

Maybe if you place an area for slide, like the downhills and slopes in Apex, just a patch of area in the ground where the player can hit the button and slide on it

Code Monkey

Hmm interesting, something like a boost lane like in kart games would indeed work.

[MAUS] Mechwarriors Are Us Mercenary Unit

For the wall climb you could place high areas in the game, and it may work.

Martin K

QUESTION : Hello CodeMoneky, i was wondering is there any particular reason why you are not only using "Canvas /screen space" for your pings. Or is there some advantages to have 1 ping to be a game object in the world and the other being a UI element on screen ? I would love to hear your reason, in the game it feels like they only use UI space maybe for performance reasons ?This is a excellent video, alot of small bits of info that can come into use in other systems as well good work dude.

Code Monkey

You certainly could do them all in the UI or do them all in the World. However in doing so you need to do several calculations to figure out where to place them so I went with this way which I believe is simpler.It also makes more sense to keep the pings that are supposed to live in the world stay in the world and the ones that are meant to be right in front of the player in the UI. If an element is meant to always be on camera then it probably should be in the UI rather than in the World following the Camera.Conversely if an element is meant to be in a certain position in the world regardless of where the camera is then that object should exist in the world.

If you do it all in the UI you need to convert the Ping position from World space into Screen space then UI space.If you do it all in the World you need to position the pings around the camera following along with it when hidden and deal with sprite sorting order.

So yeah you have three perfectly valid options of achieving the same result, all UI, all World or Mixed.

Aisha Khatoon

Cool vid

Carlos Cordero

i feel unity incredibly easy to use for 2d stuffthanks mate

Code Monkey

Yup for an engine that started off as 3D only it has certainly became great for 2D.

Lawson shomion

Y u kill me in fortnite

SG Fishy

Hmmmm

Micaiah Stevens

IS this the longest Code Monkey Tutorial, NICE.I hope the radial is good, such a complicated system.(preview comment)!

Code Monkey

Yup this sure was a long video to do, hopefully being so much in depth will really help someone looking for this type of system.

Mir Laboratories

i tried fornite and that other one. didn't like them. however i have tried apex and its the team system combined with the characters and pings that are getting me hooked. im a bit fan of strategy games. mobas being my favorite but this is the first fps iv got so hooked on in a looong time.

Ahmed Samy

Very good

Tushar Gupta

QUESTION : where can I go for multiplayer tutorials beginner to advanced?

Code Monkey

Not too sure since Unity has been talking about upgrading their multiplayer tools for quite a while now. I'm waiting for that system to be updated before I make some multiplayer videos.If you need multiplayer right now it's probably best to look into third party tools like Photon rather than the Unity system.

Tushar Gupta

Thanks man !

NYCKOS

Hey Code Monkey, this video is really cool! It's practical and I'm sure it'll help many people out there - Thank you for making this great tutorial.

Code Monkey

Glad you find it useful! These last videos are very in-depth and take a lot of work to make but hopefully they will be very useful for someone interested in making such a system.

AZZAMNO1

we had this in Battlefield 2 As squad leader/commander, you could scan entire map with UAV and mark the location of enemies the map GUI you could also send support to your allies vehicles/tank/ammo/health support as Air drop. it pretty fun when your team know what are they doing :Dhttps://battlefield.fandom.com/wiki/Spotting

Code Monkey

Yeah battlefield spotting is also a great very simple communication tool. If anything it's too effective which is why in the last two games they reduced 3D spotting. Maybe a system more like this where you point out a general area rather than a ping which locks onto the enemy would be better.

Home OF Games

in 2D so easy to make that system. but in 3d is hard and more complex

Hobbyist Game Dev

A little more complex, but the only thing changed is instantiating the ping in 3d space (easy enough) and making the ui indicator work based on your camera rotation (Which I can theorize, but not execute)

Home OF Games

In fact, you need to take the objects behind the camera into account. The cursor direction will become inverted so you will need triangular calculations to find the correct angle.

Code Monkey

The main difference would be how you tell if something is onscreen or offscreen. Instead of using screen coordinates you would have to calculate the angle from the pingPosition to the player and see if it's inside the camera frustrum.The UI position would also be based on the angle relative to the player, if behind the player you would do a different calculation.

Other than that everything else would work the same

Solitário

Thank You, you are amazing !

Dhruv Sanan

Please make a video on how to make 2D and 3D game on unity and publish it with an example followed by publishing it. Make all this in one or two videos