diff --git a/blog/index.html b/blog/index.html index 7209688..6efb9be 100644 --- a/blog/index.html +++ b/blog/index.html @@ -39,6 +39,7 @@

2024

diff --git a/blog/p1-the-stack-and-rooms.html b/blog/p1-the-stack-and-rooms.html new file mode 100644 index 0000000..829e3a6 --- /dev/null +++ b/blog/p1-the-stack-and-rooms.html @@ -0,0 +1,76 @@ + + + + + + + + + + + + Project 1: The Stack, and Rooms + + + +
+ Jump directly to main content +

Project 1: The Stack, and Rooms

+ + +
+ +
+
+ +
+

The plan is to make a multiplayer PvP game, with defined turns, and per-player customisable elements. + I'm being a little vague, but I'm sure you can figure it out from that.

+ +

The Stack

+

First I needed to select a stack I could use for this, with decent documentation to starting off an async multiplayer experience.

+

After looking about I landed on a JS stack consisting of JS, and HTML Canvas for the front-end, and JS, NodeJS, SocketIO, and MySQL for the back-end. This stack should allow me to work on the game itself, rather than look into TCP interfacing (which may be simple, but I have enough stuff on at current to not want to look into this, at least for the time being).

+ +

Rooms

+

To get the swing of the multiplayer aspect, I opted to start with rooms. + Well that, and the Socket.IO guide I used to start this off with had basic room functionality (add player to room, start the game, etc).

+ +

What is a Room?

+

+ A room/instance (in my project at least), is a means to have multiple game instances running on the same server. Since there will be XvX players during a game, but there can be more than 2X players on the server, the servers resources can be better utilised by running many smaller instances, that manage themselves on the host. +

+ +

Current Room Functionality

+

+ Each room will eventually manage the state of the game being played in said room. For the time, I currently have a room in the most basic form, it has a count of the players in said room, a specific (non-unique) identifier, and name. As I mentioned, very basic, but it sets the field for what will be needed in the future. +

+

+ Along with the room itself, I have a number of helper functions that are triggered in the client with socket emits, and return data to the client from the server with socket.to, and socket.on. +

+

These helper functions include:

+ + + +

+ The first two are near-final I assume, but joining a room currently just uses a numeric counter to log the players already connected, so it allows the same player to join the same, and multiple different rooms at the same time. This will be changed later down the line, but for now there's a decent proof-of-concept to show me that what I want it feasible without too much difficulty. +

+
+ + + + + diff --git a/projects.html b/projects.html index 914fb25..24f2cfa 100644 --- a/projects.html +++ b/projects.html @@ -34,19 +34,29 @@

Current Projects

+
+

aNetwork

+

A gaming community, and public server host. Halted, and to be restarted from scratch.

+

This will consist of a website, server hosting, and community/server administration.

+

Skills: HTML CSS JS Linux System Administration

+
+ +
+

Project 1

+

You can read a little about it on my Project 1 Devlog.

+

Skills: JS HTML Canvas NodeJS Socket.IO SQL

+
+ +

'Completed' Projects

Personal Website

A basic website to let me have my own little place on the internet.
You may recognise it, because you're using it right now!

Skills: HTML CSS

+ -
-

aNetwork

-

A gaming community, and public server host.

-

This consists of a website, server hosting, and community/server administration.

-

Skills: HTML CSS JS Linux System Administration

-
+