Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    4
  • comment
    1
  • views
    523

About this blog

Just another #gamedev fantasy

Entries in this blog

 

Update 0.19.0

Still just a start, WIP, but finally a new step done. 
New assets, new sandbox map…
Isometric and alpha maths has been rewritten but still needs a lot of refactors and reviews. http://game.applicant42.com/

applicant42

applicant42

 

Frameworks, tooling and other drugs (II)

I wrote a first post recently describing how I started with Phaser and Webpack. That would be the Client side in my game idea of a #browser #multiplayer #RPG.Now let's see the needed Server side: Node & Websockets
I decided to start with Node.js as it offers speed, scalability, a non-blocking API and continue with the Javascript stack. It has an easy and fast learning curve for anyone familiar to Javascipt and it's a very good and simple start. There are a lot of simple HTTP server examples made in Node but what we need for our game are Websockets. A game server needs rapid request/response communication. The fastest way would be using UDP network protocol, but as UDP doesn't guarantee an order in responses it is needed a TCP. Websockets are the fastest TCP approach. Looking for a good library to work with Node and Websockets I found ws and I liked it. See a very basic server example: const WebSocket = require('ws'); const wss = new WebSocket.Server({ port: 1234 }); wss.on('connection', function connection(ws) { console.log('new client connected'); ws.on('message', function incoming(message) { console.log('received: %s', message); }); ws.send('text from server'); }); And a very basic browser client to complete the comunication: wsc = new WebSocket('ws://localhost:1234'); wsc.onopen = () => console.log('connected to server'); wsc.onmessage = (message) => console.log('received: %s', message); wsc.send('text from client'); Now you can see how easy is to evolve these basic examples in a simple chat or just for sending/receiving players positions. A good pair of hints for the simple server example would be:
1) push and keep client connections (players) in array data
2) create a broadcast function in order to send data for other clients

applicant42

applicant42

 

Frameworks, tooling and other drugs

It's been long since some colleagues and me "achieve" our unfinished Red Atlas I project. A full hackaton weekend trying to do a strategic game and the full weekend deep inside PhaserJS, our bet on free game frameworks and engines. Phaser 2 CE & Webpack 3
I liked Phaser framework and I wanted to come back to this framework, so now here I am again, working with an idea of #isometric #RPG. Well, not now, Phaser released its 3.x version and webpack is in its 4.x version. I started this idea some time before, using Phaser 2 CE and Webpack 3.x and it looks like is not easy to migrate to Phaser 3 now for me. The future will say... As I re-started this idea many times searching for a good architectural approach to work with this toolchain I decided recently to upload and share the boilerplates I used to start. I hope it helps someone! Boilerplate for 2D games
Boilerplate for Isometric games

applicant42

applicant42

 

Hello World!

Here it is, the first proper post. Hopefully the first of many.   This blog will be about just another #gamedev #indiedev fantasy tryiing to be finished some day. This is not my main work and I guess it won't be in the future. Anyway is my main project idea, some of my spare time, and I will try not to find excuses for not finishing it.   Here I will be writting and focusing on the game idea I am creating and what I find as I go on programming: issues, fixes, ideas, designs, advances, regressions... I’ll try to update it regularly. Are you ready player one?

applicant42

applicant42

Sign in to follow this  
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!