Skip to content
Dashboard

Level Capture & Dev Mode

To overlay heatmaps, death markers, and player movement vectors onto your level layouts in the LogLudo dashboard, LogLudo needs an orthographic visual snapshot of your rooms.

The LogLudo GameMaker SDK features a Dev Mode Level Capture Engine that automatically captures, tiles, base64-encodes, and uploads your game rooms while you test your game inside the GameMaker IDE.


Room captures are transmitted to LogLudo’s /capture endpoint. Because modern 2D game rooms often span thousands of pixels (e.g., 9000 × 6000 px), attempting to capture the entire room in a single surface would crash lower-end GPUs and exceed HTTP payload limits.

The SDK solves this with an asynchronous 3000px Tiling Engine:

+------------------+------------------+------------------+
| Tile (0, 0) | Tile (1, 0) | Tile (2, 0) |
| 3000 x 3000 px | 3000 x 3000 px | Remainder px |
+------------------+------------------+------------------+
| Tile (0, 1) | Tile (1, 1) | Tile (2, 1) |
| 3000 x 3000 px | 3000 x 3000 px | Remainder px |
+------------------+------------------+------------------+
  1. Grid Calculation: Determines columns and rows (ceil(room_width / 3000), ceil(room_height / 3000)).
  2. Dedicated Render Camera: Employs GameMaker’s view_camera[7] and view_visible[7] so your gameplay camera (view_camera[0]) remains completely undisturbed.
  3. Chunk Processing State Machine:
    • State 1: Creates a surface and positions view_camera[7] over the current tile slice.
    • State 2: Waits 1 frame for GameMaker’s render pipeline to draw into the surface.
    • State 3: Saves the surface, encodes it to base64, uploads the tile via LOGLUDO.send_room_capture_tile(), frees the surface, and advances to the next tile.
  4. Manifest Dispatch: Once all tiles are sent, the SDK calls LOGLUDO.send_room_manifest() with the dimensions, tile size, and column/row counts. The LogLudo cloud reconstructs the level map into an interactive zoomable canvas.

When running your game from the GameMaker IDE (GM_build_type == "run"):

  • Exactly 1 second after entering any room (room_timer == game_get_speed(gamespeed_fps)), the SDK checks if that room has been captured during this session.
  • If uncaptured, it initiates the background tiling capture without interrupting your gameplay.
  • Each room is tracked in captured_rooms, preventing repeated re-captures as you move back and forth between rooms.

On game launch in dev mode, if room captures have not yet been performed and reminders are not snoozed, the SDK triggers a non-blocking get_integer_async() dialog asking whether you want to run the automated SceneLytics capture:

  • 1 (Default): Run the automated SceneLytics capture tour across all rooms.
  • 2: Skip for this session.
  • 3: Snooze / don’t remind for 1 week.

The developer response is handled cleanly via GameMaker’s asynchronous dialog event (Other_63.gml).


Automated Whole-Game Tour: The "capture" Secret Code

Section titled “Automated Whole-Game Tour: The "capture" Secret Code”

If your game has dozens of levels, you do not need to manually play through each room to generate map captures. The SDK includes an automated room-sweeping tour:

  1. Run your project with F5.

  2. Anywhere during gameplay, simply type the letters:

    c a p t u r e
  3. The SDK intercepts keyboard_string, activates auto_capture_mode, and executes the automated tour:

    • Remembers your current starting room (auto_capture_original_room).
    • Teleports to room_first.
    • Waits 2 frames for tiles to settle, captures and tiles the room.
    • Advances to room_next(room).
    • Repeats until all rooms in your project tree have been captured and uploaded.
    • Automatically teleports you back to your starting room and restores normal gameplay!