2D racer game.
- React & Redux (frontend)
- Node & Express (backend)
- Phaser JS (gaming engine)
It was very easy to add a global chat using socket.io:
app.js
const socket = require('socket.io');
//...
const io = socket(server);
io.on('connection', (socket) => {
socket.on('SEND_MESSAGE', (data) => {
io.emit('RECEIVE_MESSAGE', data);
});
});
chat.js
import io from "socket.io-client";
//...
this.socket = io.connect(url);
this.socket.on('RECEIVE_MESSAGE', function (data) {
data['timestamp'] = new Date().getTime();
addMessage(data);
});
-
User authentication. Sign up, Log in, Log out, demo user.
-
Timed race to finish line
- Recording of top scores
- Add multiplayer and rooms
Additional encryption and security provided by