In this article, I want to demonstrate a nice way to write functional-style code in Ruby. It is a way to write non-trivial pure functions, without a bunch of weird non-idiomatic code. Also, the acronym is PFAAO, which I think sounds pretty cool.
I know. FizzBuzz has been done to death. But I want to use it as a familiar base upon which we can explore some of the common tradeoffs involved in writing and maintaining software. In this article, I'll show multiple implementations of FizzBuzz, all designed to achieve different goals, and discuss the implications of each.
Today I live-streamed the making of Fruity Bat (a Flappy Bird clone) in Ruby using the
gosu gem. Watch the videos below, and check out the code on github: https://github.com/tomdalling/fruity_bat
In this article, we will be adding directional lights, spotlights, and allowing for multiple lights instead of just one. This is the final article on lighting – at least for a while.
Valve is investing in OpenGL to hedge themselves against Microsoft. Some well-known developers have written about the deficiencies in the API. A few competing, proprietary APIs have popped up. In an effort to remain competitive, Khronos announces glnext: a ground-up rethinking of the OpenGL and OpenGL ES APIs. This post will look at developments in the OpenGL ecosystem over the last couple of years.
In this article I'm going to explain homogeneous coordinates (a.k.a. 4D coordinates) as simply as I can. In previous articles, we've used 4D vectors for matrix multiplication, but I've never really defined what the fourth dimension actually is. Now it's time to take a closer look at projective geometry.
Also, welcome back! It has been a while since my last post. Hopefully I will find some time in the next couple of months to finish up the Modern OpenGL Series of articles. The code for article 08 is done, but writing the article will take some time.
In this article we will continue to implement lighting. We will implement the ambient and specular components of the Phong reflection model, attenuation, and gamma correction.
This is the first article covering lighting. We will begin our lighting adventure by implementing per-pixel, diffuse lighting with a single point light. In later articles we will implement ambient and specular reflection, directional lights, spotlights, attenuation, and using multiple lights.
In this article, we will be refactoring the code to be more like a 3D engine/framework. Specifically, we will be replacing some of the globals with structs that represent "assets" and "instances." At the end, we will have a single wooden crate asset, and five instances of that asset arranged to spell out "Hi" in 3D.
In this article, we will be consolidating the matrix and camera knowledge from the previous article into the new
tdogl::Camera class, which will be a first-person shooter type of camera. Then, we will connect the camera to keyboard and mouse input, so we can move within the 3D scene and look around. This will involve learning a bit of vector math. We will also learn about inverting matrices, which was not mentioned in the previous article.