[Unity] PixelDot2D Core Framework
PixelDot2D Core Framework – No-Magic 2D Foundation
- This framework’s core focus is a project-wide abstract pattern that governs everything from UI menus and enemies to players and bullets; it enforces a one state at a time lifecycle, ensuring your game logic is deterministic.
- A low-level, performance-first 2D framework for Unity that gives you explicit control over states, saves, input, animation, and Object pooling without black box editor magic, and where each system stands on its own. The Character Controller showcases how multiple modules can plug together (and requires them to function), but nothing else is required for the rest of the framework to function.
- Focused on explicit execution, minimal overhead, and predictable behavior, each module (input, save, animation, etc.) is independently usable, so you only take what you need, without tight coupling or hidden dependencies. Every core class includes Embedded Design Rationale, documenting the technical trade-offs, like CRTP-based type safety and FIFO buffered pooling to ensure your team understands the design philosophy that governs the framework.
Performance-first, modular architecture
Stop fighting Unity’s hidden lifecycle and heavy abstractions. This framework centers on explicit execution order and clear data ownership, favoring code first patterns that are easy to profile, test, and reason about.
- Every system is written to operate independently; if you never plug in the save or animation systems, nothing else breaks.
- Prioritizes speed, memory efficiency, and modularity over inspector heavy workflows, making it easy to adopt one piece at a time.
- No magic, no tricks; you decide when and how systems update.
Zero-if/else Character Controller
The Character Controller uses a decoupled state architecture instead of sprawling if/else or switch blocks, tackling one of the hardest problems in game dev: a controller that feels good while staying maintainable and easy to expand.
- FixedUpdate synchronization and a robust state-queuing system reduce race conditions and frame-perfect state bugs.
- States are isolated, so you can extend movement, combat, or interaction without modifying a giant conditional tree.
- Built in Priority System for Movement, Combat, and CC, along with built-in support for unlocking states to fit Metroidvania style games
Independent, high-performance save system
The save system uses an optimized Binary Reader/Writer to stay fast and compact, but it is fully optional. If you never hook it up, the rest of the framework continues to run normally.
- Data persistence is driven by an interface; remove or omit the interface and the related save/load methods are never called.
- Built-in backups and versioning (Major/Load/Minor) are available when you opt in, helping keep player saves compatible as your game evolves.
ScriptableObject animation, no Animator
The 2D animation system is ScriptableObject driven and lightweight, with an explicit Update loop you control. It does not depend on the save system or input wrapper and can be used in isolation.
- Provides granular queries like IsDone, CurrentSequence, and CurrentFrame for frame-accurate gameplay logic.
- Ideal for complex 2D action games where hitboxes, cancels, and interrupts depend on exact frame data, whether or not you use the rest of the framework.
Advanced input wrapper
The input layer wraps Unity’s New Input System with a game focused API. You can wire it into the Character Controller, use it standalone, or ignore it entirely.
- Includes a unified API for Mouse, Keyboard, and Gamepad, treating Mouse buttons as rebindable keys for a consistent, single-dictionary architecture, while open to be expanded on easily.
- Supports seamless hot-swapping and simultaneous multi-device input, grabbing the first valid input to avoid duplicate checks.
- Rebinding logic is self-contained: if you pair it with the save system, rebinding data can be persisted; if you do not, save/load methods can remain blank or be removed by dropping the interface.
Explicit execution, no hidden magic
No hidden Awake chains, no surprise initialization, no forced singletons. You control when systems start, stop, and update, and you decide which modules participate in your game loop.
- Lifecycle and update flow are explicit, making behavior predictable and easier to debug, even when only one module is in use.
- The framework is designed to let you gradually adopt systems, starting with the Character Controller, or starting anywhere else, without ever being all or nothing.
- Singletons as Passive Services: While the framework never forces a singleton on you, it utilizes them as Service Locators for global utilities (like the Object Pool). These systems are "blind" to the outside world, they do not run internal logic or background updates. They exist solely as explicit, decoupled gateways that only execute when you call them, keeping your API flat and your dependencies clean.
Who this is for
This is a Mid to Senior toolkit for developers who want explicit, code driven control and clean separation between systems. It is designed to show both how each module can stand alone and how they can interlock cleanly through the Character Controller.
- Best suited for developers comfortable with interfaces, C# generics, C# inheritance, and manual update-loop management.
- Not a plug-and-play, inspector only solution; it is a foundation for a fast, modular, and maintainable codebase.
NOT drag-and-drop or inspector only. No automatic setup. Not beginner friendly.
Extras
This framework is a 2D-First, Dimension-Agnostic Architecture. While some modules(Animation player 2D) care about dimensions, my core project wide pattern and other modules do not care if they are used in 2D or 3D. This also includes additional tools and utility helpers, such as a generic enum-to-data mapper for stats, animation clips, and much more. It works with both Unity objects and plain C# types, with editor tooling for safe resizing, data preservation when expanding, and convenience extension methods (for example, quickly building LayerMasks from editor layer enums) to reduce boilerplate and keep code readable.
Dual-Package Access
Your purchase includes two distinct versions of the framework to suit your needs:
- The Architect's Version: Features full Embedded Design Rationale (EDR) that walks through the code, explaining the specific why behind critical architectural decisions.
- The Production Version: A clean, lightweight version with comments kept strictly to functional necessity, perfect for importing directly into your project once you’ve learned the systems.
ZERO EXTERNAL DEPENDENCIES
This is a lightweight, pure C# foundation. Beyond Unity's New Input System, there are no forced packages, UI frameworks, or text-rendering requirements. It is built to be evergreen; updates won't trigger broken dependencies or legacy warnings.
NOT INCLUDED (TECH DEMO ONLY)
The Space Shooter: This video is a logic-only showcase to prove the framework is genre-agnostic. The shooter art and specific genre-specific logic are not included in this package.
WHAT YOU SEE IS WHAT YOU GET (Video with Gizmos enabled):
You are receiving the core architectural DNA used to build such systems, but not the specific 'Space Shooter' implementation files.
Visuals feature 100% Programmer Art. Everything is built using native Unity/C# logic, no hidden plugins or proprietary black boxes required.
Note: Commercial License included
Refund Policy:
Due to the digital nature of this architectural framework and the inclusion of full source code and Embedded Design Rationale (EDR), all sales are final. We encourage you to review the Technical Case Study video to ensure the framework aligns with your workflow before purchasing
Unity: PixelDot2D Core Framework – No Magic 2D Foundation