lgommans / pspaceduel Goto Github PK
View Code? Open in Web Editor NEWkspaceduel "clone" in python with online multiplayer and without ai
License: Other
kspaceduel "clone" in python with online multiplayer and without ai
License: Other
+-=-=-=-=-=-=-=-=-=-=-=-=-=-+ | | | P S p a c e D u e l | | | +-=-=-=-=-=-=-=-=-=-=-=-=-=-+ In PSpaceDuel two ships battle for dominance of a star system. Your craft orbits a star. There is a pesky other craft that, if conveniently removed, would grant you sole governance of the whole system! Why don't you poke a few holes in those air tanks to get the message across? All systems on board are, for all intents and purposes, electrical: an ion drive (propulsion), mass driver (gun), and a reaction wheel (rotation). Proximity to the star lets your solar panel harvest more energy. The game uses real physics principles (e.g. gravity and radiative energy calculations) where this is possible without compromising gameplay. Inspired by KSpaceDuel[1] by Andreas Zehender (1998), this remake features: - Online multiplayer - Player settings are synchronised (based on who connects first), you do not have to join a specific server to play a certain configuration - Good hitbox accuracy -- no more unexpected deaths 10km away from the star! - Health and energy levels visualized near the player rather than having to look over at a control panel - Written in a more accessible language than low-level C - No artificial limit to how many bullets are on the screen - No pause button. No mom, I cannot pause this multiplayer game! :D There are also regressions: - No pause button. No mom, I cannot pause this multiplayer game! :( - There is no AI (computer player) - Hot seat multiplayer (players sharing a keyboard) is not supported (Heck, I have a keyboard that doesn't support 3 concurrent keys, let alone those required for another player! PS/2 lent itself better for hot seat...) - Powerups are not featured in this version - Mines are not featured in this version - The code is a mess. I wanted to get it playable and a lot of technical debt was incurred along the way And general changes: - Bullets do not wrap like players. I'd like the players to also not wrap for realism, but it increases the difficulty significantly: since solar panels barely work away from the star, one quite easily drifts off into space uncontrollably on an escape trajectory. [1] https://apps.kde.org/kspaceduel/ +-=-=-=-=-=-=-=-=-=-=-=-=-=-+ | | | G e t P l a y i n g | | | +-=-=-=-=-=-=-=-=-=-=-=-=-=-+ Install python3 and pygame for your platform. Optionally install Pillow for loading animated GIFs used in some themes: `pip3 install pillow` or `apt install python3-pil` For multiplayer: - The game will, by default, try to connect to lucgommans.nl:9473 - Else you can start a server using: python3 server.py The game uses UDP port 9473 Run in multiplayer with the default server: python3 client.py Optionally add a host:port to connec to an alternative server. Or run a dummy singleplayer game (you can control only one craft): python3 client.py --singleplayer Controls: Arrow keys Shift + arrow keys to rotate slower (more accuracy) Space to shoot +-=-=-=-=-=-=-=-=-=-+ | | | L i c e n s e | | | +-=-=-=-=-=-=-=-=-=-+ No part of the original game was used. I still have to pick an open source license. If you would like to make a derivative work or reuse some resource or part, ping me so that I pick a license. It will be something like GPL, BSD, MIT, ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.