🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Insights of old code.

Published February 06, 2008
Advertisement
I have my evenings to myself for the rest of the week and a mostly empty weekend. I'm very near the end of the shoot yourself in the head game and I have a large bag of red swedish fish. Based on this, I started back into Moe with the hope of getting some headway in the nice lull time.


Working with your own code after a fairly lengthy break is always interesting. It provides a good insight into just how good/crappy you actually are. It's also amusing to re-read notes in the source or logs you leave yourself.

I unfortunately am not a good programmer. I've only been doing it for a decade, aced every course I've ever taken, and even make my living by it, but make no mistake; no good. I'm not quite sure about a bit of it.

Part is of course lacking the formal training that most good programmers have. Some have the instinctual ability to know the complexity of operations, data structures and the such. I don't particularly care. If it's associative, it gets a Dictionary/HashMap/map if not a List/List/vector. Most of my stuff tends to be slow; a bit verbose in what it does.

Part is leftover from my slow start with C++. I'm pretty comfortable with C# now, can do maintenance in Java, perl, and am still pretty good in C++ and plain C. But those are all in their nice little world (except perl of course), so some of the tricks and practices of language breadth just isn't there. I've dabbled with Scheme and know enough about them to get a good idea why Functional languages are seen as elegant. No practical experience though, and certainly nothing in anything more exotic that mainstream functional.

Part is my stubbornness. Though I'm not sure it's stubbornness... Given a problem, I can concoct a solution so there's not much drive to explore existing/better/common solutions. Decidedly the most detrimental of my flaws I think. Moe for example has 3 external libs: .NET, mdx, and fmod. Networking from scratch, ui from scratch, mapgen from scratch, input handling from scratch, logging from scratch, parsing from scratch, and on and on. It's dumb, it's inefficient, but I never seem not to do it. Every time I try to look into external libs, I never what to look for or have the patience to investigate if the lib will actually do what I want to do (let alone the patience to learn it well enough to integrate it into the code).


It's funny, because I'm a fairly excellent code monkey. Give me a problem and I'll belt something out pretty quick that is bug free, well designed, consistent, extensible. And I think this is part of my problem too. The only time I tend to 'experiment' or look into new stuff is when the current processes aren't working. Right now the toolbox is pretty effective from my perspective. Perspective being the key word. This only rather works with little stuff.

Give me big stuff/problems and it breaks down a little. Not that the big stuff doesn't get designed and implemented well. It just is super slow, and relatively unpolished compared to stuff I've seen others knock together. Most of it is 3rd party lib use, but I think there's more to it than that. So there's something there in my processes that suck compared to others' that I need to figure out or work at.


Just as soon as I get moe playable. Another one of my faults; being one of those many forum-goers who's never actually gotten a game done. Written, debugged, built, packaged, and released. I've never lost sleep over the problem. It's a hobby and a learning experience. I was amused by what I wanted, learned what I needed and moved along. Still, it is likely a symptom of other things and I could use the experience with some of the stuff late in the game. And some part of my delirium thinks that picking up a new language or project will be easier once this is off my shelf (hah!).


Oh, I diverge too much. Moe's code is actually quite good. There's a number of places that I can look back and am surprised by the elegance of bits of it. Most all of the utility classes are easily utilized. Things are consistent, mostly well named, pretty autonomous... Something I suppose to smile upon compared to the steaming piles which previously made up my 'best work'.

[edit: oh, and the game now has races for your little dudes which supply info about their birth rate and lifespan (and more to come)]
Previous Entry Penny Arcaded!
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement