{"id":1889,"date":"2011-01-04T15:43:44","date_gmt":"2011-01-04T04:43:44","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=1889"},"modified":"2011-01-04T15:44:31","modified_gmt":"2011-01-04T04:44:31","slug":"some-bugfixes-to-vectorstorm","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2011\/01\/04\/some-bugfixes-to-vectorstorm\/","title":{"rendered":"Some bugfixes to VectorStorm"},"content":{"rendered":"

\"\"<\/a>I have no idea what this image is.<\/p>\n

I’ve made a bunch of little tweaks to the VectorStorm engine today. \u00a0Most notably:<\/p>\n

When doing a scene update, the camera now updates last<\/em>, instead of first. \u00a0Previously, the camera would pick where to be before the game had a chance to take any actions, which usually led to the game camera lagging one frame behind whatever it was supposed to be following. \u00a0(Of course, now you’ll have the opposite problem; \u00a0the game will no longer be able to tell where the camera is, since it won’t have moved into position until after the game finishes its update) \u00a0In practice, the real solution is for the game itself to take responsibility for updating the camera whenever is appropriate for that game. \u00a0But as a default, having the camera update last is usually less-bad than having it update first. \u00a0So I’ve changed it.<\/p>\n

I noticed that vsFont wasn’t applying text colors to strings which were justified as “centered” or “right”; \u00a0they were always coming through as pure white. \u00a0This is now fixed, in current trunk.<\/p>\n

I also added another “primitive” function for creating renderable textured rectangles (as vsFragments that can be attached to a vsSprite or vsModel), this time supporting tiled textures. \u00a0You can specify how big the tiles should be, and can optionally specify a rotation for the texture. \u00a0Check for vsMakeTiledTexturedBox2D()<\/strong><\/tt> in VS_Primitive.h, for that.<\/p>\n

I’ve also been poking with the bloom effect again; \u00a0I noticed that the trunk version looks pretty ugly at large screen sizes. \u00a0I think I have it balanced nicely again, but haven’t committed these changes to the public repository yet; \u00a0probably later tonight or tomorrow, once I’m certain that performance is still okay.<\/p>\n

Finally, I’ve just finished scaling down the Asteroids testbed game. \u00a0It’s been misbehaving ever since I converted it over to Box2D, because its objects were moving too fast for Box2D to cope with. \u00a0So I’ve reduced everything by a factor of ten, and now things are moving at a reasonable speed again. \u00a0I’ll be checking that in a bit later on as well. \u00a0Oddly, I’m still occasionally having shots bounce off of asteroids, without receiving a collision callback. \u00a0Mind you, I’m using an ancient version of Box2D; \u00a0maybe I should update that someday.<\/p>\n","protected":false},"excerpt":{"rendered":"

I have no idea what this image is. I’ve made a bunch of little tweaks to the VectorStorm engine today. \u00a0Most notably: When doing a scene update, the camera now updates last, instead of first. \u00a0Previously, the camera would pick where to be before the game had a chance to take any actions, which usually…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[4,3],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/po9WK-ut","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1889"}],"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=1889"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1889\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=1889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=1889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=1889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}