Glof: Card Game Turned Web-app
Check it out on GitHub here!
Read the rules here!
Watch a short phone example round here!
Watch a short desktop example round here!
Built using Angular 11 and JavaScript utilizing Express and Socket.IO.
A while back, a friend introduced us to a game called Golf. It's a fairly simple game where you arrange 6 cards in a 2x3 grid and then work to see who can get to -100 points first. Certain cards and scenarios help you get negative points whereas everything else gives you positive points. If you get - or go over - positive 100, you lose. We do play with slightly modified rules (that, in my opinion, make the game a little more fun) so since the game isn't quite Golf anymore, I have renamed it to Glof.
My wife and I love playing this game, and as much as we played it I often dreamed of how cool it would be to have an app version of the game. At the time of writing, there is no app (or webapp) version of six card golf. So this made it even more of a need to create some app that my wife and I could use to play at home or even out an about (02/27/21: will be hosted on a live site where you can try it out soon).
Technical Details:
The app was created using Angular 11 for the client and JavaScript for the server. The entire system utilizes Express (for server-side functionality) and most importantly: Socket.IO. Socket.IO is used to provide real-time interaction in web-applications. I'm so glad I did this project because I encountered and learned about Socket.IO. It's incredibly useful and I will definitely be using it in some other games I'll create in the future. With Glof in particular, I use it for the clients to interact with the server so that no one is having to wait for anything other than the opposing player to make their move. As soon as a player does something, all players are updated as needed and everything feels very quick.
The newest addition is what Socket.IO calls "Rooms". It's exactly like what it sounds like: places to put multiple sockets that are in their own area with their own, small environment. This is great because we can effectively treat this as different instances of the game. Because this will be hosted online soon, it will now be capable of handling any number of players anywhere in the world! This also allows my wife and I to play wherever we are without the need of a VPN or having to be at home.
Features:
The game offers several helpful features and neat abilities.
-
Ability to choose your own card back
-
Each player has their cards in front of them and the opposing player's cards across from them (see picture below)
-
A blue bar is used to show whose turn it is
-
Cumulative scores are shown at the end of each round and at the end of each game
-
Ability to start new games right after without having to wait for someone to shuffle!
-
Can be played from anywhere in the world!* (*02/27/21: Almost, figuring out hosting now)
Future Improvements:
-
Host the code online so I no longer need to host it myself or use a VPN if I'm out of the house (2/27/21: Coming soon!)
-
Currently, I'm remaking the game in Godot
-
Ability to add custom card backs to play with
-
Computer players with varying levels of AI and playstyles
-
A tutorial mode showing you how to play the game and which strategies are good in certain cases (probably will do this in the Godot version)