Networked Blackjack

Untitled7Untitled5Untitled4

Networked Blackjack is pretty self-explanatory; I worked in a team of 4 in my Advanced Topics in Game Development class to develop a blackjack game with a focus on the networking component. During this project, our strongest asset was by far our access to Windows Azure. To enter the game, you first need to “sign up” by inputting a username and password. The C++ Client will then connect to the server hosted on Azure (written in C#) to create an account for you and log you in automatically. The amount of credits that you have will stay consistent, and after you create an account, you are able to log in using the same username and password, allowing you to play with the credits you have saved up. After you are in the game, you need to wait for another player to enter, then you will both need to ready up. The game supports up to 4 simultaneous players, however. After gameplay starts, it works how you might imagine it would. Players take turns making bets, hitting and standing (and busting if they go over 21). The client was written using C++ and DirectX. Networking is done through a simple C++ TCP socket class, and a .NET socket class on the server side. The server used is hosted on an Azure virtual machine. When packets are sent to tell the server to create an account or update the credit pool of a player, the server makes a call to an SQL database, also hosted on Azure. This functionality was critical to keeping player data persistent in between games, and also gave us a lot of practice in setting up servers, databases, and the connections between them.

An interesting feature that was added to Networked Blackjack was a Second-Screen app written in HTML5 and Javascript. When you reach the second-screen app website, you are prompted to enter your username and password for our game. After clicking the login button, your player data, including wins, losses, and current credit amount is returned. Since this app was written in HTML5 and Javascript, this app is available to be used on mobile devices. A screenshot from the second-screen app is shown below.

Untitled8

Overall, this is one of my favorite projects, due to a combination of a focus on networked play and how well my team members and I worked together. I was in charge of most of the networking logic, functionality, and troubleshooting, as well as being personally responsible for creating and developing the second screen app. I also consider this project one of my main inspirations for my passion for network programming.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s