pixel-plays README

项目的 README,来自 github.com/amirmushichge/pixel-plays。合并为一个 markdown 文件:README.md。

Pixel Plays

Small browser games shown as isometric pixel dioramas. Every game is one page of plain JavaScript with its own software rasteriser: no build step, no dependencies, no sprites or image assets.

Play: https://pixel-plays-ruby.vercel.app/

Concept by abhi. Game by AmirMushich. Visual reference for the style: shawn.'s Small plays; no assets or subjects were copied.

Games

Game What you do Input
Balote Bocce against a bot, first to 5 Drag back and release; arrows + space
Stari Most Five dives off the old bridge, flip and enter the water vertically Hold and release
Rooftop Laundry Get the washing into the basket before the storm Drag; space
Tie-Break Clay-court tie-break against a bot, the moment you hit decides where the ball lands Tap; space
Mini Ramp 60 seconds on a skateboard ramp, pump for height and grab in the air Hold and release; space

Run

Requires Node.js; nothing to install.

node serve.mjs

Then open http://127.0.0.1:5300/. Any static file server works, and the site deploys as plain static files.

Add a game

Create <id>/index.html, load ../shell.js, call PixelPlays.mount({ id, rules }), set window.PP_SCENE, load ../engine.js, then add the game to GAMES in shell.js. The page needs a #mute button. Put its background track at <id>/<id>.mp3.

Visual rules

License

The code is under the MIT License. The music is not: see MUSIC.md.

pixel-plays (amirmushichge/pixel-plays)

正在搜索数据库…

这是什么?一组小型浏览器游戏,以等距像素微缩场景的形式呈现。每个游戏都是单个 HTML 页面,无需构建步骤,也没有任何依赖,使用自带的小型软件光栅化器绘制画面,而不使用精灵图或图片。
这是游戏引擎,还是一组已完成的游戏?这是一组五款已完成、可直接游玩的游戏(Balote、Stari Most、Rooftop Laundry、Tie-Break、Mini Ramp)。shell.js 和 engine.js 是用于菜单、音乐和渲染的共享辅助文件,并非可供其他项目导入的通用游戏引擎。
我该怎么运行它?克隆仓库,用任意静态文件服务器托管该文件夹;然后在浏览器中打开服务器提供的地址,因为整个站点就是普通的静态文件。
使用它需要构建工具或任何库吗?不需要构建工具或任何库:没有构建步骤,没有 npm 依赖,也没有精灵图或图片素材,每个游戏都用自带的软件光栅化器自行绘制。
背景音乐可以免费复用吗?不可以。只有代码采用 MIT 许可证;音乐有单独的条款,记录在 MUSIC.md 中。
包含多少款游戏?每款游戏该怎么玩?目前附带五款游戏:Balote(与电脑对战的意大利滚球,先得 5 分者获胜)、Stari Most(五次悬崖跳水,要求垂直入水)、Rooftop Laundry(在暴风雨来临前把衣物拖进篮子里)、Tie-Break(靠点击计时的网球抢七)、Mini Ramp(60 秒的滑板花式动作)。
如何向项目中添加新游戏?创建一个加载 shell.js 和 engine.js 的 index.html,使用 id 和 rules 调用 PixelPlays.mount,设置 window.PPSCENE,提供 groundColor/bake/update/draw 函数,添加一个 #mute 按钮和一条背景音乐曲目,然后在 shell.js 的 GAMES 列表中注册该游戏。
是什么让这些游戏拥有独特的像素微缩场景风格?在 360x280 的低分辨率画布上,由以下要素共同营造:实时软件光栅化器,带深度缓冲区,四级明暗与 Bayer 抖动;固定 30 度的正交相机;向屏幕右侧投射的长而锐利的阴影;以及色相偏移的色阶(紫色阴影、暖黄色光照)。
大小
11.7 MB
星标
528
更新
提交Oct 31
时长
18天
提交 · 90 天