Posts Tagged ‘ SDL

Emscripten time

Lots of excitement here at Geekchef central. My first, visually appealing demo shamelessly copied from this most-excellent tutorial.  It’s an actual C++ program with SDL compiled with Emscripten.  No OpenGL/WebGL yet, but like always, it’s (working) tutorials like this that help you look more positively at some of the newer technologies out there.

Thank you, Sol.

(PS:  If you don’t see anything, you’re probably using an old browser or Internet Explorer.  Even IE 11 doesn’t show it.).

Interfacing in 3D space

Nothingsdl_interface_thumb much today other that working on the interfacing.  Having mouse control (mouse move, wheel and button click) and windowing is not only necessary for a working game but the sooner you get it set up, the better the creative and debugging sessions go. SDL provides all this and more so that once you get the hang of it, you can’t live without it.  Lots of tutorials and demo rely of FreeGlut or GLFW, but it’s not hard to port them to SDL.  Even the OpenGL Superbible is using a custom event-driven application framework based on different tools, but I’m porting everything back.

Speaking of which, this book has a great tutorial on rendering thousands of  objects (say, a field of grass or a corona of asteroids) with few OpenGL calls.  Go check the video at their site to see the results.  Shaders are so über-powerful.  Today’s example is a similar lesson involving 4 quads (meh!) but it also demonstrates a simple Model-View-Projection with mouse control on both X and Y directions and mouse wheel for field of view (FOV) variation.

Baby steps.

I should be working on lighting soon.  Let’s just see where this leads to, first.

return top