Skip to content
This repository has been archived by the owner on Aug 15, 2022. It is now read-only.

Engine Facade

Brent Farris edited this page Apr 15, 2020 · 8 revisions
Directory Previous Next
Directory Serialization Strategy BMSByte

The Engine Facade is the way in which Forge Networking can access your game code in order to report back to it. It is the handle to your game code that Forge keeps a reference to, of which, you will find useful in things like Network Message Interpreters.

Default Forge engine facade

By default, Forge comes with a class named ForgeEngineFacade for you to use, modify, or replace. I would recommend that you do not put too much inside of this class, what you should do instead is use it as a facade, by which I mean it should know how to get at other parts of your code rather than doing all the work itself; in many ways it can act like a relay.

Registering the engine facade for Forge

forge will need to know about your engine facade, if you create a new one or modify the existing one. The way that it knows about this is through a registration method that you should call when initializing the network. First get a reference to the INetworkMediator object and then call the ChangeEngineProxy function passing your IEngineFacade. You can see this being done in the Multiplayer Menu code through the connect button or the host button.


Directory Previous Next
Directory Serialization Strategy BMSByte

Home

Getting Started
Network Contract Wizard (NCW)
Network Object
Remote Procedure Calls (RPCs)
Unity Integration
Basic Network Samples
Scene Navigation
NetWorker
Master Server
Web Server
Netcoding Design Patterns
Troubleshooting
Miscellaneous
Forge Networking Alloy
Steamworks
Clone this wiki locally