Releases: ray77/lionheart-remake
Release list
Lionheart Remake in the browser - v1.1
Unpack, serve the folder over HTTP, open index.html. Opening the file directly
does not work: the page fetches its assets, and asks for the pack in ranges.
python3 -m http.server 8000
New in this build
Six languages. The assets always carried them; nothing read the setting,
because only the desktop launcher loads the settings file. The language now
follows ?lang=de if given, otherwise the browser, and can be changed in the
game under Options. Available: de, en, es, fr, it, pt.
The options screen fits them. Its labels sat against a fixed value column
130 pixels away, which German Schwierigkeit fills exactly at 141 - label and
value collided. Labels now start at the left of their row and values end at the
right, over row widths taken from where the oval frame actually leaves space.
Checked across all six languages and every value: the tightest pair keeps 30
pixels.
Objects stopped shimmering against the level. The map placed its chunks with
floor and the drawables used Math.round, quantising half a pixel apart, so
the distance between an object and the ground under it alternated by one pixel
twice per scrolled pixel. Both now round the same way.
The mouse lands where it points. The screen kept the source resolution to
itself instead of passing it to the mouse, so the pointer was reported in canvas
pixels: the whole game area was crossed within the first third of the window and
nothing beyond it could be reached.
The cheat menu is shut in a plain run. A right click used to open it in any
game, which made skipping to the last stage a matter of two clicks. It now asks
whether the run was started with cheats.
The loading lines no longer stand above the game for the rest of the
session. Add ?log to see them; errors still show either way.
Address parameters
?lang=de |
force a language |
?log |
show the loading progress |
?trainer=true#level=7 |
start in a stage, cheat menu on right click, no damage |
Sources
Lionheart Remake is by Byron 3D Games Studio, on LionEngine by B3DGS. This is
their work, compiled for the browser with TeaVM; the music
plays through sc68 compiled to
WebAssembly.
Lionheart Remake in the browser (TeaVM)
The game runs in a browser — no plugin, no JVM in the page. The Java bytecode is translated to JavaScript ahead of time with TeaVM, on top of a new graphics, input, media and audio backend (lionengine-core-web).
Measured
| Frame rate | 60/s, game logic at the original 50 Hz |
| Translated output | 7.3 MB of JavaScript |
| Chip music | sc68 compiled to WebAssembly, 151 KB |
| Sound effects | 55 of 55 decoded |
| Playable | stages 1–14 |
For comparison: the same attempt with a JVM in the browser (CheerpJ) reached 3 frames a second.
Trying it
Download, unpack, start a server in that folder — the page fetches its assets over HTTP, so opening index.html directly will not work:
python3 -m http.server 8000
Then open http://localhost:8000/. Arrow keys to move, space to jump, X to attack.
What was added
- Browser backend
lionengine-core-web: canvas drawing, input, assets from one pack instead of from files, frame loop onrequestAnimationFrameusing TeaVM coroutines. - Chip music: sc68 compiled to WebAssembly and driven pull based — tracks stay at a few dozen kilobytes and loop seamlessly, rather than being pre-rendered.
- A score in the HUD, which the game did not keep before (distance, talismans, lives).
- Widescreen 370×208, the size the backgrounds are drawn for.
- Test entry
?trainer=true&x=370&y=12#level=07: pick a stage, set a spawn point, take no damage.
Bugs found while porting
All platform independent, all included in the branch:
Math.rounddisagrees with Java on negative halves — map chunks landed 257 instead of 256 pixels apart, and the background showed through the seam.- An object moved by another object never noticed: whether it had already backed up its position depended on iteration order. The swinging platforms carried nobody.
clearRectmakes a canvas transparent, not black — so everything not drawn showed the previous frame.- Reading a canvas back from the graphics card cost 77 ms a frame until the context was created with
willReadFrequently. - Unboxing
nullraises a JavaScript error that nocatch (NullPointerException)will see.
The build is described in the web branch. Engine: ray77/lionengine, branch web.
GPL, as the originals by b3dgs.