Game and engine boundaries01 / 12

What GameDevLand SDK provides

The project defines game behavior and uses engine modules through the public API.

GameDevLand SDK provides ready-made modules for HTML5 game development. Different games can share these modules while keeping their logic in separate projects. The @gamedevland/engine package runs in the browser, while @gamedevland/vite handles project startup and builds.

Where the boundaries lie

The project owns the game itself: its rules, state, flow and presentation. Domain logic—the rules and data specific to the game—stays in the project.

The SDK provides shared infrastructure. The engine is divided into modules. Each handles its own task and exposes a public API: methods, types and extension points available to the project.

A specific game

Project

Domain logic
Game rules and state
Game flow
Action order and responses to events
Presentation
UI structure and behavior
Uses module APIs
@gamedevland/engine

Engine modules

Public module APIsMethods · types · extension points

Game flow

  • coreEngine startup and operation
  • scenesScene transitions and lifecycle
  • fsmStates and transitions
  • commandsCommand execution
  • eventsEvent emission and subscriptions

Screen and input

  • layoutsNodes, components and actions
  • prefabsCreating nodes from templates
  • screenScreen size and adaptation
  • inputPointer and wheel events
  • interactionsDrag handling

Audio, effects and physics

  • audioPlayback and channels
  • tweenProperty animation
  • particlesParticle emitters
  • physicsBodies and physics simulation

Infrastructure

  • assetsAsset loading and storage
  • configsSettings, saves and localization
  • diRegistering and resolving dependencies
  • validationData validation and decoding
  • errorsEngine error types
  • platformsGame platform integration
Public engine modules grouped by purpose. The diagram shows the engine's modules, not dependencies between them.

This separation lets the game change without rewriting shared engine mechanisms. The engine can evolve independently of a particular game’s rules: as long as its API remains compatible, the project does not need to adapt to internal changes.

The API boundary

The project chooses a sound and when to play it. To play the sound, it calls the SDK’s audio module. For example:

engine.audio.playSfx(soundId);

Here, engine is the engine instance and soundId identifies a prepared sound. The playSfx method plays it using the audio settings. The game decides when to call the method and which sound to pass.