Looking at this request, I need to create a Geometry Dash level builder with a custom programming language (GDL), a live preview, and a comprehensive set of GD objects. Let me start by exploring the project structure, then design and build everything.
Now I have a clear picture of the project. I'll create a comprehensive Geometry Dash level editor with a custom programming language called GDL (Geometry Dash Language). The language will use short, memorable aliases for both humans and AIs, with a live SVG preview of the level construction.
Let me start creating the core files:
Now the parser — the core logic that processes GDL code into placed objects:
Let me fix the type errors in the parser:
Now the LevelPreview component — the visual renderer for all GD objects:
Let me fix the unused variables:
Now the Editor component:
Now the ObjectReference component — the comprehensive reference panel:
Let me check the error on line 94:
The { ... } in JSX is being parsed as an expression. I need to escape it:
Fix the unused variable:
Now the main App component that ties everything together with the layout, state management, and default code:
Now update the HTML title and CSS:
Now let me build the project to verify everything compiles correctly:
The build succeeds! But I noticed a bug in the ground rendering — the height calculation is wrong. Let me fix it:
Let me also improve the ground rendering and add background decoration for a better GD-like feel:
Let me rebuild to confirm everything works:
The build works great! Now let me enhance the preview with a "Play" simulation feature — a cube that auto-scrolls through the level to visualize the gameplay flow:
Now I'll add the play simulation feature. Let me add the state variables and animation logic:
The effects need to be after bounds and us are defined. Let me fix the ordering:
Good, the state vars are declared. Now I need to add the effects after the bounds and us definitions. Let me find that location:
Now I'll add the animation effects after the coordinate conversion functions, and update the scroll behavior:
Now let me add the Play/Stop button to the controls bar:
Now let me add the player cube rendering in the SVG. I'll read the relevant section:
Now let me rebuild to verify:
Build successful! Let me improve the ground block rendering to be more visible:
Let me do a final build to confirm the complete app works:
The build succeeds! The complete GDL Level Editor is ready. Let me give you a summary of what was built:
🎮 GDL — Geometry Dash Level Language & Editor
Custom Language (GDL)
- 45+ GD object types with both full names and short aliases (e.g.,
spike / s, orb_yellow / oy, portal_ship / psh)
- Uses names + aliases (not IDs) for readability — IDs are shown in reference for lookup
- Comments:
# your comment
- Loops:
loop N var { ... } with math expressions like (50*i + 100)
- Properties:
r:rotation, c:color, g:group, w:width, h:height, m:message
Objects Include
- Blocks & Platforms: block, half_block, slopes
- Spikes: 4 orientations + mini variants
- Game Mode Portals: cube, ship, ball, UFO, wave, robot, spider, swing
- Modifier Portals: gravity, size, mirror
- Speed Portals: v1 through v4
- Orbs: yellow, blue, pink, green, red, dash, trigger
- Pads: yellow, blue, pink, red
- Triggers: move, rotate, color, pulse, alpha, toggle, spawn, stop
- Decorations: ground_line, columns, rings, crosses, dots, lines, glow
- Special: coin, text, checkpoint, end, start
App Features
- Live Code Editor (dark-themed monospace textarea with Tab support)
- SVG Level Preview with ground line, grid overlay, zoom controls
- ▶ Play Simulation — animated player cube scrolls through the level
- 📚 Reference Panel — searchable, categorized, click-to-insert
- Error Reporting — line-numbered parse errors
- Stats Bar — object count, line count, error status
Files built: src/gdl/types.ts, src/gdl/parser.ts, src/components/LevelPreview.tsx, src/components/Editor.tsx, src/components/ObjectReference.tsx, src/App.tsx, index.html, src/index.css