Post news RSS Code Quality

Hey all, I haven't tackled one major issue with my code yet. And that's maintainability. I have to make my code more maintainable for when I continue with programming the game.

Posted by on

Hey all,

I haven't tackled one major issue with my code yet. And that's maintainability. I have to make my code more maintainable for when I continue with programming the game.

For that reason, I implemented some object-oriƫnted design. I made a sprite superclass (which is abstract), and derive all the game objects which use a sprite from it. Then I made classes for nebulae, ships, stations and asteroids. These will be used for all the game's logic of the objects.

I didn't have to change alot in the code, I could just keep using it normally as I did before. I moved several things into the right classes, and split updating the rendering and the game's objects up.

With these changes, the code has become alot more maintainable and expandable. I will soon try to get movement of objects going. This was it for this time!

Cheers,
Roberto

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.