So busy, food even fell by the way side :-S

I spent yesterday experimenting with DevIL, I rather think that it will be more “To my taste” then using SDL_image for getting easy access to various image files. I only expect to use certain image formats in my games kit, but ahem, if that ever changes, who wants to write per-image-type handling code anew? Hehe. In playing with that, I’ve uncovered a bug in my zipped package handling, and have coded myself into a corner, where in the system would best serve me, by growing a more abstract file handling API—exactly the direction I wanted to go in, hahahaha! TBH, I’ve only ever coded myself into two corners in my life, but this ones a happy case.

Most of the night was used in experimenting with a pair of Integrated Development Environments, CodeLite and Code::Blocks, as possible replacements for existing build.{sh,bat} scripts. There is also a Visual C++ solution and project tree that I whipped up Thursday to replace build.bat, and am still cursing at over its dislike for by build tree o/.  In terms of IDEs, Microsoft has the best, but like visually everything at MS, it’s also as vendor specific as writing machine code in octal 8=).

Really, I can care less about having compiler, editor, debuger, … all integrated—other wise I’d use GNU emacs, screen, toolchain, and their dialect of C, and spit on everyone else’s graves >_>. The thing that interests me is having a suitable build system, one that can handle multiple compilers/configurations and multiple OSes readly, because `tmk` is a project on my back burner, and won’t be completed anything in the short term. Code::Blocks like modern MSVC/VC++, the file format is XML driven and quite easy to modify in a standard text editor.

Installing various libraries on Windows has shown me – most developers don’t know how to create a build system. At least, most open source developers can’t seem to combine computer science 1.0.1 with Visual Studio projects.

Installing various programs on Unix systems, has shown me – many developers don’t understand autotools or it’s just to complex a build system (I vote for both).

Me, I say fuck y’all. Do it right or don’t let it leave your workplace.

And so passes another black day

I’m rather glad to be heading back to work, and happy to see the 12th go. January is generally regarded as an off month in my family… January 12th, 1989 is the day my father died, as well as my parents wedding anniversary—what a peachy combination!

While I try to respect my families history, it’s also a matter I try not to dwell on for very long. *sighs*.

Being stuck with walking around the supermarket (baah, humbug!), I tried to devote my trains of thought to Stargella. For me, it is kind of a difficult project; much more complex then most of the things I’ve worked on.

In thinking about how to structure the rendering code, I started to think more on the issue of dealing with the data sets to be rendered, which basically means sprites (2d), models (3d), and rendering the level (2d/3d), and I want as much of the code to be shared between several game projects, which makes baking the lasagna a bit involved. Since my current focus is on the 2D oriented, Stargella, I find it wiser to concentrate on sprites then three dimensional models. At first I was thinking, it would be ideal to represent animations for sprites, as a simple image stack; but I don’t want to go through all that for unanimated sprites, which would still require a singular stack frame. The fix to that is simple, only use stacks for holding the animation details! Then I was thinking, gee, wouldn’t it be cool, if we could attach some type of script or shader program to be run, so a level of progmmability could be used in implementing special effects. For example, using program to stake out the centre of a starship, split it into segments and have them drift away from one another, while interleaving it with an explosion-like image or particle effect. Simple enough to do from C I’m sure, but I would much rather have it be apart of the game data, then the game code. I’m not sure if that would be doable from mating with GLSL files, or if it would mean binding a script with the sprite. Either way, as far as general game scripting goes, it should have some level of access to the graphic stuff as a matter of completeness.

For now, I think I’ll concentrate on resource handling. It should be easy enough, just create dynamic arrays as needed (e.g. of loaded textures), and each time a new texture is loaded, assign it an unique identifier that indexes into the array; …

Honestly, I don’t have a problem with programming in C, other then it can be time consuming at times o/. But, because I have to learn OpenGL along the way, it is, shall we say a freaking lot of docs to parse.

While I’m more familiar with Direct3D then OpenGL, even if you can still get a good bang for you buck out of a DirectX SDK without having to stoop to C++, I’m not willing to write a DirectX backend for my game. Obviously, I want to avoid using glThis and glThat all over the game code, but ahem, the issue of shaders enter the picture. Short of making a definitive choice at compile time, that would have to live for the projects entitiy, the only way to support runtime choice, would also require writing both HLSL (DirectX) and GLSL (OpenGL) code, and that’s a headache I won’t put up with!  As much as I favour the idea of nVidia’s Cg, it is not available on enough platforms, and implementing it where needed, to much trouble.

If people other then me want to play the game, they can buy a graphics card made in the 21st century and install its drivers >_>.

—- this post has been interrupted so many damn rat fucking times by family, that it is unfinished and will likely always remain so. This is one of many reasons why I fucking hate my life.

Bye bye work week!

Finally finished with a nutty schedule, this week is a bit more free, although I’m still working on the weekends. Things have been erratic lately, I’m not sure if that’s a good thing or a bad thing. Honestly, I like it when things are shaken up a bit, although routine does help with planning events around working hours!

My dreams have been a rather nasty torrent lately, mixing interesting possibilities with programming, and more moribund territory. On the first, I’ll skip journaling, to the second, it’s mostly revolving around C and OpenGL, I’m even dreaming of coding these days o/, and as to the third, somethings are too grisly to be worth recollection.

I’ve managed to get everything done today, and still find about an hour or so to take a much needed ‘break’, haven’t had one of those in a coon’s age. For now, I’ll probably take in a quick game of Quake or some Raven Shield. Later tonight, I need to mull over some more of the OpenGL issues and such. Oy, scratch that, dinners on the roll. It seems, one thing that never does end, is my ability to think 8=).

All in all, I’m looking foreward to Monday—I’m off work :-D.

*sigh*

There’s nothing todo, other then pass time and work across open projects :-/. Normally I would be working today, but the snow and ice has pushed into into Saturday, which is probably good fortunate since I’m scheduled for working most of the weekend anyway o/.

I’ve all but been going stir crazy for the last couple of days, although on the productive side, I’ve had some time to study OpenGL in greater depth. Ahh, joy. Can’t even blog in peace…  hours go by through interruptions.

QOTD and a personal favorite

After stress-testing my last post on a fellow [SAS] member, he asked me if I always thought like a program, or did I used to think like a human. To which I immediately thought of a remark for first Corinthians, and adapted it to suit.

“When I was a human I spoke as a human, I understood as a human, I thought as a human; but when I became a program I put away humanish thing.”

I really don’t like to quote myself, even if it’s a rip off of something St. Paul is credited with, but I really liked that target of opportunity, lol. It was just tooo good to miss!

How he does it – Trees!

Yesterday, I was explaining to a less experienced player how I so easily knew where the hostages he missed where located, after the young Element Leader exclaimed that he was always missing hostages rather then suspects 8=). For those that don’t play with me a lot, I am that annoying-guy in the element, who can usually tell the Element Leader what rooms were cleared, which were missed, and so on. In fact, during one live op, I ended up guiding a younger EL around the huge map.

The way I accomplish this feat of meticulous memory, is to keep track of it in my brains equivalent of a data tree. By remembering where I am in the mental tree (I have an excellent sense of direction), I know what the neighbouring nodes are in the tree—and if I forget what is after those, by the time I reach the spot-after, I can compare what I see with a ‘snap shot’ stored in my head, to trigger my brain into remembering where we’ve been before. If we’ve never been there, then obviously, I append it, or if it is an unexplored door, mark it as such mentally.

 I’ve been thinking of putting up a diagram of it for some time now, so here goes, lol.

This is a diagram of a fairly simple building, it contains a starting room (1), a large room (2) with a hostage and two terrorists: three doors connecting to two other rooms (3 and 4), containing terrorists and a hostage. Those rooms (3 and 4) connect to a final room (7) by way of hallways (5 and 6, respectively), and contains a hostage.

It is a very simple diagram, so I doubt anyone will have problems understanding that, because if you do, there is a problem with your map reading skills ^_^.

The way I navigate in side a building like that depicted in the above diagram, is storing each element as a “Leaf” or node in a tree, itself being a tree in my minds eye. Each node is a reference in my brain, telling me what door( node)s connect it to other rooms, and what was found in it (in this case, hostages and terrorists). Those in turn, point to other nodes or leaves of the tree, creating an organised pattern, shown below:

Here you can see the nodes are again labelled, matching to their “Room number” from above. I don’t mentally record room numbers, rather room names, but for sake of examples, I find numbers simpler to explain.

The first node (1) references a single child node (2), which as you can see, contains two terrorists and hostage, and references three door( node)s leading to the adjoining rooms—exactly as in the floor plan I drew earlier. To make it more obvious, I wrote X->Y on the nodes representing the doors, denoting where they lead to. The door( node) 2->4 takes you into room 4, from room 2. Just like in the floor plan, room four contains a terrorist and a door to a hallway (6), The two door nodes, 2->3, lead into room 3 from 2, where room 3 contains two terrorists and a hostage, again exactly in the floor plan diagrammed previously. The hallway( node)s (5 and 6) connect rooms 3 and 4 to room 7 (respectively), and room 7 contains a hostage.

This is actually a simplification of how my mind works, a since my mind notes doors, hostages, terrorists, downed team mates, objectives, important events, etc, as the children of a tree leaf, and the doors reference the next leaves. That however, is only of importance to another programmer :-o.

Since my head keeps a running track of where I am, and I know easily if I started in room 1, walked into the next room (2), and took the single door into another room, that I must be in room 4, and the door ahead leads to the hallway (6) connecting with room 7. The data tree (i.e. second diagram), is mental abstraction, showing (very roughly) how my mind views the relationships between elements of a map (e.g. the first diagram). So in essence, navigating inside a building, is a simple matter of scanning the tree in memory, and vola, I know exactly how to get to X from Y, lol.

This is how I navigate in doors, and it works damn well, certainly works better then asking a terrorist for directions! Because my working conditions place me inside buildings quite a lot, it has been necessary for my senses of navigation and deductive reasoning to adapt accordingly. I almost never get lost, just don’t ask where you left the swiffer duster. Even navigating outside, my roads-view isn’t street sign or land mark based, but closer to watching a overhead view on a HUD map from some video game…. I blame it on so many years behind a controller.

Lacking the knowledge of how the human mind operates, I’ve always found it easier to explain things in relation to a how a computer does its stuff…. because honestly, my mind functions eerily similar to a computer as it is… but hey, I am a computer geek!

The last couple of days have only been marginally productive :-(. The infrastructure for Stargellas console is virtually complete, except for the prerequisite renderer code. Soon it’s time to move on with the usual loop, progressing to [SAS] related projects, then cycling to EPI, and back again to my usual loops.

My dreams have been someone erratic lately, but so far, have remained quite consistently the opposite of whatever I’m thinking about when I drift off to sleep. I’m not sure if that’s a good thing or not. It seems no matter what, it’s virtually impossible to sleep without thinking, short of working myself to exhaustion. While maintaining a deep holmesian focus seems to be great for pushing everything out of mind, keeping that up for more then a few weeks is staggering :-/.

One good thing to come of today in particular, was scoring a 95% on the driver’s practice exams on the relevant state website. I can’t help but wonder, if some of the multiple-choice answers were intended for evaluating brain damage, but hey, maybe I’ll pass it. I’ve also found out that out here at least, being in my current age group, I could forgo the learners permit and skip straight to an exam for a full driver’s license, but rather would prefer the proper chance for learners-time. Although, I still expect family to fsck me in the end o/.

A fairly full work week is starting off tomorrow (the one luxury of being off Mondays, is work begins Tuesday). If it wasn’t passing 02:22 local time, I think I would grab a snack and read the a few standards cos, but alas, time to hit the hay, eh, pillow.

Ahh, Stargella moves foreward

I’ve just made a forum posting, starting an open query for any artistic talents interesting in helping to contact me. My main concern at the moment is working out the games design bible while finishing off the Georgia drivers guide >_>.

Most of the code for Stargella is going to be reused for the later first person shooter and ‘mech projects (which may just get released years before the new MechWarrior lol). While the shooter is going to be a 3D affair, and the ‘mech combat game is undecided, the star fighter game (Stargella) is fairly straight forward: 2D is the only way to go. At least without getting sued for recreating Star Fox, if I dared try it in 3D lol. At its heart, Stargella is about having fun, the kind of fun that existed before the move into 3D games. I largely missed the big classics like Battlezone and Asteroids, only getting to play them in later years, but Galaga was a game I did play as a child. Its always been something I’ve found missing, no modern incarnation I’ve had access to just itches the right spot, that’s where Stargella comes in: it’s gotta be fast and furious, like an nail biting round of Centipede. Yet it’s got to something you can actually play and survive with some mastery, like Asteroids (one of my great favourites btw). Most of the games I played growing up, were side scrollers like Super Mario Brothers and Sonic the Hedgehog, so I remember the mechanics quite easily.

Graphics are my achilles heel however, because while I can code what I want, making it ‘look’ that the way I want, is limited by the models that can be created for the game to display. In fact, I’m actually thinking of drawing most of the ships for Stargella, and scanning them into the computer. Really it has been a long time since I’ve done free hand drawing, it feels more natural to me then the computer: I can work FASTER!!!

For Stargella, I very much know what kind of look I want, the question is can I get graphics that match it without the whole thing looking like the early arcade games, lol. I reckon that I could always hash things out in a modelling program and get a head start on code needed for the 3D titles, but I feel that is just over kill for a game like Stargella.