Posts Tagged: design patterns

In the previous post I have set up a raw architecture for the game. There is a Game class that has a function called execute, which allows basic stuff to happen: – responding to events – updating state – and rendering state In code it is: [sourcecode language=”cpp”] while (running) { handleEvents(); update(); render(); } [/sourcecode] The end result of the first phase was, well, a black window. Nothing to be excited about just yet… One of the very basic needs is drawing on the screen. One way to get something on the screen is… Read Article →

In my previous post I have described a way to compile your project with a Maven style like project structure. Using that as basis I am busy rewriting my project Dune II – The Maker. This time I am using SDL. Because I have started over I thought of writing blog posts about my progress. Blog posts will be about progress made, decisions taken, etc. This is by no means a real tutorial sequence, but you could follow the blog posts probably and make something out of it. Do note: In reality I am much… Read Article →

As I have promised in my previous post, I would post an example of small refactorings in order to greatly improve the readability and understandability of code. I own a little project called Dune II – The Maker, and I started writing it a little over 10 years ago. In those years I have learned a lot. I did not have much time in those days to apply my new knowledge to the project. You could say the software was rotting. In order to make it better I need to refactor a lot and I… Read Article →

More and more I am being intrigued by the power of a small code refactorings. The positive impact it has on the readability, the maintainability and understandability of your code is great. It keeps code clean(er) and since the changes you make are really small (I’ll demonstrate how small), the chance they will break things is small. Of course, with unit tests (you are writing them right?) making sure you did not break anything: a small refactoring is a low-risk high-benefit practice. In my experience, small refactorings are undervalued. In fact, I undervalued them much myself since… Read Article →

Scroll To Top