You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**diepAPI** is a comprehensive library that gives you programmatic access to the diep.io game. Build powerful bots and tools with just a few lines of code! Whether you want to create an AFK script, automate shape farming, or build advanced analytics tools, diepAPI makes it easy.
16
17
17
18
**Key capabilities:**
19
+
18
20
- 🎮 **Real-time game state** - Access player position, velocity, level, tank type, and more
- Basic event handling with keyboard and game events
253
258
- Using `player.useGamepad()` to enable API control
254
259
- Using `player.moveTo()` to control player position
@@ -318,6 +323,7 @@ game.on('frame', () => {
318
323
```
319
324
320
325
**What you'll learn:**
326
+
321
327
- Loading and using the `entityManager` extension
322
328
- Filtering entities by type to find specific targets
323
329
- Using `Vector.distance()` for distance calculations
@@ -333,48 +339,50 @@ game.on('frame', () => {
333
339
334
340
Quick reference for the main APIs:
335
341
336
-
| API | Description | Key Properties/Methods |
337
-
|-----|-------------|----------------------|
338
-
|**game**| Game state and events |`.on(event, handler)`, `.off(event, handler)`, `.isReady`|
339
-
|**player**| Player state and control |`.position`, `.velocity`, `.level`, `.tank`, `.isDead`, `.spawn(name)`, `.moveTo(pos)`, `.lookAt(pos)`, `.upgrade_stat(stat, amount)`, `.upgrade_tank(choice)`, `.useGamepad(enabled)`|
340
-
|**input**| Keyboard and mouse control |`.keyDown(key)`, `.keyUp(key)`, `.keyPress(key)`, `.mouse(x, y)`, `.mousePress(button)`|
341
-
|**arena**| Arena information |`.size` (arena dimensions) |
342
-
|**camera**| Camera position tracking |`.position` (current camera position) |
343
-
|**scaling**| Coordinate system conversion |`.toArenaPos(canvasPos)`, `.toCanvasPos(arenaPos)`, `.screenToCanvas(screenPos)`, `.canvasToScreen(canvasPos)`|
344
-
|**minimap**| Minimap position tracking |`.position` (minimap position) |
345
-
|**playerMovement**| Advanced movement tracking | Position/velocity tracking with prediction |
0 commit comments