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. 🙂

9 Responses

  1. I’m very interested in how you (a professional) are handling a 2D RPG in Unity. I’m super interested in doing a 2D RPG in Unity myself, but I’m overwhelmed by the methods I can make that happen. I’m very impressed with Shadowrun Returns, especially the Toolkit, and I look forward to seeing what people can do with the Unity engine as far as less action oriented games are concerned.

  2. To answer everyone’s questions…

    We’ll probably add sliding around corners but right now, it just has sliding if you hit walls while going diagonally.
    We’re not using tiles to render our maps (and haven’t for some time).
    We are planning on releasing Cosmic Star Heroine on other platforms besides Windows. What those platforms are going to be is still up in the air.
    I’ve been using 2D Toolkit with Unity & I like it so far. Makes animation & positioning stuff much easier (since you can make the position system be based on pixels with ease).

  3. “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.”

    how much of that is your/unity code vs 2d toolkit? been looking at 2d toolkit vs the free Orthello 2D framework

  4. If you’re using Unity, do that mean you’re going to publish your game on others platforms than Windows ? I would love to play CSH on Linux.

  5. Are you adding in sliding around corners? Say you’re walking horizontally and collide with a bounding box but just by a pixel or two, will she slide towards the edge or come to complete stop? If you are I’m curious how you decided to solve… I know Suikoden was particularly bad at getting snagged in every little corner hahaha!

  6. Unity’s so popular and so at least it shouldn’t be going away anytime soon. Hopefully the next time you learn how to code for a different engine, it’s by choice.

  7. Having worked a little with Unity before, I can tell you that you are making the right decision. It’s not a purist’s system for hardline coders, but it makes game development accessible to hobbyists, dreamers, and dedicated indies alike. I am so looking forward to seeing what you do with it.

Comments are closed.