LogoHTTP Games

Visualization

Understand the dungeon tiles and cartographer.

If you haven't obtained a token yet, check out Authentication documentation.

Get Cartographer Position

In GridTrap, the cartographer is your character navigating through the dungeon. To visualize the game state, you need to know where the cartographer is currently positioned and whether they have fallen into a trap.

To get the current position of your cartographer, send the following request:

curl \
  -X GET \
  -H 'Authorization: Bearer sk_Guei2HJgU...' \
  https://api.http-games.almostapps.eu/v1/games/grid-trap/dungeons/[YOUR_DUNGEON_ID]/cartographer

List Dungeon Tiles

To visualize the entire dungeon layout, you need to retrieve information about all tiles. Each tile represents a position in the dungeon grid and has a specific type that determines what the cartographer will encounter there.

To get a list of all tiles in a dungeon, send the following request:

curl \
  -X GET \
  -H 'Authorization: Bearer sk_Guei2HJgU...' \
  https://api.http-games.almostapps.eu/v1/games/grid-trap/dungeons/[YOUR_DUNGEON_ID]/tiles

Prop

Type

Tile Types

The dungeon contains several types of tiles:

  • wall: Impassable barriers that block movement
  • ground: Walkable areas that may have hidden traps
  • entrance: The starting position where the cartographer begins
  • rope: The exit point that allows escape from the dungeon

As an example, if you wanted to get only the entrance and exit tiles, you could send:

curl \
  -X GET \
  -H 'Authorization: Bearer sk_Guei2HJgU...' \
  -d 'type=entrance,rope' \
  https://api.http-games.almostapps.eu/v1/games/grid-trap/dungeons/[YOUR_DUNGEON_ID]/tiles

This endpoint also supports pagination using limit and cursor parameters. Learn more about it in the pagination documentation.

Get Specific Tile

This section is optional and not required for first playthrough.

If you need information about a specific tile in the dungeon, you can retrieve it by its coordinates. This can be useful depending on the implementation of your play. For instance, you might want to check if the tile north of your player is ground before moving there.

To get details about a specific tile, send the following request:

curl \
  -X GET \
  -H 'Authorization: Bearer sk_Guei2HJgU...' \
  https://api.http-games.almostapps.eu/v1/games/grid-trap/dungeons/[YOUR_DUNGEON_ID]/tiles/[X_Y]

The tile coordinates must be provided in the format x_y.