{"id":2265,"date":"2011-09-19T22:47:10","date_gmt":"2011-09-19T12:47:10","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=2265"},"modified":"2011-09-19T22:47:23","modified_gmt":"2011-09-19T12:47:23","slug":"some-little-updates","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2011\/09\/19\/some-little-updates\/","title":{"rendered":"Some little updates"},"content":{"rendered":"

 <\/p>\n

\"\"<\/a>So work has been busy, and I haven’t had nearly as much time to code on things here as I would have liked, but I’ve made some interesting progress over the past week or two.<\/p>\n

The first thing to mention is that I believe I’ve finally cracked the nut of making the game’s height map look good; \u00a0no more weird diagonal diamond patterns visible across changes of surface facing! \u00a0(this involves re-triangulating the surface to try to minimise artefacts) \u00a0This was especially bad before at sharp creases, such as you can see at the bottom of this extreme hill, or around the edges of darker areas, at the crest of the hill. \u00a0It was also often very visible on the mountains at the region boundaries. \u00a0But now, it’s pretty much bang on every time. \u00a0I’ve been doing this “re-triangulate the mesh to try to hide those diamond patterns” thing for an awfully long time, but it was only today that I finally found the right combination of heuristics to actually make it work reliably.<\/p>\n

I’ve also moved from a simple directional-lighting light model to a wrap-around lighting model, which gives the game a much softer look, which also helps with the smoothness. \u00a0And is just a nicer look overall, in my opinion.<\/p>\n

I’ve also started implementing more ground shaping tools. \u00a0Most notably is the ground leveller. \u00a0Basically, it tries to flatten out the terrain under your cursor. \u00a0There are versions which will only raise terrain, only lower terrain, and which will go in both directions. \u00a0This is great for setting up flat surfaces to place buildings upon. \u00a0(Since buildings only place their centre point on the ground, it’s common for their corners to be floating, or for the ground to be embedded through the building geometry. \u00a0Still TODO is to have buildings automatically flatten the ground under them, when placed.<\/p>\n

Oh, and incidentally, grass now flows downhill, instead of always east-west. \u00a0I don’t think you can make it out in this screenshot (I’m too far away), but trust me. \u00a0:)<\/p>\n

I still need to do thinking about how to set up the overall ground editing interface. \u00a0The “paint on” interface is nice, but even with the work being farmed out to background threads, it’s hitting the frame rate too hard, when the user paints with a large brush. \u00a0I’ve been thinking about having the terrain editing tools work with a grid lattice, which I could easily update in real-time. \u00a0When the user is happy with his changes, he could click an “Accept” button, to assign the terrain rebuilding to a game developer. \u00a0This would make it work similarly to how placing buildings works; \u00a0giving commands to actually be executed by minions. \u00a0And it would also solve the problem of needing to rebuild the terrain every frame; \u00a0instead, it could just happen in the background, when the developer is actually performing the task. \u00a0Need to think about this more; \u00a0I’m not sure how the user would specify terrain types on a grid lattice, for example.<\/p>\n

I took a stab at continuing with player AI, but rapidly banged my head against the current code setup. \u00a0I think I’m going to have to heavily refactor the code, before I can add anything more to it. \u00a0It works right now, but it was written in the fastest possible way, way back for my self-induced “Milestone 1”, and at this stage, I’m stumped as to how to add parties to the system, without breaking the quest-following behaviours that are already in there.<\/p>\n","protected":false},"excerpt":{"rendered":"

  So work has been busy, and I haven’t had nearly as much time to code on things here as I would have liked, but I’ve made some interesting progress over the past week or two. The first thing to mention is that I believe I’ve finally cracked the nut of making the game’s height…<\/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-Ax","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/2265"}],"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=2265"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/2265\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=2265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=2265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=2265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}