Thursday, October 11, 2012

Generic Event System

Well continuing on from last post I got that resolution independent GUI layout helper function done. It took the whole day because I basically over thought the math necessary to scale elements down between a minimum and maximum. Figuring out an equation for linear interpolation of 2D elements, or scaling by the difference in area and then applying Mathf.Clamp on the results? I went with the latter, much easier to code and understand.

So onto the event system which is supposed to be my silver bullet for solving all my woes in tracking objectives and attachments progress. It's under 40 lines of code.  - Well uh maybe I learned from the GUI code kept it simple, stupid. All it is, is a glorified list with time stamps, so yes the size seems right. But like everything else all it's dirty hidden problems will only show themselves through testing and implementation. Now for the fun part of hooking it up and giving it real feeds and having objectives query it.

Also on the to do list is now loading bars/ screens, and run time asset loading. I've got loading screens working now thanks to a quick Google search and the ease of use that is sometimes Unity. Just need to work on making nice progress bars, but I'm sure a search will turn up something.

As for run time asset loading, well I'm not looking forward to that. Yes there are numerous benefits to the technique, like patching without having to recompile or redistribute the whole folder, but then I also need to worry about asset management and file type parsing. For a first game, it doesn't strike me as a priority over getting shit working and actually enticing to play.

It always looks like there is no end in sight, but just gotta get what I can get done.

No comments:

Post a Comment