Claude Code 打造700个恒星系太空探索演示
AI 总结
Reddit 用户 lighght 称,他使用 Claude Code 开发了浏览器演示 Post Apocalyptic Space Cruise,其中包含 700 个可自由探索的恒星系统,最终 HTML 文件约 28 KB。据开发者介绍,Claude Code 生成了渲染代码、程序化行星与纹理及合成音频,再通过后续提示调整生成规则、航行速度和操作方式。该免费演示可在桌面和移动浏览器运行,但仍存在故障,移动端操作也略显繁琐。
深度见解
该项目以可玩的浏览器成品展示了 Claude Code 在程序化图形、音频生成和网页游戏开发方面的实际用途,但成品质量与开发过程主要来自开发者自述。
| Try it in your browser | Source code on GitHub Free to play, nothing to install. Runs in the browser on desktop and mobile. After seeing the 97 KB underwater world posted here recently, I wondered whether the same technical approach could work for a little 3D space exploration demo. So I prompted Claude Code to build one. The result is Post Apocalyptic Space Cruise, a procedurally generated galaxy with 700 star systems that you can freely explore. You'll encounter red dwarfs, sun-like stars, white dwarfs, neutron stars, supergiants, black holes, gas giants, rocky planets, and moons. As deep space contains a whole lot of nothing, you can travel relatively fast between stars, but slow down automatically when approaching celestial bodies. You can also adjust your ship's speed manually. The star and planet distributions are based on the generation formulas from WHERE ARE THEY?, a little 2D space exploration roguelike I've been developing. How I built it with Claude Code: My initial prompt described the technical approach and the kind of space exploration experience I had in mind. Claude Code generated the WebGL2 rendering code, procedural planets and textures, and synthesized audio. It took a few follow-up prompts to get the star/planet distributions closer to my existing game and to improve the travel speed and controls. The initial HTML file was about 26 KB. After adding some metadata and other little adjustments, the final file is around 28 KB. All the 3D visuals and sounds are generated directly in your browser, without pre-made 3D models, texture files, or audio files. The start screen does load a separate GIF and font. The demo still has some glitches, and the mobile controls are a bit fiddly. Older phones might also struggle with the higher graphics settings. Anyway, it was a fun little experiment, and I'm curious what you think! :) submitted by /u/lighght [link] [comments] |
#Claude Code#Post Apocalyptic Space Cruise#WHERE ARE THEY?#WebGL2