From d69b627bb1949b187d6e46ec1e02a1e3bc8a9234 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Mon, 4 Mar 2024 23:50:16 -0500 Subject: [PATCH] Added README --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..bdd0d48 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +## Netpong - A Pong game for the internet era + +__Netpong__ is a network-enabled Pong game, written in C++. It enables two players to play against each other, provided an IP address and a port. It also supports a single-player mode. + +## How it works + +The game has only one runtime dependency: The [raylib](https://www.raylib.com/) graphics system. In order to write idiomatic C++, I chose to use the [raylib-cpp](https://robloach.github.io/raylib-cpp/) wrapper, which provides an object-oriented interface to the Raylib library. However, this wrapper is bundled with the project, and is thus not required to be installed. + +## Building + +This application uses [Meson](https://mesonbuild.com/) as a build system. To build the application: +1. Install __meson__ from the link above. +2. Install __raylib__ from the link above. +3. Set up the build directory with the `meson setup build` command. +4. Compile the application with `meson compile -C build`. + +## Running + +- To run in single-player mode: + - Run the application with no arguments: `build/pong` + - Left paddle is controlled with `W` and `S` keys, right paddle is controlled with `Up` and `Down` arrow keys. + +- To run in multi-player mode: + - One player runs the application in Server mode, specifying their IP address and a port: `build/pong -S ` + - The other player connects to the first player by running in Client mode, specifying the first player's IP address and port: `build/pong -C `