Developing 3DRAD MultiPlayer Games With Components
Apr 25, 2015 18:09:55 GMT
Power Supersport, Famer, and 2 more like this
Post by mikehense on Apr 25, 2015 18:09:55 GMT
OVERVIEW
Making a multiplayer game is hard enough... whether its done in 3DRAD, or any other game engine, that additional level of thinking and planning required when developing a multiplayer game can be quite daunting...
I'm gonna try to make it simpler... i mean really simpler...
Today i'm introducing something that has been sitting on the sidelines here for a while now, and maybe now is the time to dust it off and get it working...
Today i'm embarking on Component Game Development For 3DRAD... (da daaaa!!! )
Join me.... c'mon, share the pain
WHAT IS A GAME COMPONENT
A Component is an assembly made up of functional logic, and possibly a visual element or two, that you as a developer can add to your project... it's as simple as that...
Component Game Development is where you take prebuilt Components, and drop em into the editor... maybe make a few links here and there... a few customizations so that the game is your own unique creation... and wallaahhhhh... you've got an instant game in a fraction of the time it would otherwise take...
Game Components should be designed to do a single thing... nothing more... They should allow a bit of flexibility so that the developer can customize certain aspects as their projects require...
MULTI-PLAYER IN 3DRAD
Simply put, a 3DRAD multi-player game is made up of a minimum of two projects... one that creates a game Server and one that creates a game Client... The Server is where the game actually takes place, and the person who started the game plays. The Client is where the other players join the game, and though they think they're controlling the objects they see, in reality they are sending messages to the Server via synched event objects, and the counterpart objects on the Server are the ones actually being remotely controlled. The objects the Client sees (usually skinmeshes) are merely synched to move as their counterparts on the Server move...
All 3DRAD Component Game Development is going to be multi-player development... you can either start a game, or join one... Similar to an old school favorite of mine (the original UnReal Tournament), if the game requires opponents, then AI logic will need to be part of the opponent when it is not being controlled by a real person Client player.
LETS GET STARTED - THE GAME SERVER
As mentioned above, every game project starts out with, or should start out with a plan... The plan here will be to build a simple first person walk thru level using the default objects 3DRAD comes with, along with our first two Multi-Player Game Components...
You normally will start out with the usual stuff you find in any Rad project... A Terrain, a Skybox, a GForce, and a Sunlight object...
Next we add the first of our Mulitplayer Components... The Plugin_Net Server Start Component and the Plugin_NetServer Player 0 Component...
Net Server Start Component
This Component Starts Up The Server and Initializes 3DRAD networking functionality... Merge this to your project and there's nothing else that you need to do, but you can go to the Script and change the Session Name, Player Name, or Port Number if you need to...
NetServer Player 0 Component
This Component adds the first player (Player 0) to the game... Merge this to your project and then to link the Character object to your Terrain, and set the property... You'll also need to link the Char Rigidbody to your Terrain and GForce...
You have your first mutli-player server game almost finished... Next add a player for the first player that will join your game...
NetServer Player 1 Component
Merge this to your project and make the same links that you did for the Player 0 Component... OK, now you're done... Your first Component based multi-player game is done and ready to run... run it and make sure everything works...
OK... now we gotta have some Clients to join the game... we'll do that next, but in the interim... if anyone wants to test this and has put together a server already, post your connection url below and i'll try to connect and test it out...
Making a multiplayer game is hard enough... whether its done in 3DRAD, or any other game engine, that additional level of thinking and planning required when developing a multiplayer game can be quite daunting...
I'm gonna try to make it simpler... i mean really simpler...
Today i'm introducing something that has been sitting on the sidelines here for a while now, and maybe now is the time to dust it off and get it working...
Today i'm embarking on Component Game Development For 3DRAD... (da daaaa!!! )
Join me.... c'mon, share the pain
WHAT IS A GAME COMPONENT
A Component is an assembly made up of functional logic, and possibly a visual element or two, that you as a developer can add to your project... it's as simple as that...
Component Game Development is where you take prebuilt Components, and drop em into the editor... maybe make a few links here and there... a few customizations so that the game is your own unique creation... and wallaahhhhh... you've got an instant game in a fraction of the time it would otherwise take...
Game Components should be designed to do a single thing... nothing more... They should allow a bit of flexibility so that the developer can customize certain aspects as their projects require...
MULTI-PLAYER IN 3DRAD
Simply put, a 3DRAD multi-player game is made up of a minimum of two projects... one that creates a game Server and one that creates a game Client... The Server is where the game actually takes place, and the person who started the game plays. The Client is where the other players join the game, and though they think they're controlling the objects they see, in reality they are sending messages to the Server via synched event objects, and the counterpart objects on the Server are the ones actually being remotely controlled. The objects the Client sees (usually skinmeshes) are merely synched to move as their counterparts on the Server move...
All 3DRAD Component Game Development is going to be multi-player development... you can either start a game, or join one... Similar to an old school favorite of mine (the original UnReal Tournament), if the game requires opponents, then AI logic will need to be part of the opponent when it is not being controlled by a real person Client player.
LETS GET STARTED - THE GAME SERVER
As mentioned above, every game project starts out with, or should start out with a plan... The plan here will be to build a simple first person walk thru level using the default objects 3DRAD comes with, along with our first two Multi-Player Game Components...
You normally will start out with the usual stuff you find in any Rad project... A Terrain, a Skybox, a GForce, and a Sunlight object...
Next we add the first of our Mulitplayer Components... The Plugin_Net Server Start Component and the Plugin_NetServer Player 0 Component...
Net Server Start Component
This Component Starts Up The Server and Initializes 3DRAD networking functionality... Merge this to your project and there's nothing else that you need to do, but you can go to the Script and change the Session Name, Player Name, or Port Number if you need to...
NetServer Player 0 Component
This Component adds the first player (Player 0) to the game... Merge this to your project and then to link the Character object to your Terrain, and set the property... You'll also need to link the Char Rigidbody to your Terrain and GForce...
You have your first mutli-player server game almost finished... Next add a player for the first player that will join your game...
NetServer Player 1 Component
Merge this to your project and make the same links that you did for the Player 0 Component... OK, now you're done... Your first Component based multi-player game is done and ready to run... run it and make sure everything works...
OK... now we gotta have some Clients to join the game... we'll do that next, but in the interim... if anyone wants to test this and has put together a server already, post your connection url below and i'll try to connect and test it out...
Attachments:
NetServer Start Component.3dr (112.58 KB)
NetServer Player Character 0 Component.3dr (211.24 KB)
NetServer Player Character 1 Component.3dr (325.46 KB)