So in the past few days I've been working at getting backend variables working nicely with the compiler. The gist of how it works is that if it detects a backend variable (variables prefixed with a $ sign) in a loop/if/whatever else, then it switches how the code is compiled. Basically the HTML output will wrap child nodes between <?php if (isset($myvar) && $myvar) { ?> and <?php } ?>.
You can also pass-in backend variables to components and get them to modify the attributes of that component and that components sub-components, which I thought was really cool.
This coming week will most likely be just me fixing a few issues with how backend variables are handled. Next, I'll be looking into allowing component names to be referenced in 'style' blocks.
Today I worked on AI. It can now win with the population victory. Also fixed one or two bugs. Tomorrow I'm planning to "teach" computer what researches to finish so it can win with the research victory, too. Other improvements in the current AI also need to be done, but those are not that important, so they can wait. :)
If you would like to support Crystal Kingdom, please consider liking its facebook page and following it on twitter.
Yesterday's update can be found here.
In a case of any questions or suggestions, don't hesitate to contact me here or on twitter. ;)
Cleaned up things some more. Removed utility functions that the library function basically did the same thing.Overall, the code is shaping up to be in fairly good shape to submit. I'll likely spend a bit more time on it before submitting, but I don't think I'll be able to get to the more cowbell piece that's not judged anyways.