Hello,
I am working on a Pinball-Game and facing a designproblem I am not sure what’s best to solve.
For reference: @memn4rch.bsky.social on Bluesky
I can make a Pinball Table either as
A Level
A Level Instance
An Actor which contains all other actors/components
My goal is to support Splitscreen and maybe even networked multiplayer.
This removes the option for a regular level. I can’t spawn copies of it for splitscreen, let alone Multiplayer.
Level Instance would work for Splitscreen, but does it work/replicate properly when spawned by the server?
An Actor would allow me to spawn any number of copies for Splitscreen and replicate properly for networked Multiplayer. But would it be a good decision to pretty much build an entire level in an actor? Prototyping is a bit limited here as the Actor does not allow for BSPs, like the Level-Editor does.
I think you’re on the right track with the thoughts, but you’ve left out one idea.
The level contains the Machine, however each individual part can be placed within the level as well, it doesn’t have to be contained in the Pinball machine actor. That being said… I think it would be a good idea to go that way. Don’t think of it as building a level in an actor- think of it as:
Level: Arcade- also known as “Map”
Actors: Pinball Machine(s), Players, Decor
You can have different created pinball TABLES that you switch out, with the overall machine being a static mesh with no table. Then create the tables individually as actors and swap them out for new machines, not “Levels” as that translates to “Map”- but I get what you’re saying.
The thing is, I can spawn everything at runtime but where and how do I design the composition? (best practicewhise) A Pinball-Table is not just a static mesh but a set of active/interactive actors.
From some quick testing, it seems level instances are NOT replicated by any means. Nor any of the actors in it. Can someone confirm this?
Oh wait, I may have an Idea. Everything in the Scene which does not need to to replicated goes into the level which will be attached as a level instance component in an actor. And all the active elements could go as actor components into that top actor. So making a hybrid?
Initially I did not want to put everything, including static elements, into a single actor because it’ll get cluttered really quick.
Correct, I’m saying the big machine holding the table could just be a static mesh. Then you can reuse the static mesh and simply switch out the table and boom you have a whole new pinball machine.
The thing is, the static mesh alone is not a table. So again, it’s about composition. On the table itself, there are interactive objects, if I want to switch the table, those have to go, too.
I am specifically talking about the table, not things like the cabine.
However I MAY have found the solution:
If I create an actor with a level instance component that holds my level with the table as reference, set it to replicate, load into an empty level and spawn this actor, the level instance gets loaded and actors in it will replicate properly!
SO that means I can design my tables in regular levels and load them on the fly into the “hub” level as needed and as many as I need!
Bonus: With this method, the tables angle can be specified on load to allow players adjusting it if they want