Viron is a flexible simulation framework for building and managing 2D virtual environments. It provides tools to create, traverse, and manipulate grid-based spaces where entities can exist, move, and interact. Viron is designed to be used as a core simulation engine for games, AI training environments, educational apps, and more.
Viron is built to be a lightweight, adaptable core for managing 2D environments. Its focus is on:
- Simplicity – Easy to understand and integrate
- Modularity – Keeps simulation logic separate from game or application logic
- Flexibility – Supports many types of simulations, from games to research
- Structure – Uses grid-based environments for predictable spatial modeling
- Reusability – Designed to be a foundation for many different projects
- Modular Architecture – Easy to plug into Java and Python projects
- 2D Spatial Modeling – Manage environments, grid layouts, and entity positioning
- Entity Movement – Track movement across grid cells and between environments
- Simulation Agnostic – Suitable for ecological sims, city builders, idle games, and more
- Multi-language Support – Java and Python implementations with a shared design
Simulates food chain dynamics in a virtual world. Entities such as foxes, rabbits, and grass interact in Viron-managed environments.
Evolves creatures over time in changing biomes, using Viron to track grid-based locations and terrain types.
Interactive classroom tools where students can simulate ecological systems or environmental changes.
Use Viron to define spatial challenges or resource collection problems in reinforcement learning projects.
Use Viron to model a 3×3 environment where each player places an "X" or "O" on the grid. Track turns, detect win conditions, and enforce valid moves.
Represent the 8×8 board as a Viron environment. Each piece is an entity with movement logic handled externally. Viron tracks positions, captures, and board state.
Use a grid-based environment to model diagonal movement and jumping. Viron can track entity state changes (like promotion) and valid move paths.
Model the paddle, ball, and blocks within a 2D grid. Viron tracks positions, collisions, and block removal as entities are hit.
Represent the playing field, paddles, and ball in a 2D space. Viron manages movement updates, collisions, and scorekeeping.
Use Viron to track the snake's body segments and apple placement. Manage movement direction, growth, and self-collision logic.
Simulate a battlefield grid with units as entities. Viron manages movement, attack range visibility, and terrain occupancy.
Each cell is alive or dead and changes state based on neighbors. Viron can model the entire board and apply the update rules in steps.
Use Viron to define a navigable grid with start and goal positions. Track algorithm progress (A*, Dijkstra, etc.) in real time through environment updates.
Simulate a city with roads, zones, and agents (e.g., people, vehicles). Viron provides structure for tracking locations and interactions between entities.
<dependency>
<groupId>com.preponderous</groupId>
<artifactId>viron</artifactId>
<version>1.0.0</version>
</dependency>
Coming soon as a PyPI package.
Initialize a 10×10 environment and add an entity:
Environment env = new Environment("Forest", 10, 10);
Entity fox = new Entity("Fox");
env.placeEntityAt(fox, new Coordinate(5, 5));
Move the entity:
env.moveEntity(fox, Direction.NORTH);
Java:
mvn test
Python:
pytest
To start the application, run the following command:
docker compose up --build -d
The application will be available at http://localhost:8080
.
To stop the application, run the following command:
docker compose down
MIT License
© 2022–2025 Daniel McCoy Stephenson
See the LICENSE file for details.
This project is developed and maintained by Preponderous.
For questions or contributions, visit:
https://github.com/Preponderous-Software/Viron