Best way to add user profile photos?

Hi guys. What is the latest and the recommended way of adding user profile photos to a game? Just to give you an example, lets say an online board game with up to 4 players. Each player will have a small round photo on the screen next to their name. Ultimately, these profile photos could come in from Facebook or other social networks, or just from a URL on the Internet.

If I was to have a dedicated atlas bundled with the game, then replace the texture for the atlas for each round of the game on the fly would be an acceptable solution? This is because the players can change after a round of a game, so will need to update the photos.

You could create an atlas and texture and update that at runtime, or a simpler solution is to create a gui texture per profile photo. Something like in this example:

1 Like

Thanks @britzl . I’d love to use the GUI for the photos as it is simpler but unfortunately, there will be game objects been dragged around by the users and because of the GUI elements always been rendered on top, it won’t look right. I’ve attached an example from a similar game. The arrows in the screenshot point to tile movements.

image

Ok, then I suggest that you create an atlas as a holder of your avatars/photos and modify it at runtime. Example:

2 Likes

@britzl Thank you for your input. You are a superstar!

1 Like

Just an update for anyone out there. I’ve decided to go with this solution. To make the tiles (game objects) render on top of the profile photos (GUI nodes), I had to copy the existing sprite material and rename it to something like “sprite_above_gui”. I have then made a copy of the render script and added a new render predicate for the new material. I am now able to use this new material on GO when I want it to be rendered above the GUI.

3 Likes