Last Light is one HTML file with no image, model or sound files. It has three parts:
shinygen npm package.<script type="text/gdscript"> block. Shaders go in <script type="text/gdshader"> blocks.ShinyGen.start(...), that starts the engine on the page's canvas.Everything you see in this game is made by its code when the page loads. Press Code to read all of it.
The Shiny Gen engine is our fork of the Godot engine, version 4.6, built to run in the browser with a WebGPU renderer (Godot WebGPU) and a WebGL renderer for browsers and phones without WebGPU. The code is real GDScript with Godot's own class names, such as Node3D, MeshInstance3D and Camera3D, so what you or an AI assistant know about Godot 4 applies here.
Claude, ChatGPT and other AI assistants that write code can make a game like this. Give the assistant a small working page to start from, so it knows how the engine is loaded, and describe your game.
Make me a game as one HTML file that runs on the Shiny Gen engine.
About the engine: it is a fork of Godot 4.6 that runs in the browser, with a WebGPU renderer and a WebGL fallback. One script tag loads it from the shinygen npm package. The game is GDScript inside a script tag of type text/gdscript, using Godot 4 class names. Shaders, if you need them, go in script tags of type text/gdshader with a name, and the GDScript gets one with get_parent().get_shader("name").
Rules: one HTML file, no image, model or sound files (build meshes, materials and sounds in code), keep the engine script tag and the ShinyGen.start line as they are, and give me back the whole file.
Start from this working page, which shows a spinning cube:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My game</title>
<style>
html, body { margin: 0; height: 100%; background: #111; }
#canvas { display: block; width: 100vw; height: 100vh; }
</style>
<script src="https://cdn.jsdelivr.net/npm/shinygen@4.6.9/shinygen.js"></script>
</head>
<body>
<canvas id="canvas"></canvas>
<script type="text/gdscript" name="Main">
extends Node3D
var cube: MeshInstance3D
func _ready():
var cam = Camera3D.new()
cam.position = Vector3(0, 1.5, 4)
add_child(cam)
cam.look_at(Vector3.ZERO)
var light = DirectionalLight3D.new()
light.rotation_degrees = Vector3(-45, 30, 0)
add_child(light)
cube = MeshInstance3D.new()
cube.mesh = BoxMesh.new()
var mat = StandardMaterial3D.new()
mat.albedo_color = Color(1.0, 0.5, 0.2)
cube.material_override = mat
add_child(cube)
func _process(delta):
cube.rotate_y(delta)
cube.rotate_x(delta * 0.5)
</script>
<script>
ShinyGen.start({ canvas: "#canvas", autoFit: false });
</script>
</body>
</html>
The game I want: (describe your game here)
This is a complete game in one HTML file. It runs GDScript on the Shiny Gen engine, a fork of Godot 4.6 for the browser, which the script tag loads from the shinygen npm package. Keep it as one file with no asset files, and keep the script tags as they are. Change this: (say what you want). Give me back the whole file.
L A S T L I G H T. Type your own title between the quotes.LIGHT_RANGE := 32.0. Make it 60.0 to light a lighthouse from further away.st.y * 16.0. Raise 16.0 for a faster boat.Download the file and upload it to any web host. It has to be opened over http or https, because the engine loads from the npm CDN. The engine shows a Made with Shiny Gen notice while it loads, and the package license asks you to keep it. The embed guide has the details.
In the Shiny Gen app you describe a game and the AI agent writes the GDScript, runs the game and fixes what it finds. Start a new Godot game, or read how this one was made.