
Easy peasy casual game with a nice twist.
-
Developed by Simone Cingano
-
Music by (CC) Erik Skiff
I've developed this project to learn HAXE and OpenFL.
I've decided to release the project open-source since I believe it could be useful for other people.
I am sorry if a lot of the code is uncommented and ugly, but I am still pretty sure there is something to learn especially for newbies.
Enjoy mimic-rush
The game use few major libraries and few of my own.
akifox-transformis used for all the transformation (diagonal text and buttons)akifox-asynchttpis used to send and retrive score from the score serverplikis a bigger library that handle most of the cores: sound, music, screen transitions.
I've also stripped away the code that generate a token to talk with the score server to avoid fake score submission, or score submission by 3rd part forks.
I hope you will understand, all the rest is completely open-source and ready to be compiled. Do what you want with it (according to the MIT licence) ;)
Fork the project (or just download it) and after install the following libraries
haxelib install openfl
haxelib run openfl setup
haxelib install extension-share
haxelib install actuate
haxelib install akifox-transform
haxelib install akifox-asynchttp
haxelib install compiletime
Plus, you have to install the PLIK library and TongueTwist from git
haxelib git plik https://github.com/yupswing/plik.git
haxelib git akifox-tonguetwist https://github.com/yupswing/akifox-tonguetwist.git
and you are ready to go (we use OpenFL v2 Legacy for compatibility, maybe one day I will port to OpenFL3)
lime test neko -Dv2
This stack only compiles with Haxe 3.x — Haxe 4 rejects OpenFL 3.6.1's old syntax (@:enum abstract, @:fakeEnum). Confirmed working versions: Haxe 3.4.7, OpenFL 3.6.1, Lime 2.9.1.
# Install Haxe 3.4.7 + matching Neko, make sure both are on PATH/HAXEPATH/NEKOPATH
# (the haxelib.exe shipped with Haxe 3.4.7 is 32-bit, so NEKOPATH must point at a 32-bit Neko build)
haxelib install openfl 3.6.1
haxelib install lime 2.9.1
haxelib run lime setup
haxelib install extension-share
haxelib install actuate
haxelib install compiletime
haxelib install akifox-transform
haxelib install akifox-asynchttp
haxelib install systools
haxelib git plik https://github.com/yupswing/plik.git
haxelib git akifox-tonguetwist https://github.com/yupswing/akifox-tonguetwist.git
# Run
lime test neko -Dv2 -Dlegacy
# Or just build (output in Export/windows/neko/bin/)
lime build neko -Dv2 -Dlegacy
# Native Windows .exe (lime build windows) instead needs Visual Studio
# Build Tools with the "Desktop development with C++" workload installed.
If your shell's PATH/HAXEPATH/NEKOPATH env vars get out of sync with this toolchain
(e.g. errors like "unable to start correctly" or a missing neko_kind_lookup entry
point in ssl.ndll, both signs of a 32/64-bit Neko mismatch), and/or lime test
hangs/loops instead of opening the window (lime 2.9.1's exe launcher chokes on the
space in "Mimic Rush.exe", and its CLI does a network version-check on every run
that can intermittently fail and retry), use dev.ps1 instead — it pins
the right environment, builds, and launches the exe directly via PowerShell instead
of through lime's broken run step:
.\dev.ps1 # build neko -Dv2 -Dlegacy, then run the exe
.\dev.ps1 build neko -Dv2 -Dlegacy # just build
The Neko build above still needs the Neko VM DLLs alongside the exe. For a fully native binary, install Visual Studio Build Tools (workload "Desktop development with C++") and use hxcpp 3.4.64 specifically — not 3.3.x or earlier, and not the haxelib-default 4.x:
haxelib install hxcpp 3.4.64
haxelib set hxcpp 3.4.64
Older hxcpp generates __alloc(hx::Ctx*, ...)-style constructors that the Haxe
3.4.7 compiler doesn't emit-compatible code for anymore (error C2039: 'Ctx': is not a member of 'hx') — Haxe 3.4.x requires hxcpp >= 3.4.49. hxcpp's native libs
(std.dll etc.) also need to be (re)built once for the 32-bit toolchain lime 2.9.1's
Windows target always uses (it hardcodes -DHXCPP_M32, there's no 64-bit option in
this lime version):
cd /d "%HAXELIB_REPO%\hxcpp\3,4,64\project"
haxelib run hxcpp Build.xml -DHXCPP_MSVC_CUSTOM
run from an x86 (or x64_x86 cross) Developer Command Prompt, with
C:\HaxeToolkit\msvc_compat_include (or wherever you put a one-line
#pragma once + #include <typeinfo> shim named typeinfo.h) prepended to
INCLUDE — modern MSVC dropped the legacy typeinfo.h header that old hxcpp's
hxcpp.h still #includes.
dev-native.bat wraps all of this (vcvarsall, the typeinfo.h
shim, and the lime build windows call). It assumes the toolchain lives under
C:\HaxeToolkit as set up above. Run it from the project root:
dev-native.bat
Output: Export\windows\cpp\bin\Mimic Rush.exe — a standalone ~3MB native PE32
GUI exe (verified launching correctly), only depends on a couple of small native
DLLs bundled right next to it (no Haxe/Neko install needed on the target machine).
