Snarky\'s
LOADING
Left Click / DragSelect a unit, drag a box to select several, or command the current selectionRight ClickDeselectArrows / WASDPan the cameraTabCycle through movable unitsMMute
strategy#rts#webgl#js13k#real-time-strategy#base-defense

Hold the line, rescue your crew, call the lander home.

A tiny real-time strategy game: click and drag to select your stranded crew, send them to fight off a swarm of enemies, build harvesters on energy wells to power a turret defense, then call the lander down to rescue everyone you have left. Originally Dominic Szablewski's (phoboslab) 13-kilobyte entry to js13k 2019.

2 plays2 players0 remixesPublished 8d ago
Open source

Made by Dominic Szablewski (phoboslab), Andreas Lösch (music, no-fate.net). Released under the MIT license — original source.

Changes for this platform: Build: PHP (obj_to_rmf.php / combine_rmf.php, needed to turn the assets/*.obj models into the game's own .rmf/.rmfc format) is not available in this environment, so no PHP build step was run at all. Upstream's own repo already ships the fully-built model blob committed at the top level as m/m.rmfc + m/t.png (committed in the repo's initial commit, not gitignored) -- these were copied verbatim into m/ here; no gh-pages branch exists on this repo (checked via git ls-remote: only 'master'), so that fallback was moot. Shipped index.html is assembled from upstream's own source/html_template.html + index-debug.html (the unminified, non-uglified, script-tag-per-file debug build) rather than the obfuscated single-file release build, so the platform's seed game stays readable/diffable against upstream; added the arcade-bridge.js script tag and the html,body fill/overflow/flex-center CSS rules required by this platform, changed the title-screen 'CLICK TO START' copy to 'CLICK OR TAP TO START'. source/renderer.js: added preserveDrawingBuffer:true to both getContext('webgl'/'experimental-webgl') calls so screenshot capture never reads back a blank canvas. source/main.js: wrapped the document.body.requestFullscreen() call in try/catch and .catch() -- the sandboxed iframe has no allow-fullscreen, so the call's promise rejects every time, which was previously unhandled and would have surfaced as a console error; added two one-line bridge hooks (window.__voidcallOnTitle at the title screen, window.__voidcallOnRunStart when a run begins), both no-ops when arcade-bridge.js is absent. source/game.js: added a game_over flag so the YOU LOST branch of game_run() (and the win branch in entity_lander.js) report to the bridge exactly once instead of every frame; added a window.__voidcallPaused check at the top of game_run() that skips simulation while keeping game_time_last current (so resuming doesn't produce one giant game_tick), wired to ArcadeSDK.onPause/onResume via arcade-bridge.js, which also suspends/resumes the WebAudio context directly (no source change needed for audio pause/mute). source/entity_unit.js: added a score-change bridge hook where game_num_guys (crew remaining -- the closest thing this game has to a score) decrements on a crew member's death. source/entity_lander.js: added the win-condition bridge hook (game_over set, won=true, score=crew rescued) alongside the existing game_end('THE END', ...) call. source/input.js: added touchstart/touchmove/touchend/touchcancel handling via addEventListener (deliberately not the on* properties main.js/input.js use elsewhere, so it can't be clobbered by, or clobber, main.js's document.onclick/ontouchend title-screen handler) -- upstream is mouse-only and had no touch handling at all beyond the title screen's tap-to-start. One finger is translated 1:1 to the existing mouse handlers: tap = select/command exactly like a left-click, drag = box-select exactly like a left-click-drag. Two fingers pan the camera directly via camera_target_x/z, since a touchscreen has no keyboard (upstream's only camera-pan input besides edge-scroll-while-fullscreen, which never triggers in this sandbox since the iframe has no allow-fullscreen -- that upstream limitation pre-dates this port and affects keyboardless desktop users too). No network calls, localStorage/cookie/indexedDB use, alert/confirm/prompt, or personal/dedication text were found anywhere in the upstream source to remove; the only in-game text ('Graphics & Programming - Dominic Szablewski - phoboslab.org', 'Music - Andreas Lösch - no-fate.net') is genuine author/composer credit and was kept as-is. Not shipped: assets/*.obj and assets/*.rmf (the PHP build's inputs/per-part outputs -- superseded by the already-combined m/m.rmfc), build.sh, obj_to_rmf.php, combine_rmf.php, shrinkit.js, package.json, .gitignore, README.md, index-debug.html, and .git. Renamed the packed model container m/m.rmfc to m/m.bin (same bytes) because the platform only stores allow-listed file extensions.

Comments 0

Log in to comment.

  • Loading…