已发布项目

jupiter-on-fire-7896a7ba

Revision 1

Initial draft

浴火木星 · Jupiter on Fire

22 世纪,人类已大规模迁出太阳系。留守故土边疆的你,是边疆护卫队的一名飞行员。盘踞在木星近地轨道的太空盗切断航路、袭击补给站;当增援仍在遥远星门之外,你只能驾驶一架战机,单枪匹马迎击整支盗匪舰队。

《浴火木星》是一款运行在 ESP-Mosaico 上的低模太空空战游戏。木星云海与风暴填满远景,战机、小行星和激光在 480×480 屏幕上由软件实时渲染。弧形 HUD 显示击坠数、波次、分数、速度、护盾、船体、武器和锁定状态;开火、命中和受击配有科幻音效、马达振动,以及多功能子板灯带反馈。

操作指南

IMU + 触控

  1. 校准姿态
    开机或插拔多功能子板后,先按当前阅读方向拿稳设备。画面完成旋转并显示 HOLD STILL 时保持静止,固件会按新的屏幕方向重新初始化 IMU;出现 TILT TO FLY 后再开始倾斜。

  2. 俯仰与滚转
    整机向前倾斜,机头下压;向后倾斜,机头拉起。向左或向右倾斜会让战机滚转,并带少量协同偏航。使用小幅、连续动作把目标送入中央准星,不要突然甩动设备。

  3. 自动巡航
    IMU 模式下战机会自动向前飞行,不需要持续按加速。准星旁的 SPD 显示当前速度。

  4. 开火(短触)
    在画面空白处短触即可使用当前武器。点按右侧弧形 HUD 的武器格只会切换武器,不会同时开火。

  5. 环视(拖动)
    单指移动约 12 像素以上会进入环视,拖动追逐摄像机观察周围。拖动过程和松手都不会误触开火;环视只改变镜头,不改变战机朝向。

  6. 双指操作
    一根手指保持拖动环视时,另一根手指仍可在空白处短触开火。两路触点独立处理,不必先松开环视手指。

  7. 系统菜单
    长按机身 AI 键打开系统叠加层,可调亮度、音量,查看电池,并执行暂停或重置。菜单打开时战斗暂停;重置会回到第一波并清空分数。

三种弹药

  • Laser / 激光
    默认武器,不需要锁定。连续按住开火会发射带宽泛光、绿色辉光和白炽核心的三层重型激光;射速快,适合持续修正准星、清理普通敌机和削减小行星耐久。

  • Cluster / 集束弹
    需要先让敌机进入锁定圈。每次齐射释放 5 枚粒子,先向两侧大幅散开并形成弧线,再逐渐收束追向目标。整轮集束共享一次伤害,适合用宽扇面保持对机动目标的压制。

  • Missile / 导弹
    需要锁定,且每条命只有 5 枚。导弹单发追踪、造成 3 点伤害,适合重创高耐久目标或快速击碎大型小行星;弹药耗尽时 HUD 会显示 EMPTY。

战斗与 HUD

  • SHD 护盾先承受伤害,HUL 船体随后受损;一段时间不受击后护盾会逐格恢复。
  • 左上角显示 KILLS,下方显示波次和分数;中央锁定框确认 Cluster 与 Missile 是否可以发射。
  • 撞击小行星会使其碎裂,并造成 2 点伤害;受击后有短暂无敌时间。
  • Laser、Cluster 和 Missile 分别在右侧弧形 HUD 中占一个武器格,当前武器会高亮。

多功能子板支持

游戏现已支持热插拔 多功能交互子板,也兼容 Button LED 子板。子板可插在左侧或右侧:

  • 插入后,画面自动旋转,让子板位于屏幕下方;触控坐标随屏幕旋转,IMU 会在新方向下重新校准。
  • 左键:开火。 Laser 与 Cluster 可按住连续射击;Missile 每次按下只发射一枚,避免误耗弹药。
  • 右键:切换武器。 每次按下依次切换 Laser → Cluster → Missile。
  • 灯带射击反馈: Laser 发射时绿色追逐,Cluster 为黄色追逐,Missile 为橙色追逐。
  • 受击反馈: 玩家受伤时,红色快速闪烁约 600 毫秒,并优先覆盖当时的射击灯效。
  • Interaction 多功能子板使用 6 颗 LED;Button LED 子板使用 3 颗 LED。拔出后按键和灯带立即清空,游戏继续使用 IMU 与触控,并在重新插入后自动连接。

多功能子板不是开玩的前提;不插子板时,完整的 IMU、触控、音效和振动玩法仍然可用。

技术一览

  • 目标硬件:ESP-Mosaico(ESP32-S31)
  • 可选扩展:多功能交互子板 / Button LED 子板
  • 分类:显示与 HMI / 音频 / 传感器
  • 固件格式:Iris
  • 许可证:Apache-2.0

Jupiter on Fire · 浴火木星

In the 22nd century, humanity has largely moved beyond the Solar System. You are a pilot in the Frontier Guard, one of the few still protecting the old home system. Space pirates have occupied near-Jupiter orbit, cutting supply lanes and raiding outposts. With reinforcements still beyond a distant star gate, you launch alone against an entire pirate fleet.

Jupiter on Fire is a low-poly space combat game built for ESP-Mosaico. Jupiter's cloud bands and storms fill the horizon while fighters, asteroids, and laser fire are rendered in software on the 480×480 display. The curved fighter HUD shows kills, wave, score, speed, shield, hull, weapon, and lock state. Firing, hits, and damage add sci-fi audio, motor haptics, and optional multifunction-sub-board LED feedback.

How to play

IMU + touch

  1. Calibrate the current pose
    After boot or a multifunction-board hot-plug, hold the device in its current reading orientation. Keep still while the display rotates and shows HOLD STILL; firmware reinitializes the IMU in the new screen frame. Start tilting only after TILT TO FLY.

  2. Pitch and roll
    Tilt the whole device forward to push the nose down and back to pull up. Tilt left or right to roll, with a little coordinated yaw. Use small continuous movements to bring targets into the center reticle instead of jerking the device.

  3. Automatic cruise
    IMU mode maintains forward flight automatically. SPD beside the reticle shows current speed.

  4. Fire (short tap)
    Tap empty space to fire the selected weapon. Tapping a weapon cell on the right-hand arc changes weapons and does not fire at the same time.

  5. Look (drag)
    Move one finger about 12 pixels or more to orbit the chase camera. A look-drag never fires, including on release. Looking changes the camera, not the fighter heading.

  6. Two fingers
    Keep one finger dragging to look and short-tap empty space with the other to fire. The two touch tracks remain independent.

  7. System overlay
    Long-press the hardware AI key for brightness, volume, battery, pause, and reset. Combat pauses while the overlay is open. Reset returns to wave one and clears score.

Three ammunition types

  • Laser
    The default weapon needs no lock. Hold fire for rapid layered bolts with a broad bloom, green glow, and white-hot core. It is ideal for continuous aim correction, ordinary fighters, and chipping asteroid durability.

  • Cluster
    Requires a target inside the lock circle. Each volley releases five particles that spread into a wide curved fan, then tighten their homing pull toward the target. The full fan shares one damage event, making it useful for maintaining pressure on maneuvering enemies.

  • Missile
    Requires a lock and is limited to five rounds per life. Each single homing missile deals three damage, making it best for durable targets or large asteroids. The HUD reports EMPTY when the magazine is exhausted.

Combat and HUD

  • Shield (SHD) absorbs damage before hull (HUL) and regenerates cell by cell after a damage-free delay.
  • KILLS sits at the upper left with wave and score underneath; the center lock marker confirms whether Cluster and Missile can launch.
  • Ramming an asteroid shatters it and deals two damage, followed by a short invulnerability window.
  • Laser, Cluster, and Missile each occupy a cell on the right-hand HUD arc; the selected cell is highlighted.

Multifunction sub-board support

The game now supports the hot-pluggable Interaction multifunction sub-board and the compatible Button LED sub-board. Either board can be inserted on the left or right:

  • The display rotates automatically so the board becomes the bottom edge. Touch follows the display, and the IMU recalibrates in the new orientation.
  • Left key: fire. Hold for continuous Laser or Cluster fire. Missile launches once per press to prevent accidental ammo drain.
  • Right key: cycle weapon. Each press advances Laser → Cluster → Missile.
  • Shot LED chase: green for Laser, yellow for Cluster, and orange for Missile.
  • Damage feedback: rapid red flashes for about 600 ms override any shot animation when the player is hit.
  • The Interaction board drives six LEDs; the Button LED board drives three. Removal clears keys and LEDs immediately, while IMU and touch continue. Reinsertion reconnects automatically.

The sub-board is optional. Full IMU, touch, audio, and haptic gameplay remains available on the stock device.

Specs

  • Hardware: ESP-Mosaico (ESP32-S31)
  • Optional expansion: Interaction multifunction sub-board / Button LED sub-board
  • Categories: Display & HMI / Audio / Sensors
  • Firmware: Iris
  • License: Apache-2.0