A high-performance 2D pixel game engine for Java
Transmute Core is a lightweight, high-performance 2D pixel game engine written in Java. It features custom pixel-level rendering with BufferedImage and DataBufferInt for maximum performance, making it ideal for retro-style games, pixel art projects, and educational purposes.
- 🎮 Fixed Timestep Game Loop - Consistent 60 FPS game logic with delta time support
- 🖼️ Custom Pixel Rendering - Direct pixel manipulation for maximum performance
- 📦 Deferred Asset Loading - Efficient resource management with batch loading
- 🎨 Built-in Animation System - Sprite sheets and frame-based animations
- 🎯 State Management - Stack-based state system for menus, gameplay, and more
- ⌨️ Input Handling - Comprehensive keyboard and mouse input with multiple states
- 🗺️ Tile-Based Levels - Load levels from PNG images with viewport culling
- 💾 Serialization - Custom binary serialization for save games and data
- 🔊 Audio Support - Built-in audio playback for sound effects and music
- 🛠️ Developer Tools - Logging system, debug utilities, and comprehensive error messages
The fastest way to get started is with the Transmute CLI:
curl -fsSL https://raw.githubusercontent.com/transmute-games/transmute-core/master/scripts/install-cli.sh | shirm https://raw.githubusercontent.com/transmute-games/transmute-core/master/scripts/install-cli.ps1 | iexDownload the latest release from GitHub Releases and follow the installation instructions.
# Create a new project
transmute new my-game
cd my-game
# Run your game
./gradlew run- Java Development Kit (JDK) 17 or higher
- Internet connection (for downloading dependencies via JitPack)
If you want to contribute to TransmuteCore development:
# Clone the repository
git clone https://github.com/transmute-games/transmute-core
cd transmute-core
# Build the entire project
./gradlew build
# Publish the engine to local Maven (for local development)
./gradlew :transmute-core:publishToMavenLocal
# Install the CLI locally
./gradlew :transmute-cli:installTo use TransmuteCore in an existing Gradle project, add to your build.gradle:
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.transmute-games.transmute-core:transmute-core:v1.0.0'
}Replace v1.0.0 with the latest release version.
import TransmuteCore.core.TransmuteCore;
import TransmuteCore.core.GameConfig;
import TransmuteCore.core.Manager;
import TransmuteCore.core.interfaces.services.IRenderer;
import TransmuteCore.graphics.Context;
import TransmuteCore.graphics.Color;
public class MyGame extends TransmuteCore {
public MyGame(GameConfig config) {
super(config);
}
@Override
public void init() {
// Initialize your game
}
@Override
public void update(Manager manager, double delta) {
// Update game logic
}
@Override
public void render(Manager manager, IRenderer renderer) {
Context ctx = (Context) renderer;
ctx.renderText("Hello, TransmuteCore!", 50, 100,
Color.toPixelInt(255, 255, 255, 255));
}
public static void main(String[] args) {
GameConfig config = new GameConfig.Builder()
.title("My Game")
.version("1.0")
.dimensions(320, GameConfig.ASPECT_RATIO_SQUARE)
.scale(3)
.build();
MyGame game = new MyGame(config);
game.start();
}
}- Getting Started Guide - Complete setup and first steps
- Hello World Tutorial - Your first Transmute Core game
Progressive, hands-on tutorials covering all engine features:
- Hello World - Basic game structure
- Sprites & Animation - Visual assets and animation
- Input & Movement - Player controls
- Collision Detection - AABB, circle, and spatial partitioning
- State Management - Menus and game states
- Audio System - Sound effects and music
- Level Design - Tile-based levels
- WARP.md - Architecture overview and core concepts
# Clone the repository
git clone https://github.com/transmute-games/transmute-core
cd transmute-core
# Build the entire project (core + CLI)
./gradlew build
# Build just the core engine
./gradlew :transmute-core:build
# Run tests
./gradlew test
# Publish to local Maven repository
./gradlew :transmute-core:publishToMavenLocal
# Generate Javadocs
./gradlew :transmute-core:javadoctransmute-core/
├── build.gradle # Root build configuration
├── settings.gradle # Multi-project configuration
├── packages/
│ ├── core/ # TransmuteCore engine
│ │ ├── TransmuteCore/
│ │ │ └── src/
│ │ │ └── TransmuteCore/
│ │ │ ├── assets/ # Asset loading and management
│ │ │ ├── core/ # Core game loop, engine, and interfaces
│ │ │ ├── data/ # Serialization and data structures
│ │ │ ├── ecs/ # Entity-Component-System and game objects
│ │ │ ├── graphics/ # Rendering and visual systems
│ │ │ ├── input/ # Keyboard and mouse handling
│ │ │ ├── level/ # Level and tile systems
│ │ │ ├── math/ # Math utilities and vector types
│ │ │ ├── state/ # State management system
│ │ │ └── util/ # Utilities, logging, debugging, exceptions
│ │ └── build.gradle
│ └── cli/ # Project generator CLI
│ ├── src/
│ ├── bin/ # Shell wrappers
│ └── build.gradle
└── docs/ # Documentation
Transmute Core uses a fixed timestep game loop:
- init() - One-time initialization
- update(Manager, delta) - Game logic updates (60 times per second)
- render(Manager, IRenderer) - Rendering to pixel buffer
The Manager provides centralized access to all engine subsystems:
Manager manager = TransmuteCore.getManager();
StateManager stateManager = manager.getStateManager();
AssetManager assetManager = manager.getAssetManager();
Input input = manager.getInput();- Context - Custom pixel buffer with direct pixel manipulation
- Hardware Acceleration - VolatileImage for GPU acceleration
- BufferStrategy - Configurable double/triple buffering
- transmute-cli - CLI tool for scaffolding new projects
- Multiple templates: basic, platformer, rpg
- Interactive project setup
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Transmute Core is designed for performance:
- Direct pixel manipulation via
DataBufferInt - Hardware-accelerated rendering with
VolatileImage - Viewport culling for large tile-based levels
- Efficient asset caching and management
- Configurable target FPS (default: 60)
On a typical modern system (2020+ hardware):
- 60 FPS stable at 1920x1080 with ~1000 sprites
- Sub-millisecond asset loading for typical game assets
- < 50ms startup time
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by classic 2D game engines
- Built for educational purposes and indie game development
- Community-driven development
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Getting Started Guide
Made with ❤️ by the Transmute Games team