{"id":1761,"date":"2010-11-21T19:18:48","date_gmt":"2010-11-21T08:18:48","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=1761"},"modified":"2010-11-21T19:26:30","modified_gmt":"2010-11-21T08:26:30","slug":"bleah-sick","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2010\/11\/21\/bleah-sick\/","title":{"rendered":"Bleah, sick"},"content":{"rendered":"

\"\"<\/a>I’ve come to learn that being ill is an entirely different affair when you’re un\/self-employed. \u00a0Far more stressful to be unable to work, when you don’t have paid “sick days” supporting you.<\/p>\n

Yesterday I was basically unable to think straight, so ended up spending most of the day resting (and playing through the second half of “the Zombie Island of Dr. Ned”, in Borderlands<\/a>). \u00a0It surprises me that that game has not yet hung a lampshade on how often it hangs lampshades on things. \u00a0But I still have two more bits of DLC to go through, so there’s still time. (I’m skipping the “arena deathmatch” DLC for now. \u00a0Not really feeling well enough to enjoy that sort of challenge at the moment.)<\/p>\n

But today, I’m feeling a lot better. \u00a0Still not well enough to actually feel like it’d be wise to go out of the house and run errands, but better. \u00a0At the very least, my brain’s now working well enough to do a little coding again.<\/p>\n

<\/p>\n

Here’s what I’ve done:<\/p>\n

I’ve set up VectorStorm so that it now has an “Orientation” value which you can set on the vsSystem. \u00a0You can change this “Orientation” value at any time. \u00a0The legal values are “Orientation_Normal”, “Orientation_Three”, “Orientation_Six”, and “Orientation_Nine”, Three, six, and nine being clock positions representing the top of the screen. \u00a0(Orientation_Normal perhaps should have been Orientation_Twelve, to follow that naming convention). \u00a0If you don’t set an orientation explicitly, you’ll be using Orientation_Normal by default, with the “top” being at the top of your window.<\/p>\n

From a game’s point of view, it isn’t aware of what orientation the game is playing in; \u00a0everything is translated to and from the requested “orientation” automatically, inside the engine. \u00a0This includes graphics, mouse positions, screen sizes, aspect ratios, etc. \u00a0From a game’s point of view, it doesn’t know or care which orientation is being used.<\/p>\n

So far so good. \u00a0This stuff is in the basic VectorStorm engine, and it works on all platforms. \u00a0I can’t think of a reason why you’d ever want to make your PC game play as though the right side of the window was actually the top, but you can do it if you ever want to.<\/p>\n

I’ve also added a bit of glue code to the iPhone side of things, which keeps track of which orientation iOS thinks is being used.<\/p>\n

So with all of these pieces, it’s now trivial for an individual game (on iPhone) to check iOS’s orientation, and tell VectorStorm to match it (if desired). \u00a0For example, if iOS says “LandscapeLeft”, we switch VectorStorm’s orientation mode to Orientation_Three. \u00a0If iOS reports an orientation that we don’t want to support (say, if we’re making a game that should only ever be played in Landscape mode), then we simply ignore it, and let VectorStorm continue operating in whatever orientation we prefer.<\/p>\n","protected":false},"excerpt":{"rendered":"

I’ve come to learn that being ill is an entirely different affair when you’re un\/self-employed. \u00a0Far more stressful to be unable to work, when you don’t have paid “sick days” supporting you. Yesterday I was basically unable to think straight, so ended up spending most of the day resting (and playing through the second half…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[33,24,7],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/po9WK-sp","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1761"}],"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=1761"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1761\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=1761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=1761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=1761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}