epagagames.com

Input and Multiplayer

February 2, 2015 Jedic 0

I’ve been busy working on polishing what will be the alpha release of Spoxel. As part of that, I have started to work on multiplayer. Spoxel is built from the ground up to be multiplayer, however, when I first tested connecting clients from different PC’s I noticed a pretty serious problem. It had all sorts of problems such as the player position jumping and causing chunks to unload. After pausing for a moment to take a deep breath, I dove into profiling the application and was quickly able to fix the most serious issues but then I ran across a design flaw.

How you handle input is important in any game but it is especially important in multiplayer games. Due to how multiplayer games work you have to handle all sorts of concurrency and time delay problems. I’ve been working off an authoritative server model so there is a delay between when a player hits a button to move to when the server acknowledges and simulates whats going on and then sends the results back to the client. This of course isn’t very responsive and feels sluggish. I had a form of client side prediction in order to combat this but it left a lot to be desired. I ended up implementing a solution found here. After some bug fixing it worked great!

Along with all of the bug fixes I’ve really been kicking the content creation into high gear. A screenshot from one of the early boss fight tests is below.

Boss Fight Test

An incomplete change list is below:

  • Added Fire Crystal Ore
  • Added Ice Crystal Ore
  • Added Nature Crystal Ore
  • Added Arcane Crystal Ore
  • Added icon for Fire Crystal
  • Added icon for Ice Crystal
  • Added icon for Nature Crystal
  • Added icon for Arcane Crystal
  • Added Necromancer Steve Boss mob
  • Changed world gen for tier 1 dungeon
  • Added a frost dungeon generator type
  • Added marble ore type and blocks
  • Moved water simulation to another thread and limited its update rate
  • Changed the voxel terrain generation to cache new changes and not automatically update
  • Added Tower Boss Mob
  • Added the ability to remove characters from the menu
  • Added the ability to remove worlds from the menu
  • Added new oak tree models
  • Added door type
  • Added mouse over highlight for usable objects
  • Added armor icons for all types
  • Added weapon icons for all ores
  • Fixed a bug with the growth simulator that caused it to chain growth updates which would load unneeded chunks
  • Added a block place limit
  • Added spell component mark
  • Added spell component teleport
  • Added spell shape loop
  • Added necklace art
  • Added a new Snow Golem mob
  • Added Long Fall necklace which avoids fall damage
  • Added a small delay for effect removal to make up for lag compensation
  • Numerous other bug fixes

Leave a Reply

Your email address will not be published. Required fields are marked *