Skip to content

Alfenstein8/kaempe

Repository files navigation

What is Kæmpe?

Kæmpe is a language that aims to make fighing games simple to make without needing to learn and install game engines like unity or godot.

Prerequisits

  • python
  • git
  • clone the compiler
  • pygame, pymunk python packages
  • (optional) vscode

Usage

  1. kaempe <file.kmp> to compile a file into python.
  2. Run the compiled python file with python <file.py>.

Development

Installing dependencies

First you need to setup the environment and install all the dependencies. You can do this in 3 different ways

Manual install

  1. Install make
  2. Instal Opam. With Opam, install Ocaml, Dune, Menhir, camelot and alcotest (for testing)
  3. Install python 3.13 and Pip. With Pip, install pygame and pymunk.

Dev Container

  1. Open the project in vscode
  2. Accept starting the development container.

Nix develop

If you have the nix package manager, you can just run nix develop in the root of the project to create a nix-shell with everything setup for you

Build

  1. Install the dependencies: Opam, Dune, Menhir, OCaml, make, camelot and alcotest (for testing)
  2. Clone the repository with git clone <url>
  3. Run make in the root of the repository

Run

To use the compiler on a file with extension .kmp use Make:

make file=fileName.kmp

With file being placed in /test samples/{ fileName.kmp }

Such as: make file=test.kmp to run the test.kmp file.

Run tests

Run make tests in the root of the repository.