2DTDE – Top-Down Engine (Work in Progress)
2DTDE is a small top-down engine I’m developing for Scratch and TurboWarp projects. Its main goal is to simplify how player movement, object interaction and room logic are handled in small games.
Instead of manually coding every wall, object or trigger, the engine reads simple object data entries. Each entry describes things like the object’s position, size and behavior. The engine then automatically handles collision checks and interactions based on that data.
Whenever the player attempts to move, the engine first calculates the next possible position and checks it against all known objects in the current room. If the new position would intersect with a collision hitbox (for example a wall or table), the movement is blocked. If the player touches a trigger hitbox instead, the engine can execute custom behavior such as changing rooms, activating events or running scripted logic.
Because the system is data-driven, new objects can be added simply by creating new data entries rather than rewriting the core movement logic. Different hitbox IDs can define different behaviors, and additional IDs can be used to expand trigger types or create custom interactions.
Currently the engine only supports objects that are aligned to the grid (axis-aligned rectangles). This means objects cannot yet be rotated or angled. Expanding this system to support more flexible hitbox shapes is something I’m planning for future versions.
The engine also supports multiple rooms using room IDs, allowing objects and triggers to be grouped by level. This makes it possible to build small multi-room environments without rewriting the underlying movement and collision systems.
2DTDE is still a prototype, but the goal is to create a modular system that makes building small top-down minigames in Scratch significantly easier.
The engine is currently being developed alongside BFD2, where it will be used as the core system for handling player movement and object interaction.
I also plan to release 2DTDE publicly in the future so others can use it for their own Scratch or TurboWarp projects. However, there is currently no release date yet, as the system is still being actively developed and improved.











0 comments