#+title: 2D Game Engine Development Plan — Mixed & Fun Milestones * Milestone 1: A World That Moves ** Map & Rendering *** DONE Update map parser to read layer information. :graphics: *** DONE Render multiple tile layers (simple implementation). :graphics: ** Input & Player Basics *** TODO Build a simple input-state map (keys pressed/held). :input: *** TODO Create basic player entity (plist data + type). :entities: *** TODO Move the player 1 pixel each frame to test update loop. :entities:update: ** Scene & Entity System *** TODO Implement a basic `scene` that holds a list of entities. :scene: *** TODO Write `scene-add-entity!` and `scene-foreach-entity`. :scene: * Milestone 2: Seeing & Controlling Things ** Sprite Rendering *** DONE Load a texture and draw a static sprite. :graphics:sprites: *** TODO Add sprite reference to player entity plist. :entities: ** Input → Actions *** TODO Create input→action map (e.g. W→move-up). :input:actions: *** TODO Update player velocity based on actions. :physics: ** Entity Utilities *** TODO Write plist helpers for entity data (ref, set!, update!). :entities:plist: * Milestone 3: A Moving Camera, Gravity & Scene Loading ** Camera *** TODO Implement a basic camera struct with x/y. :graphics:camera: *** TODO Offset rendering by camera position. :graphics:camera: ** Basic Physics *** TODO Implement gravity for entities with :gravity? #t. :physics:gravity: *** TODO Update player and camera positions each frame. :physics: ** Scene Loading *** TODO Make a function to load a scene from a tilemap name + prefab list. :scene_management: *** TODO Add a per-entity :init function for initialization. :entities: * Milestone 4: Collisions, Prefabs & Simple Enemies ** Collision *** TODO AABB overlap function. :physics:collision: *** TODO Detect collisions between player and solid tiles. :physics:tilemap: ** Prefabs *** TODO Write a basic “prefab file” returning plist definitions. :prefabs: *** TODO Implement `instantiate-prefab` to produce entities. :prefabs: ** AI Basics *** TODO Add simple FSM fields (:state, :next-state) to an enemy entity. :ai: *** TODO Implement “idle → patrol” logic in enemy update. :ai: * Milestone 5: Animated Tiles, Entity Collisions & More Player Feel ** Graphics Polish *** TODO Add tile animation metadata to tileset. :graphics:animation: *** TODO Draw correct animation frame based on time. :graphics:animation: ** Entity × Entity Collision *** TODO Detect overlaps between dynamic entities. :physics:collision: *** TODO Push colliding entities apart by simple resolution. :physics:collision: ** Player Polish *** TODO Add :speed and :jump-strength fields to player plist. :entities: *** TODO Make movement feel nicer by tweaking acceleration/velocity. :physics: * Milestone 6: Audio, UI & Better Enemy Logic ** Audio *** TODO Bind essential SDL2_mixer functions via FFI. :audio: *** TODO Initialize mixer and load sound resources. :audio: *** TODO Implement `(play-sound 'jump)` API. :audio: ** UI *** TODO Integrate SDL2_ttf and render debug text. :ui: *** TODO Draw player position as on-screen text. :ui: ** Enemy Expansion *** TODO Implement “patrol direction switch” when hitting tile edges. :ai: *** TODO Let enemy react to player proximity (simple check). :ai: * Milestone 7: Pathfinding, Better Scenes, More Polish ** Pathfinding *** TODO Implement A* node structure and open/closed sets. :ai:pathfinding: *** TODO Implement basic A* grid search. :ai:pathfinding: ** Rendering Polish *** TODO Add optional parallax background layer. :graphics: *** TODO Add simple camera smoothing (lerp toward player). :graphics:camera: ** Scene & Data-Driven Logic *** TODO Add hot-reloading of prefab files. :engine:data: *** TODO Add level transitions (change scenes). :scene_management: