| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="Asciidoctor 1.5.4"><title>multiplayer_template</title><link rel="stylesheet" href="./asciidoctor.css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
- <link rel="stylesheet" href="./coderay-asciidoctor.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css"></head><body class="article toc2 toc-left"><div id="header"><div id="toolbar"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/src/docs/asciidoc/multiplayer_template.adoc"><i class="fa fa-pencil-square" aria-hidden="true"></i></a><a href="https://github.com/jMonkeyEngine/wiki/new/master/src/docs/asciidoc/"><i class="fa fa-plus-square" aria-hidden="true"></i></a><input dir="auto" style="position: relative; vertical-align: top;" spellcheck="false" autocomplete="off" class="searchbox__input aa-input" id="doc-search" name="search" placeholder="Search in the doc" required="required" type="search"></div><h1>multiplayer_template</h1><div class="details"><span class="author" id="author"></span><br><span id="revnumber">version ,</span> <span id="revdate">2016/03/17 20:48</span></div><div id="toc" class="toc2"><div id="toctitle">Table of Contents</div></div></div><div id="content"><div class="paragraph"><p>This page is to make your own multiplayer game, mainly by using a template and understanding how it works.</p></div>
- <div class="paragraph"><p>The template for a multiplayer project can be found here:
- <a href="http://hub.jmonkeyengine.org/forum/topic/multiplayer-game-template/">http://hub.jmonkeyengine.org/forum/topic/multiplayer-game-template/</a></p></div>
- <div class="paragraph"><p>Additional information e.g. links to jars can be found here:
- <a href="http://hub.jmonkeyengine.org/forum/topic/need-help-need-jar-files-for-a-project/#post-292081">http://hub.jmonkeyengine.org/forum/topic/need-help-need-jar-files-for-a-project/#post-292081</a></p></div>
- <div class="paragraph"><p>Class diagram (template only):
- <a href="http://puu.sh/a4azI/8c37cd8cf4.png">http://puu.sh/a4azI/8c37cd8cf4.png</a></p></div>
- <div class="paragraph"><p>A lot of work has to be done, but the best thing to start with, is summing up the classes, with the variables and explaining what the use is of those.</p></div>
- <div class="paragraph"><p>Classes (by package):</p></div>
- <div class="paragraph"><p>NetworkRpg:</p></div>
- <div class="olist arabic"><ol class="arabic"><li><p>GameClient (Interface)</p></li><li><p>GameConstants</p></li><li><p>GameGuiController</p></li><li><p>Main</p></li></ol></div>
- <div class="literalblock"><div class="content"><pre> private AppSettings settings; sets the resolution
- private boolean isFullScreen = false; obvious: fullscreen</pre></div></div>
- <div class="olist arabic"><ol class="arabic"><li><p>MenuInputMapping (No variables)</p></li><li><p>RemoteGameClient</p></li><li><p>ServerMain</p></li><li><p>ThirdPersonCamera</p></li><li><p>TimeProvider (Interface)</p></li></ol></div>
- <div class="paragraph"><p>NetworkRpg.AppStates:</p></div>
- <div class="olist arabic"><ol class="arabic"><li><p>BaseAppState</p></li><li><p>ConnectionState</p></li><li><p>EntityDataState</p></li><li><p>ErrorState</p></li><li><p>GamePlayState</p></li><li><p>MainMenuState</p></li><li><p>ModelState</p></li><li><p>WorldState</p></li></ol></div>
- <div class="paragraph"><p>NetworkRpg.Components:</p></div>
- <div class="olist arabic"><ol class="arabic"><li><p>ModelType</p></li><li><p>Position</p></li><li><p>walkDirection (No variables)</p></li></ol></div>
- <div class="paragraph"><p>NetworkRpg.Factories:</p></div>
- <div class="olist arabic"><ol class="arabic"><li><p>EntityFactories</p></li><li><p>GameModelFactory</p></li><li><p>ModelFactory</p></li></ol></div>
- <div class="paragraph"><p>NetworkRpgt.Handlers:</p></div>
- <div class="olist arabic"><ol class="arabic"><li><p>GameMessageHandler</p></li></ol></div>
- <div class="paragraph"><p>NetworkRpg.Networking:</p></div>
- <div class="olist arabic"><ol class="arabic"><li><p>Util</p></li></ol></div>
- <div class="literalblock"><div class="content"><pre> public static final int tcpPort = 1337; portnumber used for tcp connections
- public static final int udpPort = 1337; portnumber used for udp connections (http://www.diffen.com/difference/TCP_vs_UDP)
- public static final String GAME_NAME ="Network RPG"; name of the game
- public static final int PROTOCOL_VERSION = 1; version of the udp/tcp protocol being used</pre></div></div>
- <div class="paragraph"><p>NetworkRpg.Networking.Msg:</p></div>
- <div class="olist arabic"><ol class="arabic"><li><p>ChatMessage</p></li><li><p>CommandSet</p></li><li><p>GameTimeMessage</p></li><li><p>PlayerInfoMessage</p></li><li><p>ViewDirection</p></li></ol></div>
- <div class="paragraph"><p>NetworkRpg.Objects:</p></div>
- <div class="olist arabic"><ol class="arabic"><li><p>Avatar</p></li></ol></div>
- <div class="literalblock"><div class="content"><pre> public Spatial avatarSpatial; holds information about the character
- private Node avatarNode; a node which contains the modelnode
- private Node model; a node which contains your character (the green thing on the map)
- public BetterCharacterControl avatarControl; this is used to set the gravity
- private SimpleApplication App; we need this to get the rootnode
- private BulletAppState bulletAppState; allows using bullet physics in an Application.
- private Node rootNode; the node which gets all the nodes (add to this one, and it'll be visible)
- private AnimChannel animChannel; used to change the current anitmation
- private AnimControl animControl; this is needed to create an animchannel
- private BitmapText label; label where we add a the textnode to
- private Node textNode; name above the head of the player
- private String idleAnim = "IdleBase"; name of the animation (not 100% sure)
- private String walkAnim = "RunBase";
- private String attackAnim = "SliceHorizontal";
- private String jumpAnim = "JumpLoop";
- private BitmapFont guiFont; the font
- private String playerName; name above the avatar</pre></div></div>
- <div class="paragraph"><p>NetworkRpg.Services:</p></div>
- <div class="olist arabic"><ol class="arabic"><li><p>EntityDataService</p></li><li><p>GameSystems</p></li><li><p>MovementService</p></li><li><p>Service (Interface)</p></li></ol></div>
- <div class="paragraph"><p>This is a total of 35 classes.</p></div></div><div id="footer"><div id="footer-text">Version <br>Last updated 2019-09-02 17:15:00 +00:00</div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script><script>docsearch({
- apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
- indexName: 'jmonkeyengine',
- inputSelector: '#doc-search',
- debug: false // Set debug to true if you want to inspect the dropdown
- });</script></body></html>
|