Turn Based Attacker - Networking + LAN Multiplayer

in #utopian-io7 years ago (edited)

What is this?

This is a turn based strategy game where you must try to kill all the other player's units to win. There can be up to 16 players. You can see more in the original post

Networking

In this release I added the ability to play a networked game. Now you can have other players join your game and can play together, from different computers.

image.png

You can join by specifying their ip address.

image.png

The game communicates over TCP and sends messages for what button was pressed, or what person became selected. The networking is done manually by sending strings of text signifying a command, and since TCP sometimes groups commands, the game will make sure to separate commands before executing them.

Since this is a turn based game, I do not have to deal with latency, meaning it just requires sending the data.

Future Plans

I have already implemented saving and loading games, but I have not implemented that into multiplayer yet (since that would require sending a lot of data over the network. My next plan is to work on loading your game into a multiplayer game.

I also want to add the ability to add nicknames, and the ability to reconnect if you leave.

Giving the game host the ability to kick players is also a feature I am planning on adding.

Download and Play

You can download and play the game here.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Very interesting. As a developer I'd love a few lines of sample code with each update :)

I try to make my commit messages as useful as possible, so if you have a glance over all the commits in my pull request, you can check what I did to see how I did it. Thanks for the suggestion, I'll try to include some sample code next time. :)

I see where you are coming from, that's why I wrote "few lines". In this one maybe the 2-3 important lines on how you split the commands.

Hey @ajayyy I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Thank you for the contribution. It has been approved.

I agree that more code sample in the post would be quite informative. Think about how you could teach new programing concepts that you're integrating.

I'm still waiting for that README.md information on how to build it and contribute from the developers point of view.

You can contact us on Discord.
[utopian-moderator]

Coin Marketplace

STEEM 0.17
TRX 0.13
JST 0.027
BTC 60569.85
ETH 2584.47
USDT 1.00
SBD 2.69