Wazoo Enterprises

Having fun in game development!

Archive for February, 2008


When is it time for a real “shakeup” in Azeroth?

While Blizzard has been incredible about consistently adding / tweaking “original” content in the 1-60 areas of World of Warcraft, I find that the “old world” is still feeling quite static and stale. The same mobs of the same levels are in the same locations. While loot that mobs are dropping is occasionally tweaked, the mob itself really isn’t. Most of the areas in the capital cities are just pretty “dead zones” of NPC’s who are desperately trying to, but failing miserably, compete with the local Auction Houses which have made their services sub-standard. And Guard Thomas is still an annoying weakling who can’t even take down a Bear, yet somehow commands a garrison of troops near the Eastvale Logging Camp!

In short, I would love to see some “shakeup” in Azeroth! What a way to keep players leveling new toons to experience new changes! I have a small list…some are definitely “major” while others might be real easy 2-week modifications.

* Illidian’s forces are annoyed at his destruction! In retribution they pound an Alliance (and Horde) capital city to DUST. Of course I would be willing to compromise here, and accept 80% of the city being nothing but rubble. After all, we still need access to the AH!

* Is the King of Stormwind still kidnapped?! In the human area, there’s a long quest chain “The Missing Diplomat” which reveals that the 12-year old King of Stormwind has been kidnapped. To my knowledge there is no resolution to this chain. It ends with you notifying Lady Proudmoore (I think it was) of his disappearance. Whoop-Dee-Doo. Let’s get a raid instance going in the old world with the target of rescuing the 12 year old whippersnapper!

* The Defias gang near Stormwind, expand their influence and attract better recruits. In short, they got the shaft from the rulers of Stormwind and want their just due! Stealthed Defias rogues regularly enter Stormwind and attempt gankings of players.

* It’s been 3+ years, and still the class trainers aren’t available everywhere. With the amount of droods swarming the realms, why do I still need to trek all the way back to Darnassus to update my skills?

* Randomly swap mob groups with other mob groups in a “mob exchange” program. The mobs now bored of the human areas can find new vigor in the sunny Barrens with a level tweak, while those creatures who just haven’t been cutting the mustard against players in the 40+ zones (such as Feralas) are demoted to “noob” status and locations in the starting areas.

* Expand the catacombs under the Raven Hill Cemetary to be a new level 25-35 instance of angry undead bastards that want to eat your brains! There’s no real instance to do in this level range, other than ShadowFang Keep (which takes forever to get to). I’d love to see something else between the Stockades and Scarlet Monastary!

* Shopkeepers strike back! Randomly allow a weapon shopkeeper to sell a blue item! The food dudes start offering food choices that help to act as small temporary buffs…perhaps some NPC’s want to provide enchanting services!

* Better yet, allow players to rent tents in the marketplace to sell their wares / services. The local rulers will charge a monthly fee (of 20-30g or whatever) but provides another way to find the enchants / engineer / tailoring stuff.

DXUT - EmptyProject

Empty Project

This tutorial is an introduction to getting a bare-bones DirectX9.0c
application configured and running. Note: While we could get started
on our own class framework to take care of the lower-level Windows initialization
for us, there really isn’t much point if the goal is to just learn
the beginning tasks of using DirectX.

EmptyProject == Hello World

For our basic “Hello World” type of tutorial using the DXUT framework, we’re going to create an
empty shell of an application which will:

  1. Launch the app and handle our registration with the Windows OS
  2. Query our video hardware to create a default Direct3D device
  3. Display a solid blue background to the monitor

DXUT

The DXUT (or my own nickname, the DirectX Utility Toolkit) set of classes / methods is a result
of feedback from the DirectX common framework that was included with the
DirectXSDK in 7.0 and 8.0/8.1. As with the previous common frameworks,
the DXUT is meant to be a quick way to spin up access to DirectX. However, instead
of using a class framework approach, where the developer must inherit from
a class such as CD3DApplication, the DXUT system revolves around using
a callback mechanism. The strength of this approach is that you can just about
drop DXUT right into an existing engine without too much work, whereas the
CD3DApplication approach might be incompatible with your current game’s engine.

The two other significant points about DXUT is that:

  • Unicode The project must be compiled to support the Unicode character set, opening up
    your project to multi-language environments.
  • Uses the D3DX helper library as a DLL For this reason, it’s important the
    properly version of DirectX9.0c is also installed on the client’s machine that you
    wish to deploy to.

Winmain - Launching the application

Every Windows application from games to business applications need to register
themselves properly with the Windows operating system, in order to fit properly
into the Windows event model of operations. The first step of this process
is to always define a WinMain entry point into your application.

INT WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
{
    // Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif

    // Set the callback functions
    DXUTSetCallbackDeviceCreated( OnCreateDevice );
    DXUTSetCallbackDeviceReset( OnResetDevice );
    DXUTSetCallbackDeviceLost( OnLostDevice );
    DXUTSetCallbackDeviceDestroyed( OnDestroyDevice );
    DXUTSetCallbackMsgProc( MsgProc );
    DXUTSetCallbackFrameRender( OnFrameRender );
    DXUTSetCallbackFrameMove( OnFrameMove );

    // TODO: Perform any application-level initialization here

    // Initialize DXUT and create the desired Win32 window and Direct3D device for the application
    DXUTInit( true, true, true ); // Parse the command line, handle the default hotkeys, and show msgboxes
    DXUTSetCursorSettings( true, true ); // Show the cursor and clip it when in full screen
    DXUTCreateWindow( L"EmptyProject" ); // Make sure the string is converted to UNICODE using the L
    DXUTCreateDevice( D3DADAPTER_DEFAULT, true, 800, 600, IsDeviceAcceptable, ModifyDeviceSettings );

    // Start the render loop
    DXUTMainLoop();

    // TODO: Perform any application-level cleanup here

    return DXUTGetExitCode();
}

This is the “core” of a DXUT app; configuring the callback mechanism. Through the use
of a concept in C++ known as function pointers, you can just about drop
any function declaration into this method (provided they follow the base template
of course).

For example, take a quick look at our OnCreateDevice function declaration in the code…

//--------------------------------------------------------------------------------------
// Create any D3DPOOL_MANAGED resources here
//--------------------------------------------------------------------------------------
HRESULT CALLBACK OnCreateDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext )
{
    return S_OK;
}

So whenever the DXUT processing core hits the DXUTCallbackDeviceCreated function, it
is now pointing to the one declared in your application. Easy peasy.

Most of the DXUT framework appears similar to the virtual function methods provided
in the DirectX common frameworks of DirectX7 and DirectX8.0/8.1, so about the
only other interesting thing in this “EmptyProject” is the rendering callback,
OnFrameRender.

void CALLBACK OnFrameRender( IDirect3DDevice9* pd3dDevice, double fTime, float fElapsedTime, void* pUserContext )
{
    HRESULT hr;

    // Clear the render target and the zbuffer
    V( pd3dDevice->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_ARGB(0, 45, 50, 170), 1.0f, 0) );

    // Render the scene
    if( SUCCEEDED( pd3dDevice->BeginScene() ) )
    {
        V( pd3dDevice->EndScene() );
    }
}

There isn’t really much more than that. The sample code chooses a default display mode for our use, but
you can leave this out if you want to force the user to select their video settings.

Further “tweaks”

In the current version of the sample code, if we’re specifying that we want a windowed device, then we
set the display parameters to match the width and height of the device. If we want a fullscreen device,
then we simply use the default parameters that we chose in the DXUTCreateDevice core.

DXUTCreateDevice( D3DADAPTER_DEFAULT, false, 800, 600, IsDeviceAcceptable, ModifyDeviceSettings );

That’s it for this lesson. We covered some of the basics behind the DXUT objects
which is a different approach from the class framework system used in the DirectX7
and DirectX8.0/8.1 SDKs, and we were able to get our first “Hello World” application up and running!

Download

Download the project files here: dxut-emptyproject

Feedback? Comments?

Either comment to this posting, or use our contact
form
to get in touch with us.

Autistic Heroine resurrected through the computer

I don’t really try to share the fact that my oldest son is registering on the Austism spectrum, just because I’m not a huge believer in broadcasting my thoughts and anxieties on a blog as some type of therapy. There’s enough people out there who do that already, (and all the power to them).

My son is 6 years old now and classified (loosely) as “Pervasive Developmental Disorder - Not Otherwise Specified” (PDD NOS) which looks like a “catch-all” category for autistic behaviors that don’t slot into the spectrum “cleanly”.

Anyways, we’re just starting to make some real progress with him, and my wife and I were really excited to read about Carly, a 13-year old Autistic child who can now communicate with “us” via the computer (after 10 or so years of silence). She shocked everyone around her when she picked up enough typing skills on a computer to bang out what’s going on in her mind.

(”Resurrected” may not be entirely accurate…from the article it sounds like she’s
always been articulate and intelligent..I’m just using the term because she’s suddenly
“come to life” in a lot of ways to those who have been loving and nuturing her since
birth.)

Now designing games based on “Fun” not “market influence”

While work continues getting all my content migrated into the website, my thoughts have turned back towards the game projects I had wanted to actually tackle and accomplish.

I’m at the design-point now where I’ve scrapped all of my previous commercial game projects, and am starting with a fresh blank slate. My only goal is to start working on “fun” games as opposed to spending too much time worrying about “market influence”. In the past, I had spent too much time analyzing market trends in terms of game genres, platforms, languages, etc., that I let these things guide my hand much more than they should have. In the end, all it did result in was Analysis Paralysis. Basically from a marketing perspective, “every” avenue was the “right” choice.

As a smaller Independent game developer, our real power IS this ability to chuck the norms that bind and strangle the bigger game houses who are strong-armed by investors into churning out products based solely on the current market trends.

I don’t at all intend to throw away everything I know (that would be plain silly), but I do intend on placing much less of an importance on that type of research and just go for it.

Basic SoundFx

Purpose

No matter what the game you’re making, the use of sound is essential. A popular sound library for the SDL family is SDL_Mixer. It’s an easy-to-use sound package which can handle many audio file formats. A popular one is the “WAVE” format introduced by Windows. Here’s how to play them with SDL_Mixer and the PeonSDK.

Downloads

The project files are available here: PeonSDK-BasicSoundFx