展示HN:使用Codex(零代码)构建的2D平台游戏
嗨,HN!<p>星期天,我花了几个小时制作了一个短小的2D平台游戏(“波斯王子”风格)。有趣的是我构建它的方式。我采用了零代码的方法,完全使用OpenAI Codex CLI和代理技能(采用<i>渐进式披露</i>范式)来构建整个游戏。<p>你可以在这里玩这个游戏:<a href="https://acatovic.github.io/gothicvania-codex-demo" rel="nofollow">https://acatovic.github.io/gothicvania-codex-demo</a><p>你可以在这里查看完整的代码、代理技能和详细的说明:<a href="https://github.com/acatovic/gothicvania-codex-demo" rel="nofollow">https://github.com/acatovic/gothicvania-codex-demo</a><p>一些收获:<p>* 这是我经历过的最愉快的体验之一!<p>* 将工程应用与渐进式披露结合使用是极其强大的——我把我的SKILL.md视为一个简单的目录(“技能地图”),然后从那里开始<p>* 实施 -> 评估循环是关键——我使用了Playwright和评估检查表,代理自动构建和纠正<p>* 我使用PROGRESS.md作为代理的记忆/日志机制,并减少上下文噪音<p>* 游戏开发代理由DESIGN-DOCUMENT.md引导,规定了游戏目标、布局和机制<p>* 我使用了渐进式提示——我逐步构建游戏——从基本的玩家机制开始,然后添加图块、NPC、交互、声音、菜单——每次一个提示<p>我没有写任何代码,甚至没有查看游戏引擎(Phaser)的API——只是给技能提供了文档链接。未来已经到来!<p>感谢ansimuz(gothicvania资源)和Pascal Belisle(音乐)。<p>*注意:* 这些资源*不是*由AI创建的。背景和可能的图块可以用AI生成,但精灵还没有达到那个水平(我尝试了多种不同的模型)。这是未来需要深入探索的内容。<p>希望你喜欢,告诉我你的想法!
查看原文
Hi HN!<p>On Sunday I spent a couple of hours building a short 2d platformer ("Prince of Persia" style). What's interesting is how I built it. I went for a zero-code approach, and built the whole thing using OpenAI Codex CLI and agent skills (with the <i>progressive disclosure</i> paradigm).<p>You can play the game here: <a href="https://acatovic.github.io/gothicvania-codex-demo/" rel="nofollow">https://acatovic.github.io/gothicvania-codex-demo/</a><p>You can see the full code, agent skills and a complete writeup here: <a href="https://github.com/acatovic/gothicvania-codex-demo" rel="nofollow">https://github.com/acatovic/gothicvania-codex-demo</a><p>Some takeaways:<p>* This was one of the most enjoyable experiences ever!<p>* Applying harness engineering with progressive disclosure is incredibly powerful - I treated my SKILL.md as simply a ToC (a "skills map") and took it from there<p>* Implement -> Evaluate loops are key - I used Playwright and an evaluation checklist and the agent built and corrected automagically<p>* I used PROGRESS.md as a memory/log mechanism for the agent, and a way to minimize context noise<p>* The game dev agent was steered by the DESIGN-DOCUMENT.md, stipulating game objectives, layout and mechanics<p>* I used progressive prompting - I built up the game piece wise - starting with basic player mechanics, then adding tiles, NPCs, interactions, sounds, menus - one prompt at a time<p>Zero code written by me. Never even looked at the game engine (Phaser) API - just gave the skills a link to the documentation. The future is here!<p>Credits to ansimuz (gothicvania assets) and Pascal Belisle (music).<p>*NOTE:* The assets were *NOT* created by AI. Backgrounds and probably tiles you could generate with AI, but sprites are not quite there yet (I tried a number of different models). Something to explore fully in the future.<p>Enjoy and let me know what you think!