{"id":261,"date":"2009-06-10T16:37:31","date_gmt":"2009-06-10T16:37:31","guid":{"rendered":"http:\/\/positech.co.uk\/cliffsblog\/?p=261"},"modified":"2009-06-10T16:37:31","modified_gmt":"2009-06-10T16:37:31","slug":"back-to-optimising","status":"publish","type":"post","link":"https:\/\/www.positech.co.uk\/cliffsblog\/2009\/06\/10\/back-to-optimising\/","title":{"rendered":"Back to optimising"},"content":{"rendered":"<p>So the fullscreen \/ windowed toggling is still shaky, but the game now runs in both windows and fullscreen and in pretty much any resolution, including my own 1920&#215;1200 res. Listening to music from star wars whilst testing the game fullscreen at that res with a big battle is a flipping joy.<\/p>\n<p>I&#8217;m in &#8216;lets minimise the number of textures used&#8217; mode. Even at the start of a battle before much fighting, I have this, and it&#8217;s not pretty. (click to enlarge).<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.positech.co.uk\/blog\/june10th.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.positech.co.uk\/blog\/june10th_small.jpg\" alt=\"\" width=\"350\" height=\"225\" \/><\/a><\/p>\n<p>The problem is the running lights use a different &#8216;blend mode&#8217; so putting them in the same texture as the ship saves me nothing :(. Lots to think about here. SetTexture() can be pretty slow, and you ideally don&#8217;t want to be doing hundreds of them every frame. Of course, in games programming, everything is a compromise. The good news is I&#8217;m only using up 70% of the CPU to do this stuff, given a minimum 60 FPS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So the fullscreen \/ windowed toggling is still shaky, but the game now runs in both windows and fullscreen and in pretty much any resolution, including my own 1920&#215;1200 res. Listening to music from star wars whilst testing the game fullscreen at that res with a big battle is a flipping joy. I&#8217;m in &#8216;lets<\/p>\n<p class=\"text-right\"><span class=\"screen-reader-text\">Continue Reading&#8230; Back to optimising<\/span><a class=\"btn btn-secondary continue-reading\" href=\"https:\/\/www.positech.co.uk\/cliffsblog\/2009\/06\/10\/back-to-optimising\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105,4],"tags":[],"class_list":["post-261","post","type-post","status-publish","format-standard","hentry","category-gratuitous-space-battles","category-programming"],"_links":{"self":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":0,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}