{"id":3604,"date":"2015-01-15T23:14:14","date_gmt":"2015-01-15T13:14:14","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=3604"},"modified":"2015-01-15T23:14:14","modified_gmt":"2015-01-15T13:14:14","slug":"200-commits-since-ms7","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2015\/01\/15\/200-commits-since-ms7\/","title":{"rendered":"200 commits since MS7"},"content":{"rendered":"

I released MMORPG Tycoon 2’s Milestone 7 build on December 7th;\u00a0 that’s just under six weeks ago.\u00a0 In that time, I’ve made 200 commits to the codebase;\u00a0 that’s an average of about 5 commits per day.\u00a0 That’s only counting changes made to the game itself;\u00a0 not ones made to the publicly available VectorStorm game engine (66 changes made to the VectorStorm engine during that time period), and there have been some reasonably large game engine changes.<\/p>\n

For example, during this period the VectorStorm game engine has switched from generating random numbers using the Mersenne Twister<\/a>, to using a simple xorshift<\/a> random number generator (specifically, xorshift1024* ).\u00a0 Additionally, it adds support for multiple random number sources in a single program.\u00a0 This now makes it possible to safely (and repeatably!) generate sequences of pseudo-random numbers from multiple threads simultaneously (by giving each thread a separate random number source).<\/p>\n

<\/p>\n

Also in this period, VectorStorm’s has begun to use the shockingly badly named PhysicsFS<\/a> library for (wait for it)… loading and saving files.\u00a0 What else would you expect a library named “Physics” to do?\u00a0\u00a0 Anyhow, this gives us a bunch of benefits, including unifying code for loading and saving files across different operating systems, for finding appropriate file directories for saving user files, and for allowing end-users to modify game files (e.g..: to support modding by users)<\/p>\n

VectorStorm has added support for specifying separate colors per instance, when drawing instanced models.\u00a0 In MMORPG Tycoon 2, this functionality is being used for much quicker drawing of trees, clouds, and water ripples.<\/p>\n

In font drawing, we now support aligning text by its top, by its baseline, or by its center.\u00a0 That’s in addition to the normal left\/right\/center justification settings.\u00a0 And in addition to the fixes to pixel-exact font rendering, when centered that I posted about earlier<\/a>.<\/p>\n

VectorStorm also now has (early) support for shared OpenGL contexts.\u00a0 This means that you can (for example) render your scene from one thread, while feeding new data into OpenGL via the second context, from a background thread.\u00a0 Most folks won’t need to do this, but in a game which does as much background generation of data as MMORPG Tycoon 2, it makes a big difference!<\/p>\n

Finally, I’ve begun to deprecate the old method in which VectorStorm assembles rendering command queues for the basic vsModel and vsSprite classes;\u00a0 no longer does it insert OpenGL 1-style “push” and “pop” matrix instructions into the queue;\u00a0 now everything is done by calculating the correct final matrix, and setting it with a “set matrix” instruction.\u00a0 This one change has dropped the size of the rendering commands for a typical MMORPG Tycoon 2 frame from about 300kb to about 40kb.<\/p>\n

Plus, VectorStorm is now starting on a path to make it easier to use shaders from game code.\u00a0 You can now set custom shader uniform values on your material (only floats and bools are currently supported, but more will be added as soon as I’m sure I have the code architecture approximately right).\u00a0 The values you specify will be sent to the shader before your model gets drawn.\u00a0 No more need to create a custom ‘shader’ class in order to set uniform values!\u00a0 Values may either be set to a constant value, or may be bound to a memory location so that you can update values at any time, and the shader will automatically notice the changed value the next time it draws your material.<\/p>\n

Oh!\u00a0 And for the first time in ages, there’s a new basic system preference available.\u00a0 VectorStorm now supports disabling its support for HighDPI displays (defaults to disabled).\u00a0 When disabled, VectorStorm pretends that window manager ‘points’ are pixels.\u00a0 When enabled, VectorStorm will draw using the display’s native pixel density.\u00a0 I finally got annoyed at my Macbook Pro Retina’s high-density screen, but mobile-class video card which couldn’t quite push all those pixels.\u00a0 And I imagine that this will be an issue for most devices which have HighDPI displays.\u00a0 But if you want to use absolutely all of your pixels, support for that is easy to turn back on.\u00a0 :)<\/p>\n

Those are the most notable changes in the VectorStorm engine since the last milestone build.\u00a0 (They’re all public over on Github<\/a>, licensed under an extremely permissive zlib-like license, so feel free to look over it, adapt it, use it, or whatever!)<\/p>\n

MS8, on the other hand, has more than three times as many commits as the VectorStorm engine itself.\u00a0 So suffice to say, the change log for Milestone 8 is probably going to be massive.\u00a0 I expect that I’ll be spending most of tomorrow just writing it up!\u00a0 But most of Milestone 8’s changes don’t affect the core game itself, which is almost identical to what was present in Milestone 7;\u00a0 instead, it mostly affects the overall game structure, polish, UI flow, and packaging.<\/p>\n

Two days left to go, and Milestone 8 will be out the door!\u00a0 I’m very much looking forward to completing this one, and getting back to working on the core game itself, again.\u00a0 :)<\/p>\n","protected":false},"excerpt":{"rendered":"

I released MMORPG Tycoon 2’s Milestone 7 build on December 7th;\u00a0 that’s just under six weeks ago.\u00a0 In that time, I’ve made 200 commits to the codebase;\u00a0 that’s an average of about 5 commits per day.\u00a0 That’s only counting changes made to the game itself;\u00a0 not ones made to the publicly available VectorStorm game engine…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[24,25],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/po9WK-W8","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/3604"}],"collection":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/comments?post=3604"}],"version-history":[{"count":1,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/3604\/revisions"}],"predecessor-version":[{"id":3605,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/3604\/revisions\/3605"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=3604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=3604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=3604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}