I’ve been working on getting our new RPG engine up and running on Unity for Cosmic Star Heroine and thought some of you might be interested in hearing how that’s going.
Soon after we made the decision to switch to Unity, we decided that if we were going to go to the trouble to port our engine, we were going to do it right. We weren’t going to try to force Unity to emulate our old engine; rather we’d be rebuilding it from the ground up to take full advantage of Unity. That’s not to say that we won’t be reusing any code – for example, a lot of our internal RPG logic can probably be reused without too many changes – but we’re mostly starting from scratch here.
Unity requires a drastically different mindset than XNA did. XNA was a pure coding environment – you pull it up and then start typing code for everything. Unity, on the other hand, is more of a graphical interface. You can build levels in Unity, place things in those levels, and then attach code to individual objects to make them do things. At first it was really difficult to come to grips with since it was just so different than what I was used to (like being fluent in Chinese and then suddenly having to learn Spanish) but I’m starting to feel comfortable with the Unity way of doing things and see how it has advantages in some aspects.
Most of the past month has been spent just learning how to use Unity but I’m rapidly leaving the “Learning” phase and entering the “Make stuff for the engine” phase. Right now, our engine has the following “amazing” features:
Alyssa can walk around one of our Precipice 4 maps.
Alyssa switches between her various walk animations & standing frames as appropriate.
Alyssa does not walk through walls.
Alyssa can walk diagonally (not in our previous games).
Alyssa’s movement is pixel-based, not tile-based (not in our previous games).
If Alyssa is walking diagonally and hits a wall, she’ll slide along the wall instead of coming to a complete stop.
You can control Alyssa with the keyboard or a controller.
The map has the appropriate layers (like foreground & shadows) and animation.
The map can have music.
The camera follows Alyssa as she walks around the map.
The camera stops following as necessary to prevent displaying anything past the boundary of the map.
Pressing a button makes a text box appear.
The text box has a very fast coming-onto-screen transitional animation (not in our previous games).
The text is animated writing onto the box instead of just appearing (not in our previous games).
The game’s native resolution is 480 x 270 (for easy scaling to 1080p) as opposed to 427 x 240 (our old resolution).
It’s still a long ways from being a fully functional RPG, but progress is definitely speeding up quickly with many of those features being added just recently. By the end of the second month, I daresay we’ll have a mostly working RPG engine. 🙂