Emergent banner

Emergent

6 devlogs
33h 38m 26s

Emergent is a JS/TS simulation engine focused on emergent systems and agent-based modeling.

It uses object-oriented design to separate simulation logic, world rules, agents and rendering.

The engine runs a real-time simulation loop and rende…

Emergent is a JS/TS simulation engine focused on emergent systems and agent-based modeling.

It uses object-oriented design to separate simulation logic, world rules, agents and rendering.

The engine runs a real-time simulation loop and renders entities using HTML5 Canvas, allowing different scenarios and behaviors to be built on top of a reusable core.

This project uses AI

I used GitHub Copilot and ChatGPT during the development of this project. These tools assisted me in implementing and refactoring code, as well as occasionally helping to reason about and correct the logical and mathematical aspects of the simulation scenarios.

All design decisions, integration, and final implementations were done by me.

Demo Repository

Loading README...

Eduardo Bruggmann

Shipped this project!

Hours: 33.61
Cookies: 🍪 980
Multiplier: 29.17 cookies/hr

This project taught me how to design and evolve agent-based simulations with a strong focus on separation of concerns and extensibility. Throughout development, I gained a deeper understanding of how simple local rules can produce complex global behavior, and how to structure simulation engines to remain maintainable as complexity grows.

I learned to refactor shared logic across multiple scenarios, design a generic statistics system, and build meaningful visualizations that reflect simulation state without coupling rendering to core logic.

Overall, this project significantly improved my skills in TypeScript OOP, simulation design, and architectural thinking for interactive systems.

Eduardo Bruggmann

Implemented a pie chart visualization to represent simulation state distribution in a clearer and more intuitive way. This involved mapping live simulation data into aggregated values suitable for categorical visualization across different scenarios.

In parallel, refactored the statistics system to better support multiple data shapes, separating time-series metrics from aggregate data used by charts. This improved the flexibility of the stats layer and ensured the data passed to each visualization matches its intended semantic meaning.

These changes make the visualization system more robust and allow new chart types to be added without modifying core simulation logic.

0
Eduardo Bruggmann

Added a statistics system to track and visualize simulation data in real time, including a simplified initial chart view.

Alongside this, performed a major refactor across the simulation architecture to unify agent behaviors, rules, and termination conditions between scenarios. This significantly reduced duplication, improved consistency, and made it easier to extend existing and future simulations.

The refactor focused on clarifying responsibilities between the engine, scenarios, and UI layers, resulting in a more maintainable and scalable codebase.

Attachment
0
Eduardo Bruggmann

Implemented two new simulation scenarios: Diffusion-Limited Aggregation (DLA) and Forest Fire.
Both were added with a focus on modularity and ease of extension within the existing agent-based architecture.

Also added an initial README to document the project’s purpose, core concepts, and current features.

0
Eduardo Bruggmann

Refactored the core simulation logic and overall architecture to better separate engine, scenarios and UI.

Implemented the first functional scenario (predator-prey) using agent-based modeling and global rules.

Added a minimal visual interface to control and observe the simulation during testing.

0
Eduardo Bruggmann

Built the core architecture of the simulation engine using object-oriented JavaScript.

Implemented the main simulation loop, world management, entities and agents with independent behavior.

Added a basic HTML5 Canvas renderer to visualize entities in real time and validate the engine loop.

Next steps are adding simulation controls (start, pause, reset) and implementing the first real scenario (predator-prey).

0