Skip to content

AlphaTechnolog/mue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mue

Simple "framework" project which runs a javascript-based game project using mujs under the hood. What this software does is interact with your js project by exposing and calling functions from within a c environment which suits you with a gameloop in order to let you write easily a game straight away with no caring on the used c libraries.

Inspired by tsoding's lust2d video I did practically the same but using modern typescript for examples and also implementing quite some functions for like graphics, text, input handling, and pretty much that's it.

The source code is almost entirely in a single main.c file, but there's also some examples in the examples folder which also shows usage of typescript.

demonstration

Getting started

Note

This project really is no production ready and is also not intended to be whatsoever (at least for now i do think so) but feel free to fork and add more features if you want to, I just wanted to have some fun and pretty much did.

git clone https://github.com/AlphaTechnolog/mue.git
cd mue

Then make sure you have the next dependencies installed in your system.

  • make
  • gcc / clang
  • bun (if you wanna build examples, node also should work, something that runs tsc)
make

Then the mue binary should appear right away, if you wanna run an example, just build it with bun and run it like this.

cd examples/<x>
bun x tsc && cd -
./mue ./examples/<x>

Examples

The included examples are:

  • rectangle: Really that's it, a little rectangle, but serves as a very basic example rectangle
  • pong: A simple pong implementation which uses text, movement, collisions. pong
  • snake: Simplistic snake implementation, uses text, movement, collisions, time. snake

Note

I'll be adding more examples as the time goes, specially basic ones, PR's are welcome tho.

About

Simple 'game framework' to write easy games in js/ts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published