Hello gamers,
Here is a new update on my JavaScript game development endeavours. Finally, I have started working on the multiplayer aspect of the game. Unfortunately is not fully playable yet but I'm getting there. I though I'd do an udpate in between so you know where I'm up to.
The features have been working on are the multiplayer lobby and the miniature selection page that I like to call the army builder. So much cooler, right?
We'll get into the details of those features in this blog.
First off, the game has been re-titled Miniaturena instead of Insys. I found the new title more self explanatory hopefully giving the chance for the web app to be more broadly discovered.
It also opens up the opportunity to feature several miniature games on the site going forward. I'm a huge fan of collaborative table top games so there would be room for that with a generic title. That being said, I have officially acquired https://miniaturena.com so there is no going back! ;-D
Now about those multiplayer features...
I have created a main lobby. Once logged in with your Hive account, you can create a table, which lives on the server to be visible by everyone. Please bear with me regarding the layout. I know this is extra simple but I'm just setting up the functionality. It will definitely look better going forward.
Also there are no table options for now but eventually you'll be able to select a map, change the time per player and the maximum army value for epic confrontations.
I have been testing the feature, logging in with two different accounts from two different browsers. You can see that the table appears on both screens.
Once two players have joined, they are redirected to the army builder page, which enables them to select their miniatures.
When miniatures are picked, they are added to the selected team list, visible in the side bar. Of course, the total cost of miniatures must be below the maximum army value. Kind of like Splinterlands... if you see what I mean.
I'll be adding a timer in the final version, to push players in making a selection... eventually. Also the graphics of the page are not final and I will surely revisit that to make it more stylished.
Below you can see the split screen again. Once a player is ready, he has to wait for the other one to choose. A banner at the top informs him about this. He still has time to retract and make another selection if needed.
The next phase is the initiative roll. It's still under construction but both players are redirected to this new screen that sums up the selected team of each player. It also features a button that rolls a die. The winner decides who will start first.
Finally they would both get redirected to the game.
But that's still left to implement so I'll probably show you that in the next blog!
Little bonus, I have added a on-going game banner. If you closed the page by mistake or wanted to browse the site while waiting on your opponent, no problem. You can still find your way back into the game!
On a technical stand point, this was all implemented thanks to the power of Socket.IO. It recognises connections from two different browsers. It can receive information from anyone and communicate it back to all. I also used the "join room" feature that enables communication between a restricted number of users.
Using this same technology, I could create a chat for the whole site and for each table as well. That could be a pretty cool feature to add to the site.
Anyway, that's all for now...
You can still try out the game as a local multiplayer following this link.
Any thoughts or suggestions are welcome. Thanks for following along.
See you on the other side,
Jrej