A little over a year and a half ago, I started work on a project that I thought would be relatively trivial: build a plugin for Unity that will help people develop games for old systems. Where this endeavor took me was surprising, as it turned into a full suite of tools that would allow someone to take an idea, prototype it, simulate it with the restrictions of the actual hardware, and then export functional assembly language for the Sega Master System, NES, Genesis, SNES, or PC-Engine. Introducing…HUSSAR!
- Holistic – Encompasses all of the components of the target hardware, from video display to sound chip to memory restrictions.
- Unified – All management is handled within the friendly WYSIWYG interface of Unity with consistent metaphors, not spread over a bunch of special little tools.
- Simulator – Simulate–not emulate!–the restrictions, quirks, and functionality of the hardware to allow the user to test and prove out their work out before moving forward.
- Some – It’s not going to do everything for you…
- Assembly – While it will export assemble-able source, the user still needs to provide their own optimized routines. This means the format needs to be flexible and amenable to their needs.
- Required – Well, yeah.
The goals of the product are as follows:
- Works in “vanilla” Unity, without any required plugins such as 2D Toolkit or the like.
- Press “Play” to simulate it in the editor. You can even share your game as a PC/Mac/Web executable!
- Prototype in C# to find the fun early instead of banging your head against the wall in 6502 assembly.
- Simple to use and understand, sharing the metaphors and user interface that Unity already affords.
- Use familiar tools for best results. You know what’s a good pixel editor? Photoshop or Paint Shop Pro. You know what isn’t? Some crude tool I tried to stuff into Unity.
- Offers hooks for users to customize the routines and output to their needs. Want to customize your output for WLA-DX instead of TASM? The data structures are there for you and the system is built for your plugin!
- Extensible for future platforms (I’m looking at you, Neo Geo!).
Already the work has led me into some interesting and unexpected areas, and I’ll be using this space to go in-depth on them. Not only have I become more fluent with the editor side of Unity, but I’ve had to delve into areas of computer science that I had never touched before: I’ll talk about how the “flag problem” led me into graph theory, or how user-defined rules turned into optimized bin packing and hill climbing.
I’m hoping that I can use this blog as a method to push forward with the toolset, and I hope to be able to engage in meaningful dialogue with the retro homebrew community!