- Contents
- About
- Submissions
- Feedback
- Archives

volume 1, issue 19

Today in loonygames:

New!! The Archives have been cleaned up, fead links fixed, and printable versions restored! Also, don't miss the new comments on the front page!

Livin' With The Sims: theAntiELVIS explores the wild and wacky world that is Will Wright's The Sims, asking the inevitable quesiton, "is The Sims the first step toward a virtual life where everyone is Swedish?"

Pixel Obscura: Josh Vasquez on Omikron: The Nomad Soul.

Real Life: Check out our newest comic strip, Real Life! Updated daily!

User Friendly: Updated daily!

Related Links:

Microsoft's Visual C++ SP3: You'll need this if you want to follow Chris' code.

This Week's Code: The latest code from "Madness", Chris Hargrove's work in progress (193k).

Microsoft's DirectX SDK: Required to build the files.

The CotC Message Board: Run by an avid reader of Chris' column. Chris himself posts often, making this a great resource for the newcomer.

Feedback:

You've got an opinion...voice it! Drop a line to our Feedback column...you could end up with a free T-Shirt!

Random Feature :

From the Mouth of Madness: Our loony editor's take on all the latest news.

Search the Archives!

Code on the Cob:
The Sounds of Madness




By Chris "Kiwidog" Hargrove

Download this week's code files: cotc10src.zip (193k)

Be sure to read the license agreement before using the code.

"Every babe that weeps at your approach, every woman that cries out, 'dear god what is that thing!' will echo in your perfect ears." - Wesley, The Princess Bride

hought you'd gotten rid of me? :)

As you can guess from the title, today I've added a small sound system to the codebase.  After all, this wouldn't be a game project without sound, now would it?

For those of you who are wondering when I'm going to be finishing the DirectDraw stuff, remember I told you there was going to be another "interim" article before I went back to that topic, and this is that article.  So I haven't forgotten about DirectDraw, it just hasn't had the focus (bad pun intended).

Anyway... what was I saying?  Oh yes, sound.  Even though the project now has sound code in it (with the addition of four files, snd_win.* and snd_main.*, as well as a new linkage to dsound.lib), I'm not going to spend much time in today's article explaining the internals of it.  Like I said last time, you're grown-up boys and girls now, and you can read the code on your own.  There's nothing particularly tricky in the sound system as it stands; snd_win holds the DirectSound-specific stuff, and snd_main is the primary interface.  DirectSound is actually one of the easiest DirectX APIs to work with (unlike several others), and implementing support for it is pretty straightforward.  Everything pretty much goes through DirectSound's "Secondary Buffers", and that's about it.  Once you're past that point, the control structures used at a higher level are generally up to you.  In my case, I've written the sound system (by sound system I mean pure "sounds", i.e. sound effects, not music which is a separate thing) to do everything through sound handles and play handles at the lower levels, and then sound slots and resource manager IDs up in the main section (that's right, the resource manager rears its head! :)  All in all the implementation is pretty straightforward, with snd_win.cpp being no more than 500 lines.

So there's not much to talk about in the sound department, and I'm going to keep this article short and to the point as a result.  But first I'm eager to discuss the game project itself, and our plans for it.  Today COTC hits the magic article number 10.  With the addition of sound, the soon-to-be completed graphics subsystem, and networking not far down the pipe, it's starting to get close to game time.  So I've been working up some ideas in my head, and I've taken suggestions from people as often as I possible.

The preliminary decision is to go with a small-scale strategy game, with less complexity than RTSs but still plenty to go on.  I'm thinking along the lines of "Worms2 meets Archon" if you know what I mean.  We're currently on Article 10, and my goal is to have a small game of this form up-and-running and reasonably solid by Article 20 (if not entirely polished, remember there's only one guy on this project), at which point things will get wrapped up.

So, assuming there's about 10 articles targeted until completion, what all would you most like to see work its way into the project?  You can figure that at least 5 of those articles are definitely spoken for, but there are several left over that might be open for additional features or topics of coverage.  What would you like to see dealt with?  Anything in particular you'd like to see make it into the game?  I'm all ears; drop me a line or post a message on COTC message board and give me your thoughts.

Until next time,

Chris Hargrove

- Chris"Kiwidog" Hargrove is a programmer at 3D Realms Entertainment working on Duke Nukem Forever

 

Credits: Code on the Cob logo illustrated by and is © 1998 Dan Zalkus. Code on the Cob is © 1998 Chris Hargrove. All other content is © 1998 loonyboi productions. Unauthorized reproduction is strictly prohibited, so don't do it, or we'll chmod you unexecutable.