Skip to main content

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

Hey! Thanks for the review and feedback. I recently got an idea how to implement collectable items, without changing the way the whole rendering works (hence, I could not include those until now). The level is just a 2d map which is used like a texture folded around an endless tube, but instead of setting the "color" it makes the map visible or not (like alpha channel). The color is defined by a second texture which is mapped the same way. There are no meshes anywhere. Just a procedural pixel mapping. The shader then just gets the information about how much time has passed, the current rotation and shifts the textures accordingly which are sampled as repeatitive textures. Additionally a y-offset is sent into the shader, which is used for effects like the flip-jump or falling off from the platform. The starfield is currently another texture thats rotated in the same way. The HUD was implemented in GDScript sampling the input texture in the CPU at given distances from the time offset, and then drawing lines in circular pattern, while the according colors. This caused a lot of CPU use and issues on slower mobile devices. But, it's now it's implemented in the shader too, which has all the needed information anyways. Just needs the current speed as a parameter for pre-calculating the jump distance. All the animation (e.g. flip-jump, rotation, falling down) is then just scripted in GDScript by adapting the shader parameters.

(+1)

That's a really clever way to do it! Thanks for going over your process, it's a really interesting read. Shaders are amazing.

Yeah... you also get a lot of inspiration on http://shadertoy.com/

It's aweome what they do there. Some put the whole game logic into the shader...
My favourite game there is "Alien vs. Humans" https://www.shadertoy.com/view/XldGDN

For some reasons the sound doesnt work anymore. But, just open that music in background to it as the soundtrack (make sure to put it on repeat with right click  on the video => REPEAT). Have fun shooting some alien ships!