Code Monkey home page Code Monkey logo

pspaceduel's Introduction

+-=-=-=-=-=-=-=-=-=-=-=-=-=-+
|                           |
|   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, ...

pspaceduel's People

Contributors

lgommans avatar

Watchers

James Cloos avatar  avatar

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.