Getting Started

Gamooga helps you develop realtime apps and multiplayer games very easily, offloading all your network infrastructure required for realtime messaging. Gamooga lets you upload your server side scripts, receive messages from your clients, process them through your scripts and send messages to your clients.

To facilitate the same, Gamooga lets you upload gamlets on to its cluster and provides API libraries to be used on the client side that can be used to connect to gamlets on the server side.

Server side

Gamooga framework allows developers to upload gamlets onto its cluster. A gamlet is essentially the server side script that handles different network events in realtime apps like user joining, user sending message, user disconnect etc. As of this writing, the scripts are to be written in Lua, a very fast, full fledged scripting language.

Every gamlet has a concept of room and session.

Room

A room is a group of connected clients that can send messages to each other. A set of room callbacks are executed for different events that happen in a room. room is generic and all clients connect to a single instance of room for a gamlet. In the context of games, a room essentially represents a lobby that users initially connect to.

Session

A session is similar to room, clients connected to a session can send messages to each other, the difference being that sessions can be created on demand and multiple instances of session can exist in parallel for a single gamlet. The set of callbacks for session that execute on events in a session are to be seperately implemented; so a session behavior is completely different from a room. In the context of games, a session essentially represents a single game session, like a session of Poker between a set of users.

Gamlet package

To provide for the above concept, Gamooga requires you to upload two Lua modules room and session with in two files - room.lua and session.lua, each implementing a set of callbacks. The lua files can include other modules as required. All the modules’ code is to be compressed (zipped, tar-gzipped or tar-bzipped) and uploaded on the Gamooga website. The compressed file is the Gamlet package.

Client side

To interface with the gamlet, Gamooga provides client side APIs for different platforms: Javascript, Actionscript, Android, iOS, Unity.

APIs for all the platforms provide a GamoogaClient class that can be used to interface with the gamlet.

Platform API files
Javascript gamooga.js
Actionscript gamooga.swc
Android gamooga.jar
iOS libgamoogaclient.a, GamoogaClient.h
Unity GamoogaClient.dll

In the next section, we will develop a chat lobby application.

Table Of Contents

Previous topic

Welcome to Gamooga’s documentation!

Next topic

Sample App: Chat Lobby