TPlayer Class Deprecated?

I want to create an RPG. I’m currently working on the character generator and I’m ready to write the code to save the attributes and stats to a class that represents the player character. Ideally, I would like to extend an already existing class that is built into the engine that maybe already handles things like player location/transform, movement, and other game mechanic aspects of the player.

At one time, I found the TPlayer class, and I thought I could use that. However, it now only shows up in a “deprecated” part of the manual and is no longer present in the API reference. Is there a replacement class we should use instead? Or should I just create the class I want from scratch?

Hello,

Indeed, TPlayer class is deprecated and the advised solution is just to implement your own.

That is because TPlayer class makes a number of assumptions how it is used, and in practice wasn’t suitable to represent a player in general games. TPlayer works together with other “Utilities for typical 3D games” documented on Utilities for typical 3D games | Manual | Castle Game Engine , read in particular overview on Overview | Manual | Castle Game Engine . These units work nicely for “typical 1st-person shooter” where level design was done completely in Blender (I used it originally in “The Castle” game on GitHub - castle-engine/castle-game: First-person shooter style game in a dark fantasy setting, using Castle Game Engine ) but is too inflexible in general. It doesn’t map to other game types, it doesn’t map to design your levels visually using CGE editor.

So we have (or will have – in case of creature AI) better replacements for all these features. And some decisions, like “what is a player, how to represent player inventory, stats” seem best to leave them up to a particular game to decide.

Ok. That makes sense. Thanks for the response!