I've already explained my reasons to participate in this event, and one of them was merely to test Unity and see how it could affect my production workflow.
Following the competition, I made the decision to use Unity for my ongoing projects, and scrap all ongoing Dartlang development.
Today, I've taken a few hours to mess around with the original ship assets in Unity, and see how much I could get done.
Movement
Unity is a powerful tool indeed, especially when it comes to built-in physics. By leveraging Rigidbody2D, I was able to quickly put together a script that would process input and apply force and torque to my object. The result is a fully maneuverable ship within the environment.
I spent a lot of time testing and tweaking acceleration and rotation speeds / drags coefficients to get good results.
Total Time: 20 - 25 minutes
Original Dart Time: > 10 hours
Collision
I wanted to test collisions, but didn't come up with anything meaningful to trigger upon colliding so I went ahead with a rather vanilla approach, just to see how complex it would be. I now understand that having a single collision box won't be sufficient and that I'll probably need to have several child objects with their own collision boxes to represent all of the ship's systems, but for now, this did just fine.
I added collision polygons on both the player-controlled ship and a random npc and tested the outcome, refitting it as needed to match the sprite as much as possible.
Total Time: 15 - 20 minutes
Original Dart Time: > 10 hours
Tracking Camera
The camera was something that had been quite a pain in Dart, and it was still under severe development. Because I was dealing with different play modes, I had to adapt my camera to a number of different behaviors. In Unity, I wanted to test one first which was the tracking camera: a fairly simple camera that would always have the same coordinates as the player ship and no form of delays, etc.
Total Time: 10 minutes
Original Dart Time: > 5 hours (incomplete)
Parallaxing
During "The Week of Awesome II". I came up with a quick script to do some parallaxing which I've decided to reuse in order to make space prettier. My intent was to have placeholder stars/asteroids move on two separate layers at different speed and add some kind of a nebula and even a nearby star. Ideally, I wanted everything to move at their own pace so that it would give an illusion of depth.
As it turns out, most of my original script worked flawlessly. I cleaned it up a bit and made some quick custom (placeholder) assets to this this out and fixed a few quirks.
It is interesting to note that I was also able to apply a foreground using the same logic. I'm not too sure how I feel about having a foreground that actually moves slower, but I think it looks pretty. Obviously, that shouldn't have been my priority for now: I was merely giving myself candy for getting development started again!
Total Time: 1 hour (including assets)
Original Dart Time: N/A (Static Background)
All in all, a fairly productive evening given I didn't set out to do anything specific. My original intent was to start with UI as soon as I was proficient with how Unity handles UI, but given that this is not yet the case, and that I've had people over for the majority of the evening, some doodling with the engine felt like it was still a decent step forwards. All of this will be scrapped very quickly, though the scripts themselves will be kept for future reference.
If you wish, you can see the parallaxing effect in action in the video below (please don't mind the placeholder art!).
Awesome time savings.