{"id":292,"date":"2009-08-02T17:04:28","date_gmt":"2009-08-02T17:04:28","guid":{"rendered":"http:\/\/positech.co.uk\/cliffsblog\/?p=292"},"modified":"2009-08-02T17:05:05","modified_gmt":"2009-08-02T17:05:05","slug":"even-bigger-better-explosions","status":"publish","type":"post","link":"https:\/\/www.positech.co.uk\/cliffsblog\/2009\/08\/02\/even-bigger-better-explosions\/","title":{"rendered":"Even Bigger, Better Explosions"},"content":{"rendered":"<p>It&#8217;s no good doing a game called gratuitous space battles without serious ship explosions. My current benchmark explosion is this one from revenge of the sith:<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.positech.co.uk\/blog\/august2nd2009.jpg\" alt=\"\" \/><\/p>\n<p>I&#8217;ve watched it hundreds of times, and taken about 30 still frame captures from the DVD to use as reference. I have quite a complex particle and effects system for GSB, and it&#8217;s coming along nicely. Currently, the average cruiser will have 17 distinct events as it explodes, not counting the release of escape pods<\/p>\n<p>Those 17 events are scripted like this:<\/p>\n<pre style=\"padding-left: 30px;\">[explosions]<\/pre>\n<pre style=\"padding-left: 30px;\">1 = 0,128,80,EXP_FRIGATE<\/pre>\n<pre style=\"padding-left: 30px;\">2 = 11,97,149,EXP_DESTRUCTION_PLACED<\/pre>\n<pre style=\"padding-left: 30px;\">3 = 20,199,205,EXP_DESTRUCTION_PLACED<\/pre>\n<pre style=\"padding-left: 30px;\">4 = 20,196,238,EXP_DESTRUCTION_PLACED<\/pre>\n<pre style=\"padding-left: 30px;\">5 = 101,108,41,EXP_DESTRUCTION_PLACED<\/pre>\n<pre style=\"padding-left: 30px;\">6 = 120,143,163,EXP_DESTRUCTION_PLACED<\/pre>\n<pre style=\"padding-left: 30px;\">7 = 200,47,189,EXP_FRIGATEBREAKUP<\/pre>\n<pre style=\"padding-left: 30px;\">8 = 210,0,0,EXP_STARTBREAKUP<\/pre>\n<pre style=\"padding-left: 30px;\">9 = 270,128,128,EXP_CRUISERDEBRIS<\/pre>\n<pre style=\"padding-left: 30px;\">10 = 274,53,226,EXP_DESTRUCTION_PLACED<\/pre>\n<pre style=\"padding-left: 30px;\">11 = 290,59,229,EXP_DESTRUCTION_PLACED<\/pre>\n<pre style=\"padding-left: 30px;\">12 = 310,171,209,EXP_DESTRUCTION_PLACED<\/pre>\n<pre style=\"padding-left: 30px;\">13 = 388,61,204,EXP_DESTRUCTION_PLACED<\/pre>\n<pre style=\"padding-left: 30px;\">14 = 400,128,175,EXP_FRIGATEBREAKUP<\/pre>\n<pre style=\"padding-left: 30px;\">15 = 400,128,175,EXP_PLUMES<\/pre>\n<pre style=\"padding-left: 30px;\">16 = 400,128,128,EXP_BLASTGLARE<\/pre>\n<pre style=\"padding-left: 30px;\">17 = 900,128,128,EXP_ANGLED_DEBRIS<\/pre>\n<p>They relate to particle effects and other graphics. So there are a number of different particle emitters called from different points on the hull, then at 210 milliseconds after detonation the sprite starts to tessellate into pieces. At the same point, the damaged hulk texture starts to cross fade into existence behind it, and the hulk components start to drift.\u00a0 At 270 milliseconds a shower of permanent debris is spawned. At 400 milliseconds, plumes of wandering particles appear, accompanied by a bright flickering white glare which also generates a shockwave blasting existing debris out of the way. A final shower of temporary particle system debris is triggered right at the end.<\/p>\n<p>This is all configured per-ship-hull, so different ships can detonate in different patterns and styles.<\/p>\n<p>It looks cool :D<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s no good doing a game called gratuitous space battles without serious ship explosions. My current benchmark explosion is this one from revenge of the sith: I&#8217;ve watched it hundreds of times, and taken about 30 still frame captures from the DVD to use as reference. I have quite a complex particle and effects system<\/p>\n<p class=\"text-right\"><span class=\"screen-reader-text\">Continue Reading&#8230; Even Bigger, Better Explosions<\/span><a class=\"btn btn-secondary continue-reading\" href=\"https:\/\/www.positech.co.uk\/cliffsblog\/2009\/08\/02\/even-bigger-better-explosions\/\">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-292","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\/292","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=292"}],"version-history":[{"count":0,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/292\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/media?parent=292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/categories?post=292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/tags?post=292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}