Me and @royobollo just released our first game!
In Dance of the Penguins, penguins make no distinction between good and evil. You have been tasked with collecting candy canes while surviving their shenanigans. See how long you can evade the hordes.
The game is completely free, and can be downloaded via the link below
I always try find new ways to insult Alex
For complicated technical reasons, it’s impossible to use SDL to implement vsync in a game in such a way that the game knows if vsync is enabled correctly. You could always end up in a situation in which the screen and drivers are configured incorrectly, configured to always force or always disable vsync, or in a weird multi-monitor setup where the refresh rates don’t match up, or in a render-offloading setup.
But even worse, even when using OpenGL directly, it’s impossible to detect whether vsync is enabled at all. You can merely request it, and if the driver does not follow that request, there is no negative feedback.
Even if you check the time it takes to swap buffers, or if you check whether the frame rate is suspiciously close to 60 FPS, you might end up with a driver that is configured to do vsync with triple buffering, so glSwapBuffers never waits for long and will happily switch back and forth between the two back buffers, rendering hindreds of frames per second, even if only 50 of them are actually displayed.
From the game’s perspective, the timing looks the same when vsync is disabled. The only thing your game knows for sure is whether you checked the vsync box in the options menu.
nice to know there are people who miss me here. anyway have some drawings I made in ms paint
3D Computer Graphics Using OpenGL
Shows creating shader objects, compiling, and linking them. Demonstrates glCreateShader(), glShaderSource(), glCompileShader(). Also creates a program using …
Hello again! I’ve been deep in the FPS mines, squeezing performance from the very stones, with my bare hands alone…
There are two major changes to the in-game renderer - chunks, and dissolve. This all happens behind the scenes when you compile a map, so the editor is unchanged.
First, maps are split into chunks - 16x16x16 like in Minecraft. When a chunk is out of view, it doesn’t get drawn - so performance when following the player, rather than high in the sky, is vastly improved.
Second, rather than keeping every tile in the map as a quad, they’re now joined up (dissolved) into fewer, larger areas where possible. Faces with the same tiles are merged, but also patterns - that sea texture is actually 4 tiles.
This island map is displayed very easily at 60fps, rather than the 40 it was struggling for previously.
Next up, to re-ruin the framerate, is model imports and props :)
Passing Data from Vertex to Fragment Shader
Uses OpenGL graphics pipeline to show how to pass interpolated data from the vertex shader to the fragment (pixel) shader. Uses the GLSL layout and location …