FourLords Part I
At last week’s Buster meeting, we decided to implement a multi-pilayer version of Warlords, an Atari game that formed my young mind. I’m going to call it FourLords, because really the game doesn’t involve armies or anything on a war-scale. Plus, I want to stress the multiple Pis, multiple players aspect of the game. I […]
Mercurial HOWTOs
I’m starting to use Mercurial on Bitbucket to manage shared projects, and I’m recording the problems I run into and their solutions. Problem: hg commit yields “no username supplied” Mercurial apparently doesn’t record which user checked out the repository in the metadata. (I’d love to know why.) I fixed this by creating an .hgrc file […]
A rotating 3-D model with Raspberry Pi
I left off with a visible but maligned rendering. The malignancy is gone. I did not have a depth buffer in my EGL context. EGL(depth_size=8) fixed that. I also wanted to be able to handle key events. Peter insisted on a select-driven event loop, so I went searching to figure out how to read the keyboard via […]
Showing a 3-D model on our Raspberry Pi
Eric got his OBJ loader working, we think, so it came time for me to integrate his code with my demo renderers. It kind of worked. I added a normal attribute to the vertex shader and sent it along to the fragment shader, where I calculated some simple directional lighting in eye space. I drew […]
Drawing a line
I have a friend who is trying to get a bunch of first semester programmers to plot a line between two points into a 2-D pixel array. Bresenham’s is out of the question. A first attempt was a slope-based approach. I never saw the code he came up with, but it wasn’t able to handle […]
Make a one-sided surface two-sided in Blender
I often model things like walls and leaves with only one side. Most computer graphics tools I’ve dealt with only show geometry that faces the viewer. This puts one-sided surfaces in a predicament. When the viewer goes behind them, the geometry disappears. One simple workaround to this problem is to duplicate your one-sided model and […]
Toon shading in Unity
We were curious if we could incorporate cel-shading into Unity. Yes, it can be incorporated pretty easily by: Importing the Toon Shading package. Going to all Mesh Renderer components and switching the material to one of the four toon materials that we imported. Applying toon material to terrain took some searching, as the terrain shader […]
SIGITE Talk
I’m giving a talk on Paul Wagner’s MOBILE project at SIGITE 2012. Following is a draft of my presentation. * * * Many of us have had those nightmares where we discover we’ve been enrolled in a class but forgot to attend. The final exam is in an hour. Thankfully, our panic wakes us. Those […]
Schedule something for future destruction in Unity
Problem: I have a game object, a prefab probably, that I instantiate and velocify. It goes off screen. I want it gone then. Solution: To expire a game object or component based merely on time, call Destroy(thingToDestroy, nSeconds). After nSeconds elapses, thingToDestroy will disappear.
Colliding with and mutating text in Unity
Problem: I want, in the Unity game engine, to shoot projectiles at text and decrement the number the text is displaying. Solution: Add a 3-D text game object. Add colliders to projectiles and the text. The collider on the 3-D text will automatically size itself around the bounds of the text. Implement OnTriggerEnter and update […]