Skip to content

VerifyBot/cowboy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฎ Cowboy

Cowboy is a responsive multiplayer game for everyone to play, that I developed for fun. On Cowboy you can play one of two roles (see details) where both sides have a semi-fair chance to win!

The whole development of the game (Frontend & Backend & DevOps) highly strengthed my experience on those subjects and I am glad that I actually managed to finish this project.

๐Ÿ’Ž A tip on finishing visual projects: start with the logic (backend) and a basic ui and start working on the design only you get the base down working

๐Ÿ”จ Development

This multiplayer game is based on the communication between the players, and this is done using Websockets.
The clients are using the browser's native WebSocket API and the server is using the famous Websockets Library in Python.

Frontend

The frontend was developed with ๐Ÿ”ฐ Vue & ๐Ÿ’™ Vuetify. A little bit of ๐ŸŽ JQuery is used too.

Backend

The website's server runs on a (DigitalOcean) ๐Ÿ– Ubuntu Droplet. The websocket server also runs on the same machine and powered by Python 3.9 using the websockets library.

Domain

A your-website-subdomain.web.app domain is freely available by ๐Ÿ”ฅ Firebase Hosting (Static sites only), Github Pages is a great option too.

Custom Domain

I also managed to set up the game on a custom domain and this was done by setting it on digialocean's dns resolvers and configuring the web server via ๐Ÿฅ— Nginx (see details including SSL setup).

๐Ÿ—บ๏ธ Instructions

When you play you can choose your role - ๐Ÿฎ Cows or ๐Ÿถ Dogs. This allows a fun diversity and game style change.

๐Ÿฎ Cows

The goal of the cows side is to go over the river (on the other side).
The game starts with 11 cows on the first row and on each turn the player can move a cow one step forward.
Be aware that cows can be eaten by the King (diagonally) and blocked by the Dogs.
As the cows, you have the advantage of the crowd - try to confuse the King and the Dogs with this.

๐Ÿถ Dogs (& ๐Ÿ‘‘ King)

The goal of the dogs side is to take all the cows down before one of them goes over the river.
The game starts with a King in the middle of the first row and 4 dogs surrounding it (2 to the right & left)
The Dogs can move like a Chess Rook (any amount forward or to the sides) and they can block the Cows from going forward.
The King is everything, it eats the cows, but it can only do it diagonally. It moves like a Chess King (one to any of the 8 sides surrounding it)
Be aware that you are unlikely to take down a cow with the king alone = use your Dogs to stop them from going forward and only then attack.

๐ŸŽ‰ Showcase

Home Page

Private Game

Enter Private Game

Global Queue

How to Play

Game (screen is landscape)

๐Ÿ—๏ธ TODO

The game is fully functional but new improvments could always be added!

  • โŒš Turn timer (currently there is no turn-timer and games can last forever :P)
  • ๐Ÿค– Playing against bots (with difficulties - easy, fair or impossible)
  • ๐ŸŒˆ Game themes (changes the board colors, pieces and sounds)

๐Ÿ”ฎ Cheating

I tried to make the game cheating-proofed but I would love to see someone find a way to win the game in a special win!

๐Ÿ˜ฟ Fairness

For some reason I find it hard to believe that this game is fair (it seems that winning with the cows is easier), though it was never proofed! Feel free to try to convince me which side has a better chance of winning.

๐Ÿ‘ฅ Contributing

If you want to contribute to the project and make it better, your help is very welcome (see guide).
If you don't feel like conding, feel free to post suggestions / bugs in the Pull Requests section!