Archive > Cerolas > Blog > The reward of good design. [Report]
Cerolas

The reward of good design.

Posted by Cerolas 16 years ago

 

Simply put, Designing things can be boring ... there is an urge to implement, experiment, 'cowboy code' ... I've started this project as an experiment to hopefully teach myself to resist these urges in order to produce solid coding practice, and a better product as a result.

Before you get to designing the 'fun stuff' you have to focus on the mundane ... in this case, the UI, what the player really interacts with ... and that's what I'm slogging through now. I've gotten a better picture for my abstraction, adhering to the practice of only referring to interfaces that expose only that which I want the program to directly influence, avoiding direct calls to the rendering code, and generalizing such interfaces and the information passed through them so as to avoid conflicts with future visual implementations. All a game logic needs to know about what it shows on screen is, say a IMapSprite ... regardless if such object contains a text character, or a bitmapped sprite, that is the responsibility of the coder writing the UI, not the responsibility of the coder writing the game logic, if the two be separate.

Such work can be monotonous, with little hints of excitement as I get more and more of it working, seeing how I can apply what I have working now to the finished product. It is not without reward, as seeing each peice of the puzzle working properly with each unit test I perform.

Unit testing ... ahh, my study in the subject of Good Coding Practice, and the related concepts of Software Engineering, emphasize testing, and even this early in the project, I can see the fruits of such effort. In ordering my focus so that I can use each part to test the next, I'm getting that constant feedback I crave, minimizing the ainxiety as to whether or not something written early on will end up being a millstone as fuller implementations of the project surface. Such concerns are not completely obviated, as a design oversight may introduce a phantom bug, or worse, a genuine design flaw that may require significant re-factoring. But such is the experience of any developer, I would imagine, no matter how effective their practices may be.

I'm putting a hold on my explanation of the game logic, as such concepts are still ... fluid ... I'm thinking of better implementations constantly, and the definitions are changing. I just wanted to air out the basic ideas, and I'll add to them when I think they're ... good enough to be set in text, concrete, available for reference, either in my own private documentation or here. I also wanted to open the table to discussion on mechanics early, so that I might reap the benefits of anyone who has an interest in defining a game rule set and would wish to contribute. That said, I'm better off focusing on my UI, and program state management engine for the time being, so I have something to test these concepts as I develop them, but sometimes such ideas for the actual game logic cannot be denied, as they are the meat of the project, to be savored, juicy.

I'm going to lay out one more post on the subject, and then turn my focus back to the task at hand, in order to get closer to actually realizing these things.
Comment on The reward of good design.

0 / 8,096

Comments
Bitter

Posted by Bitter 16 years ago Report

This is like some bizarre window into my future... @_@

[ Reply ]

Cerolas

Posted by Cerolas 16 years ago Report

These rambling monologues are my way of trying to avoid bogging down, trying to stay motivated. I genuinely enjoy discussing this stuff, if nothing else but to myself. It's not enough to say 'thanks for your interest' so much as to note that such interest, as shallow as this might sound, actually helps me feel more oomph to keep at the slow crap.

[ Reply ]