Skip to content

A real-time web minigame demonstrating the use of server-side vert.x (java 8) and client-side Javascript. Used as an example at ERNI Coding beer session.

License

Notifications You must be signed in to change notification settings

michalboska/codingbeer-vertx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codingbeer-vertx

A real-time web minigame demonstrating the use of server-side vert.x (java 8) and client-side Javascript. Used as an example at ERNI Coding beer session.

The server side consists of more Verticles. Main verticle is ConfigVerticle which initializes other verticles with default config values

Client side is made with Javascript http://www.html5quintus.com/#demo HTML5 engine.

NOTICE: This is by no means a complete fool-proof implementation of the game. Some topics that would require more attention in production-quality software:

  • Data efficiency: every frame is calculated on the server side and sent as a real-time update (every ~20ms). This may cause unnecessary lags on slower/high ping connections. More efficient way would be only to send change-state messages (ball has hit a wall, player has hit/missed the ball etc...) and let client-side javascript do the simple movement interpolation
  • Security: Current security implementation relies on clients not knowing other players' or games' GUID. GUID is supposed to be unique, so we assume there are no collisions (this is ok), but if someone finds out GUID of some other player, he could influence his games and act on his behalf. In a real world, authentication/authorization/"session" mechanisms would be needed
  • and some more I can't currently think of... :o)

About

A real-time web minigame demonstrating the use of server-side vert.x (java 8) and client-side Javascript. Used as an example at ERNI Coding beer session.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published