Game Development Community

Customized texture on a per player basis

by Pat AfterMoon · in Torque Game Engine · 06/25/2004 (2:00 am) · 2 replies

Hi all,

For my game, every players have the same vehicles, but each vehicle need a highly customized texture, than can change during gameplay.
Exemple of parameters :
- The name of the player displayed on the vehicle (up to 12-16 char)
- The logo of the player displayed on the vehicle (selectable throught a long list, maybe uploadable in the future)
- The clan name of the player displayed on the vehicle (up to 12-16 char)
- The logo of the clan displayed on the vehicle (selectable throught a long list, maybe uploadable in the future)
- A base color for the vehicle based on player rank
- some decorations selectable by the player
- 3-4 vehicle parameters directly visible (engine type, level of shield, ammunition used ...)

This is for a cooperative game, and I want the maximum of player's parameters directly visible during gameplay, without the need to look at the player profile ...

Do you know some game, demo or resource about this subject ?

I think about creating some base png texture and generate the final texture on the fly (on each client computer) for each player based on all the parameters.
Is it a good approach ?

Thanks in advance

#1
06/25/2004 (1:21 pm)
Sounds pretty easy if you know the modeling usage.

You have a base vehicle texture that is UVMapped and a smaller 128x128 or so texture mapped to the area you would like the logo to be on the vehicle. On the main page or a created player page the client can choose the logo for his/her vehicle. Once in the game just apply the texture with "setSkinName(name_here)" function. For the vehicles to show the player names you will need to edit the GuiShapeNameHud.cc file for the Vehicles. Then just call "veh.setShapeName(client_name)" to set its name.

The format for nameing your vehicle skins are the key here..

Wrong
vehiclelogo_aa.png
Correct
base.vehiclelogo_aa.png

The function setSkinName looks for the "base." no matter what so if you call setSkinName(vehiclelogo_aa); It will search for the "correct" file format above. As you can see, it wouldnt be to difficult.. If you need any further help let me know.

Sam
#2
06/28/2004 (1:57 pm)
Thanks for your help Sam, your resource Torque TeamId is also very interesting