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
Get ShooDemUp
ShooDemUp
A Shoot-em-up Shoutout to Arcade Culture
Status | In development |
Author | Michael Macha |
Genre | Shooter |
Tags | 2D, Arcade, Shoot 'Em Up, Space |
Languages | English |
More posts
- Heads up to Linux Download UsersSep 10, 2023
- Cosmetic Tape UpdateJan 30, 2021
- Second Update Today-- A Region Timer!Jan 27, 2021
- Hit Points InJan 27, 2021
- MRS. ShooDemUp!Jan 26, 2021
- Expanded Region Shaders!Jan 25, 2021
- Very Special Update!Jan 21, 2021
- OK. I'm back.Jan 13, 2021
Leave a comment
Log in with itch.io to leave a comment.