Skip to content

Blind.io Networking API

September 14, 2016

I’m building a list of events that trigger messages between the client and the server. I have a feeling like this list will grow as I learn what goes into making a multiplayer experience.

Assume all messages included a timestamp

Server Side Events

Every Tick

Scores

All [ int score ]

Wind Direction and Phase

All float phase, direction

Players pos and vel

All [ Float px, py vx, vy ; int id ]

Knives pos and vel

All [ Float px, py vx, vy ; int id ]

Numbers of players in Room

All Int player count, max players

Room

Player Enters Room

All All string playername ; int id

You String ‘You joined the game’ ; [ obstacle ] ; int id

Player Leaves Room

All String playername

Game

Throw Knife

All float px, py, vx, vy ; int id

Knife Collides with Wall

All float px, py ; int id

Knife Despawns

All float px, py; int id

Knife collides with player

All float px, py ; int knifeID, playerID

Player Dies

All float px, py ; int id ; string playername

You int score, string “you lose”

Client Side Events

Every Tick

Arrow Keys

[ <char, bool> keydown ]

Room

Join Room

String room, string playername

Leave Room

String room, string playername

Game

Spawn Knife

String playername ; int id ; Float angle from player

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: