Simulate ship bridge

Hi all,
I’m trying to make a space game
I’m starting small and simple, and I have a spaceship flying around, firing some lasers and a couple of planets.
Everything works fine.

Now I’d like to add the capability to switch to an internal view in the spaceship and give order to a bridge crew. You know, like bridge commander.

However, I already had issues with collisions and movement, and I have strong concerns that having characters moving at high speed will actually cause a whole mess due to collisions meshes getting inaccurate.

Anyone ever tried something similar?
Having characters move inside a larger object moving on its own?

I could deactivate collisions for example. This would prevent some of the mess.
However, what if I wanted to move around?

Any ideas? :slight_smile:
Thanks!

You are making a game, not simulation. So fake it however you want.
some ideas:

  • if your game is singleplayer, all movement is relative. So you can make players spaceship stationary, and move everything else. Can be done in simple way: just add spaceship calculated location and rotation to everything outside, keep ship stationary
  • you can also make spaceship as different level, then make sky (skybox) that displays what is happening in space. Again spaceship could be stationary

Dont try to make spaceship dynamic and movable, this will require all collision, navigation emmiters etc to be done in way they can handle movement.

Also dont think how cool would be to have interior of ship (probably because nobody else did it, so it is cool). First think if that adds to gameplay something more than cool factor. Also estimate how long it will take to make, and what else you could have instead done in that time.

Making games is about fun, not simulation or how cool stuff is.

Hi Nawrot,
thanks for the interesting ideas :slight_smile:
I agree with you that I should be pragmatic and fake it :wink:

I’m now thinking which approach would be the best.
Moving everything minus the ship sounds interesting, although I’m wondering whether that would cause more intensive work to the engine than just moving the ship.
However it is a really interesting thought which I did not consider before. That would make the ship easily walkable inside.

I made some progress in the meantime and I actually have the interior of the ship bridge now implemented :slight_smile:
Just it’s without collisions, so I cannot plan to visit it anytime soon :wink:
I could make the “ship interior” a separate level like you say, in this way I can visit it during a dedicated event.
On the other hand, for space games it would be great to be able to use the World Composition. If I choose to isolate the ship interior in its own level, I would lose that possibility to make an open world.
Interesting dilemma. I’m a bit counting on UE5 to solve that in the near future :slight_smile:

Here is an image of how it looks like in game at the moment (I just finished composing it) :slight_smile:
I’m really happy of the result, it looks better than I was hoping for :smiley:
And it was very simple and fast!

1 Like

If physics aren’t going to be happening inside the ship (i.e. it will only be characters talking and moving), then you can just parent the characters to the ship and animate them moving along it. The transforms will be set in local (component) space of the ship, not world space, so movement will be simple. This setup will allow you to fully simulate the ship itself without having to do any “trickery”.
Though, I’ve haven’t tested this, so you have to try it yourself.

If you want physics to be possible inside the ship, you can disable gravity and apply a constant force to make physical actors go towards the gravity of the ship; and, if gravity is disabled in the ship, the boxes will float in zero-g naturally. To make the actors sleep, you would track the local location each frame, and if the location is similar enough, you would disable physics and parent them to the ship.

Hi guys,
thank you for the excellent ideas :smiley:

  1. I though about it and tried to experiment it a little.
    I first added the bridge inside the ship mesh as a child actor. It failed hilariously, with all single meshes rattling around with clear gaps between each other.
    So I switched to static meshes.
    I disabled their collision as the bridge was colliding with the rest of the ship.
    While writing, I just had the idea to switch on and off the collisions of the inside and the outside of the ship. That might allow me to walk around it, at least when the ship is only moving at slow speed and with good position accuracy. Hmmmmm…

  2. I was not aware of scene-capture and render-to-texture methods.
    I will look into it, it might come useful to make a “screen” showing an external view. I can imagine picture-in-picture result would somehow affect performance, but it might be worth a try if it fits in the bridge design. It’s very famous the screen in star trek bridges after all :slight_smile:

  3. I’ll search around his posts. Maybe I find something useful. Thanks for the heads up!

  4. Thanks midgunner, I will think about these methods. So far it seems that a dynamic ship populated of static objects for the bridge is a stable design. No rattling of the components, except high speed far from (0,0,0), lights and shadows work very well, no awkward collisions between components.
    Regarding the inner physics, I will take a good look on how this can work. The only real issue and limitation I believe is the float accuracy at high speed and long distances.
    But for a start I think I have much to consider :wink:
    And hey, as far as I could see UE5 will have double precision, so these issues will likely be mitigated soon :smiley:

Thanks!

1 Like