Tuesday, 12 March 2013

Tuesday Type Work

Early Start

Managed to start early on Reloaded today, just 11PM which is a whole entire hour before midnight. Don't ask me what kept me busy from 4PM to 11PM, all I know is I did lots of builds, lots of uploading and lots of email answering. Anyhoo, onto the Reloaded fun!

As you can see, I have already started splitting the source code into three smaller files. The first is the header file where I will put in notes and really powerful global settings to define what variant of the software is being compiled.  The second is where I am storing all my user type declarations, of which there now 1670 lines of them. The last one is the main bulk of the program, which during this development will be further divided.

The good news for those who are pledging funds into the Reloaded project, once I start spitting out the smaller prototypes, I will make them available so you can get an early taste of the final product. I think the terrain and new physics prototypes will be well worth waiting for.

Type Work

I left the code yesterday with a bug in it. My code had all the types in one place, but one type refused to compile with some ambiguous error. I tried to trace with no joy so called it a night.

This evening my mission was to copy over the DBPro compiler to the new machine and trace the code to find out the specific reason. It turns out I had a type declared that tried to use a type further down which DBP does not allow. I moved the type above the primary type and presto, success.

For Dark Basic Pro Fans

I also had a brief look at the current state of DBP, the code base and the forums in general. Great to see everyone in the DBP community helping each other and still asking tough questions. Now I am back in DBP land, I have started the process of moving my files over to the new machine and also bringing the projects up to VS2010. I could go all the way to VS2012 but I am not ready to help Microsoft test their new product just yet, I think I will use the latest service pack version of VS2010 which is nice and mature.

I posted in the DBP forum which I have probably not done for the best part of half a year, and removed the AGK post from the main DBP page as it did not seem appropriate.  Initially I thought DBP fans would move swiftly to AGK but I have since appreciated that this will only ever happen if AGK had every command and every feature DBP presently has on Windows.  The migration cost is too high right now, so I am going to do a little house cleaning on the DBP side of things and solve some issues as I write Reloaded, including the new tricky issues of Windows 7 and Windows 8 compatibility.  Seems the powers that be have re-written the OS for forbid many things DBP wants to do, and given the OS won't budge, I'll have to contort our beloved language to suit.

5:27AM : The First New Types Are Born

Got lots of good code done. I had a choice to do code to get results quickly, or do code to get source looking professional and written well. I decided the latter. I have set up a way of working which creates new types in the types file, prototypes expose engine globals and arrays at the top of the proto and then new data types needed by the proto, which are then promoted to the main app at some point when the feature is nearly done.  This way I can really control the data strictly, know where it is at any time and see the dependencies quickly.  It also means my compile time on the prototypes is mere seconds instead of 3 minutes.  See a shot of the first two types to come out of this process.  These are the essential variables needed to be added to the engine to make my real time light mapping possible:

The cool thing is the last type is actually a place holder for ALL single variables used by the proto. That means there are no globals used by this feature outside of this type meaning there is no possibility of variable typos and I know exactly where to go to add or delete them.

Signing Off

It's been a long one, but a good one all round.  My head is spinning a little so I will end this sign off quickly so I can give my eye balls a rest.

No comments:

Post a Comment