Download

Spaceship game how to manage ships

Hi,

I’m currently working on a space ship game but I have some trouble to clear my ming about managing ship.
The game will be MP, with 6DOF Pawn.

In the game the player can choose his ship (unlock ships, bought ships, …) and he can modify the ship (weapon, shield, hull, thruster).

but I’m wondering if I made 1 specific Pawn for each ship that can be possess by the PC or I made 1 pawn with child actor, where the will be a ship, with his spec

what do you think about that ? what will be the best solution ?

1 base pawn class (blueprint) with basic stats, next classes that extends basic functionality and adds something specific for every type of battleship.
first base class should have static mesh (or whatever you use) for your ships mesh.
modifications you can add by spawning actors and attaching them to slots on your base ship.

thank for the reply

so the other ship will by inhertance a pawn, that can be possess by the PC

I have try the child actor solution but I get some big issues with camera movement, I will try your idea

EDIT :

your Idea work well !!

But about the player input, for controlling the ship I made it in the PC or in the base Pawn, actualy I made it in the base pawn

Is PC a PlayerCharacter or PlayerController?

Is a Player(0) directly controls a Pawn?
If yes then this is what you need:
BL_BasicSpaceship -> Blueprint with basic functions of your spaceship, here you have functions for basic movement, shooting and all the common things that all your ships will have
BL_SmallShip -> Inherited from BL_BasicShip on this level you can define how all SmallShips move, shoot etc
BL_BigShip -> Here you can define more complex system of shooting, taking damage, different movement style

Try to build common interface for all your ships to use them no mater which Ship you really control.