{"id":536,"date":"2009-05-27T23:21:07","date_gmt":"2009-05-27T13:21:07","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=536"},"modified":"2009-05-27T23:30:19","modified_gmt":"2009-05-27T13:30:19","slug":"moving-on","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2009\/05\/27\/moving-on\/","title":{"rendered":"Moving on"},"content":{"rendered":"
So I’ve finished up with terrain for the moment;\u00a0 I’m pretty happy with the system and the general look that I have now.\u00a0 I found some pretty major optimisations today, which means that I’m now able to render the terrain with the ground clutter in less time than it took yesterday to draw just the terrain without the clutter.<\/p>\n
(For any programmers in the audience, the key thing was to pay attention to memory access patterns;\u00a0 if you have an array of 65,000 vertices arranged in 256 rows of 256 vertices each, then it’s faster to draw triangles along the rows than down the columns, because the rows are organised close to each other in memory, whereas the columns are spaced widely apart)<\/em><\/p>\n So I’m now pretty happy with the basic terrain system and rendering.\u00a0 There’s still a lot of stuff I could do to tweak it, but I’m going to leave that sort of tuning until everything else is in place.\u00a0 I believe that the next thing I’ll work on will be “picking”.. that is, determining what object or bit of heightmap is under the cursor.\u00a0 This will be essential for tasks like letting the player place roads and buildings onto the undulating heightmap.\u00a0 The system I had in place in MMORPG Tycoon 1.x only worked in 2D, and the picking I wrote for Lord was an ugly hack that wouldn’t scale to the size of worlds I’m using here — you could fit about 500\u00a0 of the “Lord” maps into the screenshots which I’ve been showing;\u00a0\u00a0 Lord’s game world was only 60 x 60 vertices in size, after all.<\/p>\n Once picking is working, then I’ll start on placements;\u00a0 placements of buildings, and of an interface to make terrain adjustments.\u00a0 There’s so much stuff to implement!\u00a0 :)<\/p>\n","protected":false},"excerpt":{"rendered":" So I’ve finished up with terrain for the moment;\u00a0 I’m pretty happy with the system and the general look that I have now.\u00a0 I found some pretty major optimisations today, which means that I’m now able to render the terrain with the ground clutter in less time than it took yesterday to draw just the…<\/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-8E","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/536"}],"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=536"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/536\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}