Giter VIP home page Giter VIP logo

tankistonline's Introduction

TankistOnline

A Cross-Platform Lightweight 2D Tank Multiplayer Game in Python 2/3.

v0.2:Alpha Screenshot

Commitments:

Tiny System Requirements -- A Raspberry Pi can run a server and 4 clients, with room to spare. The RPi is a 1Ghz quad core processor with 1 GB of RAM. Tiny Size -- v0.2:Alpha is < 152 KB (unzipped) Cross-Platform -- Windows, Mac, Linux; anything that runs Python.

UPDATES

Public Server Operational!

Come on over and checkout our new public server at tankistonline.skeltonkey.xyz!

Version 0.2 Alpha Released!

Version 0.2 Alpha is now available! If you experience any bugs or have any questions, please feel free to open a new issue. V0.2:Alpha features:

New Features:

-A scrolling map
-Improved TKO Protocol security: packet verification
-A connection dialog to choose a server
Non-new features:

-Interactive multiplayer client-server gameplay, with nicknames for each player
-Shooting other tanks (and killing them)
-Driving across the map (with map boundaries to prevent people from driving infinitessimal distances)
-A colored life-bar
-The server automatically disconnects idle players
-**Client is Python 3 ONLY**
-**Server is Python 2.7+, Python 3.x, or PyPy**

Special thanks to all of our contributors and everyone who is helping with this project!

Please note that we are looking for someone to host a public server, to which anyone can connect. To host Tankist, you can either pay for a 24/7 VPS (which costs from $2-8/mo.) or you may just decide to run Tankist on your own computer at a specified time each day/week/month -- and that information shall be made available via this repository. If you have any questions about hosting Tankist, need help choosing or setting up a VPS, or questions about sponsoring a Server, please open a new issue.

Upcoming: Version 0.2 Alpha

Version 0.3 Alpha is planned to be released sometime in 2020 and shall feature:

-More maps, bigger maps, smaller maps
-More and improved code optimization
-Cleaner, more concise code
-A new and improved wiki
-A list of public hosts (when they're available)

And things that may make an appearance in future releases:

-Different TURRETS that do different amounts of damages from different ranges
-Tank skins to customize the look and feel

Changelog:

The project was last updated on December 1, 2019 with many additions to both the client and the server.

Changelog:

-Server improved
-Client improved

RUNNING

The Client is Python 3 only, whereas the server can be run with Python 2.7+, Python 3.x, or PyPy

Running the client

If you don't have it, install pyglet: pip3 install pyglet To run the client, Python 3 must be used: python3 TankistOnline_Client.py

Before you'll be able to play, you'll have to run the server (see below).

Once the client is running, you'll be asked to enter a nickname, then you'll connect and be able to move around (arrow keys) and shoot (spacebar). If you want a landmark by which to mark your movements, connect with another client. You may need to move around a bit before your tanks are able to see each other.

Running the server

For ease of deployment on varied systems, the server can be run with python2.7+, python3.x, and PyPy. The speed difference between the interpreters is not significant, but will affect CPU usage and RAM (around 6-10%).

PyPy (fastest): pypy TankistOnline_Server.py Python3.x: python3 TankistOnline_Server.py Python2.7+ (slowest): python TankistOnline_Server.py

Playing the game

The client screen centers on the player's tank, so it won't look like your tank is moving. If someone else joins the server, you'll be able to use him as a landmark.

DEPENDENCIES

To keep to our lightweight commitment, dependencies for the client are minimal, and the server has no dependencies beyond the standard library.

Client side dependencies:

  • Pyglet (pip install pyglet, or pip3 install pyglet)

Server side dependencies:

  • None

TO-DO:

Server-Side:

Pending

Client-Side:

  • Add a small library for cross-platform sound, and use it.

Misc:

  • Optimization [it's always welcome, however, keep in mind our Cross-Platform mindset].
  • Maintain the Wiki to reflect the contents of the doc folder. {WIKI}

Maps (in the form of jpg files) are welcome. When designing maps, please make sure that the image's filesize is under 32kb. That means having low resolution (the client can automatically scale images to make them appear bigger). We do not plan to bloat the project with maps, so the map folder is planned to be capped at 64kb -- enough space for around 20 maps.

CONTRIBUTING

Feel free to fork the project, and push contributions to the beta branch, unless otherwise directed by a Help Wanted topic in Issues.

LICENSE

Copyright (C) 2019. All Rights Reserved.

This project is released under the GPLv3.0.

It permits the Commercial and Private Use and Modification, Distribution, and Patent Priviledges. However, the Conditions are that you must disclose the source code, use the same license, include both the license and copyright notice, and state changes.

Disclaimer: This summary of the License is not the license itself.

tankistonline's People

Contributors

s1nn105 avatar servusdei2018 avatar zetatauepsilon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tankistonline's Issues

Teamwork

This issue is for the coordination of efforts, as well as the discussion related to contributing to TankistOnline. Please discuss changes and their implementation here.

We are currently inviting everyone to feel free to contribute.

Roadmap

Feel free to discuss the roadmap for Tankist right here.

Looping theme.mp3

Currently, the game's themesong is started by

		global theme
		
		theme = vlc.MediaPlayer("sfx/theme.mp3")
		theme.play()

but when the song finishes, it doesn't loop.

Feel free to push a fix to the beta branch.

True Client/Server Connectivity

When running Tankist in a true client/server configuration, the app becomes stuck infinitely loading.

Two issues must be rectified:

  1. The server configuration must be edited to make use of address '0.0.0.0' rather than '127.0.0.1', owing to the fact that 127 is the loopback address.

  2. The client listener must be able to find the server at this network address. No fix has been identified thus far.

Error in `on_draw()` when `playSound = False`

The procedure on_draw() doesn't account for playSound = False, thus, it tries to access the is_playing() method of an un-existant object.

@window.event
def on_draw():
	window.clear()
	
	player_sprite.draw()
	
	for enemy in enemies:
		
            enemy.draw()

	    if bool(theme.is_playing()) == False: #Problematic code
	    #assumes that theme exists
	
		theme.play()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.