Old and busted:
public State FindByName(string name)
{
foreach(State thisState in this.StateList)
{
if (string.Compare(thisState.Name, name) == 0)
{
return thisState;
}
}
return null;
}
New Hotness:
public State FindByName(string name)
{
return States.Find(
state => (string.Compare(state.Name, name) == 0)
);
}
Sweet sweet syntactic sugar!
Posted in c# | No Comments »
Just now I was browsing some ancient code of mine. Part of the Cuttlefish Engine is a UI layer, and so I thought I’d dust off all the old UI code I wrote for Quaternion and modernize it. Anyone who’s written a UI framework will tell you that the hardest parts are the nuances of message processing; making sure controls and windows behave as the user expects when they click over there, drag, press ESC while dragging, etc.
I happened upon a comment:
...
// release: 1.02 on 06/24/99 by Mason (now safe for realloc)
...
Holy crap. That comment’s from exactly TEN YEARS AGO! The summer of 1999. I was… 22 (lol), working on Quaternion, a few months before I knew it was an IGF finalist. Apparently I had memory allocation issues.
The comment I found wasn’t in the UI code, but I want to believe that today ten years ago I was working on UI, browsing flipcode and sweet oblivion (aww yeah!), wondering what the GDC was like, dreaming of working in games, thinking Visual SourceSafe 6 was a pretty good tool….
Anyway, apologizes for the public introspection, but some coincidences are just too cool not to share. I also recently resurrected my gamedev.net login. Join date: 8/3/1999. At 1am. It’s now 12:40am. I guess some things will never change.
Posted in CuttlefishEngine, PointlessNostalgia | No Comments »
I’m happy to announce what I’ve been working on so intently for the last few months: The Cuttlefish Engine. It’s a cross-platform game engine and game designer (think Yoyo Game’s Gamemaker), for iPhone, G1, and Blackberry.
More info at http://www.cuttlefishengine.com.
There’s probably a few of you who have found this blog through the Cuttlefish Industries site, and you may be confused about which blog to track. If you want to follow the technical development of the engine closely, this is the blog to subscribe to. I’ll post entries here about the minor engine decisions I’m making as I go. If you just want to know when it’s ready or when it hits major milestones, I’ll post those “big announcements” on the Cuttlefish Industries blog (and here too).
Posted in CuttlefishEngine, Uncategorized | No Comments »