{"id":2477,"date":"2012-04-30T23:13:08","date_gmt":"2012-04-30T13:13:08","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=2477"},"modified":"2012-04-30T23:29:30","modified_gmt":"2012-04-30T13:29:30","slug":"shadow-speed","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2012\/04\/30\/shadow-speed\/","title":{"rendered":"Shadow speed"},"content":{"rendered":"

\"\"<\/a>This post isn’t actually about shadows.\u00a0 But after poking around a bit, I’ve finally got shadows performing nicely.\u00a0 Look at that timing bar at the bottom left corner of the screenshot, and compare it against any of the recent screenshots (with or without shadows) to see how little a performance difference is being caused by the shadows, now.<\/p>\n

As I mentioned yesterday, there’s still a lot to do with shadows.\u00a0 Most notably, right now shadows are only being generated for a single area of the game world (covering about half of the starting region).\u00a0 Move away from there, and shadows vanish again.\u00a0 I’m planning to implement cascaded shadow maps, which will result in shadows being calculated near the player, and with better resolution near the player;\u00a0 blockier further away.\u00a0 I’ll make an attempt at this on the coming weekend.<\/p>\n

But what I really want to talk about today is the screenshot from yesterday, with all the red squares in the actionbars.\u00a0 In a lot of ways, for me, those screenshots are more exciting than these ones with the progress on shadows.\u00a0 See, what’s going on is that I’m in the middle of a massive refactoring of how action bars work.\u00a0 And here’s why:<\/p>\n

I’m adding an inventory.\u00a0 Both for in-game characters, and for the player himself.\u00a0 “Items” are now objects which can be carried around, and optionally perform a function when clicked upon.\u00a0 And almost everything is now an infinite-use “Item”, including all of the terrain editing and building placement tools.\u00a0 Even the button for stepping off of the graveship is an “Item” now.\u00a0 Similarly, the various combat abilities of mmo classes are now implemented as infinite-use items, too.<\/p>\n

Items are stored in various places (inventory, class abilities, etc), and shortcuts to these items can then be dragged into action bar button slots.\u00a0 I haven’t yet implemented stacking and depletion of similar items, but that’s planned;\u00a0 hopefully should have that working by the end of the week.\u00a0 This support gives me the ability to (for example) give the player once-off consumable items, such as “construct a capital city”, without cluttering his interface with disabled buttons for all the time when he’s not allowed to do that.\u00a0 It also opens the door to, for example, the player being able to de-rez a building, pick it up, carry it somewhere else, and then rebuild it elsewhere, at no charge.\u00a0 I think I like that mechanic a lot more than the current “drag the building freely around the landscape” interface.<\/p>\n

In a more obviously useful vein, it also allows the MMORPG game to have things like health potions, spell scrolls, and other one-use items, and have the AI players automatically understand how to use them.\u00a0 These consumable items are all implemented in exactly the same way as class abilities, which means that they should slot straight into the AI action selection logic that already exists.<\/p>\n

Originally, the idea for MT2 was to abstract away items, because of all the complexities that surround them (drop tables, loot frequencies, etc), but in the end, I really wanted to be able to give items to the player for the purpose of building the world.\u00a0 I probably won’t expose the complexities of drop tables in the first release of MT2;\u00a0 it’s not really what I want the game to be about.\u00a0 I’ll just have AI game designers fill them out automatically.<\/p>\n

So that’s what I’m up to at the moment!\u00a0 Hoping to polish off the item interface this week, and get cascaded shadows over the weekend.\u00a0 Wish me luck!<\/p>\n","protected":false},"excerpt":{"rendered":"

This post isn’t actually about shadows.\u00a0 But after poking around a bit, I’ve finally got shadows performing nicely.\u00a0 Look at that timing bar at the bottom left corner of the screenshot, and compare it against any of the recent screenshots (with or without shadows) to see how little a performance difference is being caused by…<\/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-DX","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/2477"}],"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=2477"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/2477\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=2477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=2477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=2477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}