Day 1: architecture and ECS

The original idea I had for 'moon' was to expand a moon colony by building bases which could be either mines, factories, residences, military compounds etc. The map would be a graph of nodes serving as potential base locations and your fringe bases would be harassed by lunar Nazis and Reptilians.

Fortunately (or unfortunately) I had to play soccer on sunday and I decided sometime during the game to go for a something simpler: controlling a spaceship in a newtonian orrery kind of system.

Day 1 was mostly about the technical details. There's precious little to show since most of it is just a placeholder where the real stuff is supposed to go. In an act of lunacy I implemented the first entity component system of my life so Im also adjusting to this new programming paradigm. So far I really like how I can factor out game aspects like physics and collisions into their own module. At the risk of speaking too early I would definitely try something like this again when I have more time to explore the possibilities.

Next up I need to process player input and add the concept of a controllable ship.

(log in to comment)

Comments

I'm a huge fan of entity component systems. I implemented one in JavaScript which I use regularly now - I find it very intuitive. I'd definitely like to implement it in python too, but JavaScript's object syntax makes it really easy to implement my concept in that language, and I still haven't figured out how it would work in python. Decorators, maybe.

If you think yours is comprehensible, I'd love to take a look at it after PyWeek.
You're welcome to take a look though its probably not the pure approach and certainly not pythonic (I have a Java background and it shows). Regardless I'm happy by how its holding up at the moment.

Ill post my code today before it turns into a big ball of mud.