Hold the line against endless waves and their boss.
A side-scrolling shoot-'em-up: dodge enemy fire, blast through waves of fighters, and shoot bouncing orbs for power-ups that upgrade your fire mode, speed, missiles, shield and bombs. A boss shows up every 20 kills. Survive as long as you can and chase a high score.
Made by Frank Force. Released under the MIT license — original source.
Changes for this platform: Rewrote every ../templates/ and ../dist/ script src to ./ (this game now vendors its own copy of the shared LittleJS engine/template files instead of referencing a repo-root dist/templates folder), and stripped the cache-busting ?<timestamp> query strings from those src attributes. Title changed from 'LittleJS Powerwing' to 'PowerWing'. Added a <meta viewport> tag and an html,body{margin:0;height:100%;overflow:hidden;background:#000} reset (the engine already sets this on <body> itself at runtime; this is just belt-and-suspenders for the platform's fill-the-viewport rule ahead of first paint). Renamed the internal saveDataInit('gradius') storage key to saveDataInit('powerwing') (trademark-adjacent internal key, never shown to the player; fresh save, no migration needed). Added <script src="./arcade-bridge.js"></script> after menus.js and before the game's own inline <script>, and engineLoader.js is the pre-patched build (see below) instead of upstream's. Nothing else in the game's own inline <script> or in textureGenerator.js/gameFx.js/menus.js was changed. littlejs.release.js has one patch beyond the verbatim upstream build: glInit()'s glCanvas.getContext('webgl2', {antialias:glAntialias}) now also passes preserveDrawingBuffer:true, so an out-of-band readback of the WebGL canvas (toDataURL/drawImage/getImageData from a later task -- e.g. this platform's headless checker, or any screenshot tool) doesn't see a blank canvas; without it, the browser may clear that canvas's drawing buffer right after compositing each frame, even though the game renders fine live. Confirmed by direct pixel probing: without the flag the WebGL canvas read back as one uniform color, with it real sprite colors. Same fix as this platform's HexGL port. Zero gameplay/visual effect. engineLoader.js patches (3, all upstream-authored for this platform): (1) engine path '../dist/' -> './'; (2) the littlejsBuild() console-debug helper's direct localStorage calls wrapped in try/catch; (3) a new inline script injected right after the engine loads, before any game code, that redefines readSaveData/writeSaveData to route through window.ArcadeSDK.storage when present (falling back to upstream's own try/catch-guarded localStorage when the game runs standalone) -- this is what makes the LittleJS medal system and saveDataInit('powerwing')'s best-score survive in the sandboxed iframe, where real localStorage throws. arcade-bridge.js (new file, nothing patched to add it): calls ArcadeSDK.ready() once via menus.js's addPlayingListener firing synchronously at registration; polls the game's top-level `score` variable every 400ms (bare identifier access works because classic <script> tags share one global lexical scope, and the poll only runs after the game's own script has executed) and reports SDK.score() on change; wraps the global submitBestScore() function (declared in menus.js, called by name from inside the game's damagePlayer() exactly once per run, only when lives hits 0) to fire SDK.gameOver({score, won:false}) and SDK.submitScore(score) exactly once per run before calling through to the original -- this game has no win condition anywhere (gameState is only ever 'playing' or 'gameover'; 'win' appears once in a comment but is never assigned), so won is always false; and wires SDK.onPause to open the game's own pause menu via showMenu('pause') when isPlaying(), leaving SDK.onResume as a no-op since the player clicks RESUME themselves. touch.scheme is 'native' because the game enables LittleJS's own on-canvas virtual gamepad (touchGamepadEnable=true, a digital stick + 4 buttons) via canvasFixedSize/touchGamepad* settings already present in the source, so the platform shim must not draw its own .arc-pad controls on top of it.
Comments 0
Log in to comment.