Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Post #2

Today I did a few small aesthetic changes and one big change. The important change was how to handle shielding on ships.

I'm not sure if I think the new style is better looking but it is easier work with and much faster to render. Drawing, turns out is very processor intensive and was causing performance issues when several attackers were drawn in the same frame.

Old code:

draw onto _sprite
         strokestyle "rgba(200,200,255,.5)"
         linewidth 2
         circle 17,20,23+_repeat*3
enddraw
// 5 shield rings would mean this is called 5 times

New code:

update sprite _sprite.shieldContainer where alpha=arg.1*2*10

Much much much much faster, and better looking. Instead of calling this 5 times, we'd just pass in '5' as the first (and only) argument.

btw, "_sprite" is a built in that always refer to the current sprite being worked on.

https://canvaslanguage.com/studio/clusterchaos