Skip to content

A beginner-friendly step into using Socket.io for LibGDX browser games. Designed as followup to Brent Aureli's tutorial.

License

Notifications You must be signed in to change notification settings

Guy-L/GdxGame-SocketHTML-Demo

Repository files navigation

The Basic LibGDX Browser Game, Now with Socket.io

Prologue

#1589F0 TOWRITE


Summary

#1589F0 TOWRITE



What's Included

The Basics:

  • core/src/com/mygdx/game/ MyGdxGame

    • The classic LibGDX main game class.
      You'll find helpful comments (60% done) and code very similar to what you got while following the tutorial. I invite you to take a good, long look at the syntax of the Socket object you will interact with, as there are some slight differences. Featured events: "connect", "socketID", and a bonus "pong" event further showcasing how to retrieve sent data.
  • server/ index.js

    • The basic Node.JS server.
      Nothing here you didn't see in the tutorial, but you'll also have to look at this file to understand what's going on. Featured events: "connection", "socketID", "disconnect", a bonus "myPing" (fun fact: "ping" is a reserved event name, so we can't use it).

The Technical Stuff:

  • core/src/com/guy/ Core Networking Classes

    • #1589F0 TOWRITE
  • desktop/src/com/guy/ Desktop Implementation

    • #1589F0 TOWRITE
  • html/src/com/guy/ HTML Implementation

    • #1589F0 TOWRITE
  • html/src/com/epiko/ TJSocketIO

    • #1589F0 TOWRITE
  • build.gradle & GWT

    • #1589F0 TOWRITE
  • html/webapp/ socket.io

    • This is where the Web game client stores the Socket.io JS build it's calling.



How to Set Up

Prerequisites

#1589F0 TOWRITE


Debugging your game

#1589F0 TOWRITE


Setting up for remote servers

#1589F0 TOWRITE



Planned Features

#1589F0 TOWRITE





About

A beginner-friendly step into using Socket.io for LibGDX browser games. Designed as followup to Brent Aureli's tutorial.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages