Wednesday, June 29, 2011

How I Done It

I got the example code compiling properly and I can move on. In order to get here, I had to:

#1. Add the paths to DirectX's Include and Library directories to the solution's property sheet

#2. Change the name of the file "dxerr9.h" to "dxErr.h" because "dxerr9.h" has been deprecated since the time the book came out

#3. Change this:

for( DWORD i=0; i<m_dwNumBuffers; i++ )

to this:

DWORD i;
for( i=0; i<m_dwNumBuffers; i++ )

#4. Make a copy of "dxErr.h" in the same directory and rename the copy back to "dxerr9.h", because apparently it needs both versions? OK, sure.

This kind of mess is starting to not surprise me anymore, I wonder if that's a good or a bad thing. Also I shudder to imagine what this would have been like in the days before you could Google for any conceivable output error.

Tuesday, June 28, 2011

Dearest Microsoft . . .





. . . I've tried, really I have. Note: this post will not be full of triumphant useful goodness so feel free to skip.

I've recently had an opportunity to pick the brains of some folks making games with a lua-based framework, and it became quickly apparent that my innate lua skills ("It's like Python, right?") were just not going to cut it, so I started looking for some Dead Trees to inspire and educate me. Game Development With Lua (Paul Schuytema / Mark Manyen) looked like just the ticket, and I ordered it from Amazon with high hopes, ready to dive in.

Great book, none of my issues are the authors' fault, but . . I didn't realize that in order to follow along with the lua game-making tutorials, the reader should know his/her way around C++, as you need a C++ project to be the code base for implementing lua logic. *Gulp* but OK, not entirely unexpected, and thanks to XNA I can find my way around a Visual Studio project without being totally lost. Fine and good! Let's load up the source code from the handily-provided CD, build it, and start scripting!

VS needs to convert this 2005 code, again not much of a surprise, things move fast in .NET land. Let it do its thing.

Oh, it needs some DirectX SDK files, OK, we'll grab the installer for that.

Hm, when I build the book's projects, they aren't finding the DirectX files they need, even though I have the DirectX SDK installed . . looks like a job for the internet!

OK, cool, other people have had this problem. Looks like I just gotta add some paths here, change some settings there . . .

No, huh? More internet sleuthing . . .

Oh, searching on the error messages tells me some of the code from the book has been deprecated! Some helpful devs have offered workarounds and substitutions, which would be great if I was comfortable and fluent changing, updating and repairng C++ projects on the fly.

Oh yeah, if I was comfortable and fluent changing, updating and repairng C++ projects on the fly I would probably be employed as a programmer and wouldn't be doing any of this.

Look, I love to learn, but every time I get an error in a Microsoft product I have to descend into a thicket of internet rumor, conjecture, and neckbeard know-it-all-itis, and I did so for hours upon hours and still can't build the project that will allow me to practice my lua.

Here's the thing: as smug as the experts might be about this, its a problem. I feel like there is an attitude in the video games industry that says that anyone who could not solve this set of problems trivially has no place in a pro studio and should "go back to school and get a CS degree". I see this attitude all the time online, and my experience tells me it holds true in the Real World.

And yet at the same time, gamers gripe and complain (and rightly so) that characters are one-dimensional, plot twists lack credibility, dialogue is stilted and wooden, "story" is either unsatisfying or completely absent.

If the barrier to entry includes endless navigation of arcane, badly versioned, poorly documented development software like Visual Studio Point-Oh-It-Doesnt-Work-With-Last-Years-Code, then yes, the only people qualified to work in video games are going to be hard core coders with the skills to plow through this bullshit and find a working solution in this mess of broken crap.

Some would say that's a good thing, but I don't think so. The industry has suffered because writing and design is done by people who are hardcore coders, with no skills or experience in writing or design. Why? Because they are the ones allowed in the door. I'm motivated, I have a killer work ethic, I'm smart, and I'm fucking stuck because the example code in a five year old book doesn't work anymore. Thanks MS.

Monday, June 13, 2011

I'm an object factory (a lua poem)*

I'm an object factory ( parameters )
   
    I make a new Prop2D or whatever when the factory is called
        with ( parameters passed in )
    end construction
   
    I give each one of these created props some built-in abilities
       
        maybe it can modify its own appearance
        then delete itself
        and instructions about how it behaves in a thread (self:stop)
       
        maybe it can blink, or spawn other objects
        or who knows what
        and instructions about how it behaves in a thread (self:stop)
       
    end built-in abilities
   
    I'm the main function for any given instance of the prop built in this factory
        in certain circumstances, I may
            execute one of the built-in abilities described above
        or in other circumstances I might
            change some quality about myself, or create or delete a quality,
            or who knows what
        end circumstances

        when I'm done I'll pass control to another process until it's my turn again
        I could also return some information about my current state       
    end main function
   
    Here's the thread itself
    Please run this thread now
   
end factory


*have I finally gone off the deep end?

Monday, June 6, 2011

WHY U NO UPDATE BLOG?

I have put Skeleton Wizard aside for the moment! I know that's a bummer, I feel a dull ache myself every day I'm separated from the Purple Dude. As fate would have it though, my dev energies have been diverted down a different path, just for a short time I promise . . . if I'm able to get a handle on this new thing I may have to port my work so far.

I'm talking about a lua-based game development system called MOAI that I'm trying to learn by creating clones of some simple old games. More on MOAI later, but lua itself is kind of dumbfoundingly cool - while trying to pick up some basic concepts I resorted to just kind of typing in what I basically wanted the program to do, with some loose approximation of the syntax in some example code, and it just works, this is from somebody with less than a year's programming experience and I feel like I can talk to lua like it was my college roommate. Fundamental quality of the language, or just a sign that I'm getting slightly less dumb about code conventions? Little of both?

So I'll be modeling paddles and such for a bit. Been watching some youtubes about classic games from this guy Matt and I'm psyched to make something like the Atari Adventure, just so abstract as to be almost totally incomprehensible . . . I mean, how the hell did anyone ever figure out what was going on in that game?