WHEW. That was a big one.


So, I hear all the crickets asking, where the heck have I been for the past month? Well I'll tell you lovely green locustoids. I've been adapting this game to use less SDL 2 and more modern OpenGL—including freakin' shaders, as it turns out they run just find on the web and even better on desktop.

(Getting a little technical in this paragraph.) Shader programs are programs compiled not for the CPU, but the GPU. They're our window, as programmers, to tell the GPU how to do its job just right for the program. GPUs are actually typically slower, in clock speed, than CPUs—think of dropping the four gigahertz range for a modern CPU down to maybe one gigahertz or less—but, while CPUs have maybe eight cores, GPUs often have hundreds. Every pixel on your screen is its own task to a GPU, and by running several hundred cores in parallel, at a reasonably high but not cutting-edge speed, efficiency goes through the roof. The downside is that, in order to raise speed without bringing the difficulty of production up to the level of a frontier CPU, they sacrifice Von Neumann architecture—there aren't any jump statements on a GPU. Every "if this then do this" that you add to a GPU literally doubles the size of the compiled program, so the rules are different. As it turns out, that works great for graphics; but you wouldn't want to run a full word processor or web browser on one.

Things aren't perfect yet, but I do have to say that they look awesome. The yoyo string, and everything else, now has antialiasing, including the stars—("What stars?" I'll come back to that for you web players in a sec)—which look spectacular. Debris is no longer a rectangular cut-out of the original image, but can be complex polytopes. Heck, everything is looking fantastic.

However, I have bumped into a snag that I knew I would hit eventually. The stars are now GLSL particle effects, which is fine, but I'm still sending data to the GPU in an inefficient way. This is no big deal for desktops, but I noticed substantial lag on WebAssembler, and ended up conditionally turning them off. It's just for now—I've got a plan to send data to the graphics card in a texture and do a lot of the hard work there, which will improve performance both on desktop and, substantially, on the web. Currently, every single star is a full shader program call. That usually isn't an issue until you hit around 2,000 per frame—though still a concern—but the general rule with internet programs is that they run with about half of the system resources available to them. This has created a bit of a seam.

So, in response, I've dropped the default FPS—again, temporarily—from 60 FPS to 30 FPS on the web, and temporarily turned off stars. They'll be back in a few updates after I've improved the star shader and dropped the frequency of calls to it quite a bit. I'll likely be throwing a new trailer up today or tomorrow showing off the effect. They're gorgeous, they're just not done, and I can't keep all my visitors waiting forever.

This is likely to be the longest-coming update that you are ever likely to have to wait for. unless for some reason I someday decide to move to WebGPU. (Also a little technical here.) WebGPU is a port of Vulkan to the web, it isn't finished yet, and I'm not sure it would really benefit this particular game, so it's unlikely. Soon enough I'll be adding crazy effects to the background and other new paraphernalia to the stages, like dynamic collidable terrain; this just isn't easily doable on SDL.

The next few updates should add rotation to the debris fragments again, and fix the stars entirely on the web. Thanks for visiting!

Files

shoodemup_win.zip 17 MB
Dec 05, 2020
shoodemup_linux.tar.gz 13 MB
Dec 05, 2020
shoodemup.zip Play in browser
Dec 05, 2020

Get ShooDemUp

Buy Now$1.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.