# Umoupen <img src="res/icon.png"  width="5%">
Umoupen is a 2D/3D raster/vector animation and game authoring tool

- **Small**: The program is distributed as a single <5mb executable. 
- **Simple**: Only what is essential is presented, even the build process is simple.
- **Free**: No subscriptions, DRM, or licensing fees. 

Download for
[Mac](),
[Windows](), or
[Linux]()

---

### Building from source
To build you only need the following:

 - A C compiler: Run `xcode-select --install` in MacOS Terminal, for Windows, MSYS2 is recommended
 - Make: See above for MacOS. If you've installed MSYS2 on Windows run `pacman -S make`
 - (optional) [sokol-shdc](https://github.com/floooh/sokol-tools-bin/tree/master/bin): set SHDC variable in Makefile to your sokol-shdc binary (this is only necessary if you want to modify the existing shaders)
 
Then navigate to the Umoupen directory in your Terminal/CMD and run "make" to see the targets, then pick the one that matches your system, ie `make mac_arm` or `make win_x86`. If make is having trouble locating your compiler automatically, try explicitly setting it like so 

```
make CC='/path/to/your/compiler.exe' win_arm
```
If you accidentally pick the wrong target or otherwise mess up the build, just run `make fullclean`
Other tweaks to the makefile may be necessary on different platforms as I have not tested them extensively

If you are interested in cross-compiling the project, I recommend using [Zig](https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html) as your C compiler.

The build process compiles the Lua source directly into the executable, but running the executable with the "live" option will run the Lua files directly from the source folder and reload them live ie `./bin/mac_arm live`, this is useful for modifying the engine and seeing updates immediately, without the need to recompile.

The total line of code count is quite low at only ~70k in dependencies across 25 files and ~50k of my own code across 40 files (Godot for comparison is ~3 million lines over ~6000 files), its not too hard to figure out how everything works, but I may add more explicit documentation in the future. For reference only source in the "core" folder is required to run a game.  

3rd party libraries included: 
[sokol](https://github.com/floooh/sokol) (app, gfx, gl, fontstash, audio, time), 
[stb](https://github.com/nothings/stb) (ds, image, image_write, truetype, vorbis), 
[xatlas](https://github.com/jpcy/xatlas), 
[triangle.c](https://www.cs.cmu.edu/~quake/triangle.html), 
[cmixer.c](https://github.com/rxi/cmixer/tree/master/src), 
[zip.c](https://github.com/r-lyeh/stdarc.c/blob/master/src/zip.c),
[fontstash.h](https://github.com/memononen/fontstash/blob/master/src/fontstash.h), 
[fitcurves.c](https://github.com/erich666/GraphicsGems/blob/master/gems/FitCurves.c), 
[handmademath.h](https://github.com/HandmadeMath/Handmade-Math/blob/master/HandmadeMath.h), 
[tinycthread.c](https://github.com/tinycthread/tinycthread/tree/master/source)
[libdeflate.lua](https://github.com/SafeteeWoW/LibDeflate/blob/main/LibDeflate.lua)

