Tuesday, April 23, 2013

StarWright - Better Art

I've been working for a while to revamp most of the ship art in StarWright. While I'm certainly no great artist, or even a good one, this new art is definitely much better than before, primarily because it gives the sense that you're looking into a cross-section of a ship as the people run around inside. This was a feeling that was missing from the old art, and the game is much better for having that feeling.

A key part of the new art is having clearly visible walls that separate the various rooms. There are no doors yet, but when crew walk from room to room they walk underneath the walls, which gives a much better sense that they're inside the ship.

The new art is not just aesthetic, though. It serves some practical purposes too. The lighting color lets you know at-a-glance what kinds of systems you're looking at, even when zoomed out (red for weapons, orange for thrusters, tan for hallways and crew). The presence or not of colored lighting also indicates whether that room is operational (a dark gray cannon tells you that it doesn't have any crew operating it). And the number of ammo bullets loaded into a cannon tells you how many bullets that cannon needs to fire.

Thursday, April 18, 2013

Garbage Collection

Programmers who are opposed to garbage collection because manual memory management is easy completely miss the point of GC.

Regardless of whether manual memory management is easy (if you're experienced then it's mostly routine), the greatest strength of GC is not that it makes memory management a bit easier (true in most cases, but non-deterministic deallocation can occasionally complicate things), or even that it's safer and more secure (almost always true), but that it eliminates the need to track which object is responsible for deallocating another object, thus greatly simplifying program structure, increasing brevity of code, and enabling a handful of language features like closures, asynchronous methods, LINQ (C#), etc... that would be much more awkward if not impossible to use.

In short, GC enables programming languages to be more expressive and concise, and the code written in them to be cleaner and simpler, thus greatly improving flexibility, understandability, and maintainability of code. Whether that's worth the tradeoff of reduced performance and occasional added complexity is a matter of application domain and personal preference.