User Tools

Site Tools


global:netcode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
global:netcode [2020/03/09 06:00]
Mistermind [UFE 2.0 Netcode]
global:netcode [2024/01/07 06:17] (current)
Mistermind
Line 3: Line 3:
 **UFE Netcode** is the second iteration of the network system for UFE. It allows the game to run online matches in a smooth lag-free environment thanks to its native //rollback mechanics// and //deterministic physics//. The netcode also uses raw //manual tracking// to its own core variables, optimizing CPU usage (even mobiles).\\ **UFE Netcode** is the second iteration of the network system for UFE. It allows the game to run online matches in a smooth lag-free environment thanks to its native //rollback mechanics// and //deterministic physics//. The netcode also uses raw //manual tracking// to its own core variables, optimizing CPU usage (even mobiles).\\
 The new network options also comes with its own client/server structure (powered by Photon Network) allowing direct player connection without the use of IP. The new network options also comes with its own client/server structure (powered by Photon Network) allowing direct player connection without the use of IP.
- 
-[[http://www.ufe3d.com/demo/ufe2/pc/UFE2.zip|PC]] | [[http://www.ufe3d.com/demo/ufe2/webgl/|WebGL]] | [[http://www.ufe3d.com/demo/ufe2/android/UFE2.apk|Android]] 
- 
-  * Hit Online to search for a match (US Server) 
-  * All builds are **cross-platform** 
  
  
Line 19: Line 14:
   * **What is Rollback?**   * **What is Rollback?**
 Rollback (name might change depending on game or developer) is a technique in which a game is able to return to a previous frame, change the outcome of an event (say, an input), and return to the current frame, all in a span of a single frame of animation. This allows a game to //catch up// with whatever concurrent event instead of [[global:network|waiting]] for both clients to sync up. When done right this can create an experience nearly identical to local play.\\ Rollback (name might change depending on game or developer) is a technique in which a game is able to return to a previous frame, change the outcome of an event (say, an input), and return to the current frame, all in a span of a single frame of animation. This allows a game to //catch up// with whatever concurrent event instead of [[global:network|waiting]] for both clients to sync up. When done right this can create an experience nearly identical to local play.\\
-The subject can be extensive and have been topic of several games for years (often referred as [[https://en.wikipedia.org/wiki/GGPO|GGPO]]). You can read more about it on this great article by //@mauvecow//[[http://mauve.mizuumi.net/2012/07/05/understanding-fighting-game-networking/]]+The subject can be extensive and have been topic of several games for years (often referred as [[https://en.wikipedia.org/wiki/GGPO|GGPO]]). If you'd like to know more about the subject, there is a great video from Core-A Gaming on youtubehttps://www.youtube.com/watch?v=0NLe4IpdS1w
  
   * **If Rollback is so good, why use Frame Delay at all?**   * **If Rollback is so good, why use Frame Delay at all?**
Line 139: Line 134:
  [RecordVar] public bool isBroken;  [RecordVar] public bool isBroken;
  
- void UFEFixedUpdate() {+ public override void UFEFixedUpdate() {
  if (position.y > .1f) BreakMe();  if (position.y > .1f) BreakMe();
  }  }
Line 152: Line 147:
 </code> </code>
  
-Notice we only use the //[RecordVar]// attribute to track the variables that can change during gameplay. Weight doesn't need to be tracked because it's assumed that value is persistent.\\+Notice we only use the //[RecordVar]// attribute to track the variables that can change during gameplay. Weight doesn't need to be tracked because it's assumed that value is persistent. //[RecordVar]// variables must be public.\\
 Also, notice we are using //UFEFixedUpdate// instead of //FixedUpdate// and //UFEBehaviour// instead of //MonoBehaviour//. This is so we can have those events deterministic.\\ Also, notice we are using //UFEFixedUpdate// instead of //FixedUpdate// and //UFEBehaviour// instead of //MonoBehaviour//. This is so we can have those events deterministic.\\
 An example of the auto-tracking system can be found under the projectile script: ''UFE\Scripts\ProjectileScripts.cs'' An example of the auto-tracking system can be found under the projectile script: ''UFE\Scripts\ProjectileScripts.cs''
Line 170: Line 165:
 ---- ----
 ===== Network 2.0 Options ===== ===== Network 2.0 Options =====
 +For a detailed explanation on each option [[global:network|click here]].
  
-{{ :global:global_netcode.png?nolink |}}+{{ :global:global_networkoptions.png |}}
  
-For a detailed explanation on each option [[global:network|click here]].+---- 
 +====== Video Tutorials ====== 
 +{{youtube>OSovR17apP0?large}} 
 +{{youtube>-dmVAf_cyN8?large}} 
 +{{youtube>j3B-lhd8JBw?large}}
  
  
global/netcode.1583748042.txt.gz · Last modified: 2020/03/09 06:00 by Mistermind