Advise on Multiple Characters

Hey guys,

I just wanted to ask you guys some advise on a matter I’ve been thinking about lately.
Currently I want to create a system where the player can choose from a various range of characters, for now it will just be 2 characters but the game might end up with 20 different ones.

These characters all have their own abilities and traits. So for example, to start with, I want to have a Unicorn and a Fish. What is the best way to set this up? Here’s a few possibilities I came up with.

Multiple Character Blueprints Setup

  • One PlayerController Blueprint.
  • A Character Blueprint for the Fish
  • A Character Blueprint for the Unicorn

This one would seem easiest to me because of the used meshes. Of course a Unicorn has a completely different mesh, collision, speed etc than a Fish. So for that reason I think it would be easier have a Character Blueprint for each of the animals.
The downside however is that, if there’s eventually 30 animals in the game, there are 30 character blueprints, when there are 200 animals, there are 200 blueprints.
And how would you deal with the different abilities of the animals, a fish should be able to dive but a unicorn should be able to fart a rainbow… Should that be dealt with in the same PlayerController blueprint?

One of Each

  • One PlayerController Blueprint
  • One Character Blueprint

This one would keep the Content Browser much cleaner as there’s just one of each. You could call the static mesh and animations of animal and just put them in the Character Blueprint on the fly. However, how would the collision model be detected? And since there are a lot of different abilities for each animal, I think the blueprint would become one big mess.

So this is what I came up with and I struggle with which one to choose from. Maybe you guys can give me some insights on how to handle this situation and maybe propose a much better idea on how to handle it. Also, where should abilities be handled? Should it be in the PlayerController or in the Character Blueprint itself?

I hope you guys can help me on this one! A big thank you in advance!
Serellyn

I am creating an Minigame-Madness where you have different controls and characters for each mini game, so I had to think about this too.

Inheritance of Classes (and therefore Blueprints) is your friend. You can build whole trees with this for example:

“TheSuperMegaRootCharacter” has all the basic stuff in it, which is common to every character.
From there, you might have 3 blueprints which inherit from the first one: Seacreature, Landcreature and Aircraftie (or whatever). Those probably have some very specific properties and specific controls. I highly suggest putting those controls into the character, not the PlayerController.
How deep your inheritance should go is up to you, but I suggest you use 3+ levels (don’t forget the root one. You might not think of any useful common functionality now, but I guarantee you suddendly find out you have some basic functionality you want to have).

The beauty of inheritance is, that you can add, overwrite and even disable (by overwriting and doing nothing) the stuff you defined in the parent blueprint!

I doubt that you have 300 differently controlled characters. So I suggest you use inheritance and group the blueprints by their abilities and/or controls. If you have one billion different horses, you should make one horse blueprint and somehow let the user change the mesh/texture instead.

In the best case, you have maybe 5 blueprints, but endless different animals.

Thank you for your response, you’re definitely right!
I’ve used something like that before in the creation of applications, but somehow when working with Blueprints I don’t think about stuff like that.

I can imagine needing at least 4 levels of inheritance, bear with me and check if I think this right.

  • First level: SuperDuperRootCharacter
  • Second level: Land animal
  • Third level: Horse
  • Fourth: Specific Horse

This might make sense right? Just one more thing, all movement is best to place in the Character Blueprints right? But when do you use the PlayerController?

Ofcourse that’s a must! Thank you so much for your insights :slight_smile: Really helpful

Yeah, that’s the way I would go too. I only use the player controller for common functionality like the hotkey for the game menu, the ranking list, etc.

Since the movement depends on the character type, I put them all into the character BPs. Most of it is in the 1st and 2nd level. Since you can override and disable it in 2nd level, you probably could put most into the first level and go with disabling (instead of adding) stuff. That’s up to you :slight_smile:

Oh, and an other nice feature to be used in such cases: Blueprint Interfaces. For example if your unicorn and the shark can shoot lasers (that’s a must, right? :wink: )

Could you also please take a look at my problem at this location: Multiplayer client movement issues - Multiplayer & Networking - Unreal Engine Forums

I’ve been stuck at it for a very long time now…

Personally I think I would set it up with just 3 levels like this:

Parent: RootCharacterBP

Child of Root: biped

Child of Root: quadruped

Child of Root: fish

Child of Root: bird

Child of biped: apes, humans, ect.

Child of quadruped: horses, deer, dogs, cats, etc.

Child of fish: dolphin, fish, sharks, etc.

Child of bird: eagles, hawks, etc.

there could be other children of root for creatures that move differently like maybe ‘hopping’ for frogs rabbits etc. or ‘crawling swimmer’ for like alligators but the biped, quadruped, fish, and bird covers a great deal of creature movement that is similar. just my 2 cents.

Currently I’ve got it the way you’re describing. I’ve got RootCharacter → LandCharacter → Character.

It indeed seems the most sensible way.