Pusher API - Real Time with LOVE!

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
krankzinnig
Prole
Posts: 5
Joined: Thu Oct 09, 2014 1:22 am

Pusher API - Real Time with LOVE!

Post by krankzinnig »

Hello, I am working on something that informs my web server of connections to my love project. Since my web application already utilizes Pusher's javascript client API, I figured it would be a breeze to use. Although, the only existing Lua binding for Pusher depends on CoronaSDK. This obviously didn't suit my needs when using LOVE, so hence luapusher. MIT licensed, feel free to use without credit. Any comments/criticism is welcome, thanks.
Pusher is a simple hosted API for quickly, easily and securely adding realtime bi-directional functionality via WebSockets to web and mobile apps, or any other Internet connected device.
Supported:
POST event (trigger an event)
GET channels (fetch info for multiple channels) w/ filter_by_prefix and attributes
GET channel (fetch info for one channel) w/ attributes
GET users

TODO:
optional socket_id for POST event
support for POST event on multiple channels at once

Usage Ideas:
1. Push leader board scores to a web application in real time
2. Track connections and online users and push to a web application in real time
3. Track player achievements and push to a web application in real time
4. Create a web based game server in javascript and communicate over pusher in real time
5. Accept in app payments over web based payment gateway
6. Create an analytics panel tracking average game play duration and conversion goals in real time

https://pusher.com
https://github.com/hookglobal/luapusher
Last edited by krankzinnig on Tue Oct 14, 2014 3:16 am, edited 1 time in total.
User avatar
SiENcE
Party member
Posts: 805
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Pusher API - Real Time with LOVE!

Post by SiENcE »

It's a nice idea. I prefer to use my own webserver, but a good solution for gamejam games.

Do you have a working example? A highscore :) ?
krankzinnig
Prole
Posts: 5
Joined: Thu Oct 09, 2014 1:22 am

Re: Pusher API - Real Time with LOVE!

Post by krankzinnig »

Pusher doesn't really replace your web server, it just simply acts as a communication layer between your Lua app and a web server. The key difference is that it uses sockets to communicate in realtime (think of a leaderboard or game map that updates with player data without refreshing). I will do a leaderboard example if I get time later this week. I have some travel over the next few days for work.

Also this got added to the pusher.com library download page under community libraries. :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests