Gaming The Unix Way
So, few weeks ago, after playing Quake4, I’ve been thinking a bit. Large portion of Quake4 can be scripted in their own scripting language. Most of Unreal Tournament 2004 (and possibly previous versions) are scripted - I know most of the networking stack is.
Now, it is time for a screenshot:
What is that you ask? Simple, it is a simple OpenGL driven program that displays a rotating (counter-clockwise) pentagon, and draws some text. As far as I know, everyone has to do something similar in a college graphics course. So, what’s so special about this one? I’m glad you’ve asked; the answer is - the programming language. Yes, I have written this in a very unusual programming language, I have used Bash.
Since there are no native OpenGL bindings for Bash, I had to create several small C programs, a renderer, vector transformer (new vector = matrix times old vector), rotator (outputs a matrix for the vector transformer), and some others. With these, I simply draw N-sided polygons, draw text anywhere on the screen, read keyboard input, and some other things.
What else have I made with this? I am working on a simple "room" where you will we able to run around. Currently, I have…
- …the room
- …the keyboard keypress code
- …debug "world info" data (x, y, z, and the three angles) displayed on the screen
What doesn’t work? Well, for whatever reason, if I try to translate the camera position to the initial coordinates, all of the world (the 4 walls, ceiling and floor) completely disappears, leaving the debug text as the only thing there.
Comment by [unknown] — January 1, 1970 @ 00:00
Comment by [unknown] — January 1, 1970 @ 00:00
Comment by [unknown] — January 1, 1970 @ 00:00
Comment by [unknown] — January 1, 1970 @ 00:00
Comment by [unknown] — January 1, 1970 @ 00:00
Comment by [unknown] — January 1, 1970 @ 00:00
Comment by [unknown] — January 1, 1970 @ 00:00
Comment by [unknown] — January 1, 1970 @ 00:00
Comment by [unknown] — January 1, 1970 @ 00:00