Serialization, loading and saving!

This entry is part 7 of 8 in the series Artificial Galaxies

This has been fun to be sure, but what about saving our data out and loading it as well? The fancy word for this is serialization, and this is where the OOP principles can really shine! If we build into each of our classes a ‘Serialize’ and ‘DeSerialize’ feature, we …

Ships, Galaxy functions, and more!

This entry is part 5 of 8 in the series Artificial Galaxies

So this latest incarnation incorporates some cool stuff. In the Galaxy object, I’ve built functionality so you can query the Galaxy to return only stars that are owned by a particular civilization. The usage:

That will return a table with all the star objects that belong to civilization 1 …

Civilization Object and Mixing it all together

This entry is part 3 of 8 in the series Artificial Galaxies

Lastly, to complete the introduction of the process, we’ll need a Civilization object to cram our species into. We’ll keep it basic for now, with name, type of government and species type. The Civilization object will be pretty basic but we can definitely finagle some more attributes into it down the road (and boy …

Designing a Species object and a Planet object

This entry is part 2 of 8 in the series Artificial Galaxies

So, I think the best thing to do is kind start at the bottom and work our way up. At the base of all these objects we’ve talked about so far, the Species object seems to be the most manageable and smallest on the scale of things, so let’s start fleshing …

Everyday Coding #4 Habitica Create To-Do List from Corona

This entry is part 3 of 3 in the series Everyday Coding

Habitica: Creating a Todo-List programmatically: So in my super neglected ‘everyday’ series (inspired by Beeple’s everydays located here) I created a method for you to programmatically create a todo list, complete with subtasks from Corona to your Habitica account. All you’ll need is the API key and User ID key …