Programming, Work

State of things

For the last few weeks I have altered my schedule so that I can wake up around 6 am and grab a couple of more hours in the morning on my project.

Getting used to waking up so early was easier than I thought, it just has to go in hand with going to bed early as well. I am very rarely awake these days after 10 pm and I quite like it. My alarm almost does not get a chance to ring its annoying tone to justify its existence it seems.

To be honest, at most I can get about 90 minutes of work in the morning before we all need to get ready and head out for our daily responsibilities. It varies in productivity, but it is worth doing for the sake of maintaining and exercising discipline.

The last 7 days or so, I have been working down my task list but the tasks have been reordered a little so that I could kill the last pink elephant in the room, so to speak. The last pink elephant was the dynamic merging of convex polygons while you are placing the 3d tiles. I did do some cleanup for memories sake as well and I refactored the way the shapes are handled to save even more memory, both on disk and during runtime.

I split up the responsibilities of objects, so that you have a source object that is the fat data piece holding all needed components. A static version of that has been partially baked so that it can be more easily welded and used with a lot less memory to deal with, and finally the instanced item that hold indices into the geometry pool about where its data begins and ends.

Every tile placed into the world is a shape that holds information about which item it is an instance of and where the vertex data is to be found within the rendered mesh.

The fat dynamic object are all part of libraries that can be grown and will always be fetched of disk. Only the neighbouring static object will be cached for quick reference, but they as well are also just waiting on disk to be read when needed.

As for all the persistence of this data, I am using Flat Buffers which are quite awesome, but my hierarchy is also created in a way which makes it very flat and very easy to read and write. There are no reference hierarchies. There are indices, lists and structures. I can save the whole hierarchy of data as a single blob and read it in as a single blob, cast it to the base structure and almost have everything running. Even if I had my references and object hierarchies, the Flat Buffers would help me as well.

But, since I need to re apply all the geometry to the Unity Game Objects, I will have to settle for an extra step to have everything visible as well.

I am going to wake up early in the morning and scurry along as usual.

Make a nice small trophy wall mount of my imaginary pink elephant.

Tata.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s