Dungeon Quest


Description

       Dungeon Quest is a game created in XNA developed within 4 days at the GDC 2007 XNA Challenge. It is a relatively complex 3D role playing game, that even supports coop multiplayer on the Xbox 360 via split-screen. The game was developed by Benjamin Nitschke and Christoph Rienaecker. The full game, including all textures, 3d models, sounds and source code was made in just 4 days directly at GDC 2007 in the lobby (man, that was loud). Some of the engine code was based on Benjamin's previously released XNA code (mostly the XNA Rocket Commander game engine and the Collada Model Loader).

"When we heard about a four-day development competition, we thought we could do something simple, but that wouldn't be as cool." 
--Nitschke explained.

       Reinacker handled the art while Nitschke handled the heavy coding. Dungeon Quest shows some impressive texture and lighting effects in a fully navigable, if empty, world after just a day and a half of work. The game is a very much simplified example on how to create an action rpg game with XNA. When most programmers are faced with developing a game from the ground up in four days, they go for a simple concept like a 2D shoot-'em-up or platformer.  Feel free to use this code in your projects

Made by Benjamin Nitschke (abi@exdream.com) and Cristoph Rienacker, 2007-03-16 (c)



Sreenshots 

 




Video



Note: This game requires a Shader Model 3.0 GPU as it was build for the Xbox 360 and optimized that way. For lower end PCs it pushes way too many polygons each frame anyway so that it will be too slow. If you have a low end SM 3.0 GPU (like the Nvidia GeForce 6600), make sure you run in a lower resolution (see below for details).


List Improvements Benjamin made after the contest:

  • Improved performance a lot by optimizing some internal code and using all ps3.0 shaders now (sad thing is it only runs with ps3.0 hardware now).TIPP: If you have a low spec ps3.0 graphic card (like the GeForce 6600 or lower) use a smaller resolution, the game will run much faster. Use the DungeonQuestSettings.xml file and enter a smaller resolution there (e.g. 800x600). The game is heavily GPU bound (like all my games) and it pushes several million polygons each frame (scene alone has almost a million polygons, but it has to be rendered 3 times for all shadow mapping and post processing effects). Runs on XBox 360 or GeForce 7x hardware very good with 100fps and more.
  • Fixed parallax mapping for the cave and improved the specular effects, looks much nicer now. Also increased view distance and light affect range.
  • Improved the music and sound effects, also added a lot more events and little sounds.
  • Added many text messages to help the player understand the game better
  • Check if computer can do ps 3.0, else shows big message on screen.
  • Support for 64 bit systems (did not start before)
  • Reduced glow in post screen (see comments of beta version)
  • Fixed game logic and quests (did not work at all in the beta)
  • All game actions get a nice message now in the center (killed ogre, got key, quest complete, new weapon, etc.)
  • Implemented several new animations for hitting and dying
  • Fixed text size in 3:4 resolutions (did only look correct in 16:9)
  • Improved gravity (much stronger now) and fixed several collision bugs
  • Fixed collecting key, added it to the UI and also allowing dropping weapons now
  • Allow switching weapons (right/left shoulder buttons or Q/E or Mouse wheel)
  • Selected enemy ring to help you see which enemy is attacted
  • Rumble Xbox 360 controller when hit/getting hit
  • Added end screen and credits with book link, credits
  • Improved weapons, damages and made the game more balanced.
  • Show high score list when game over
  • Mouse support for dungeon quest (shooter like, just asdw for moving)
  • Block door when we don't got key! Also added sphere collision for monsters (they don't intersect anymore)
  • Fixed shadow mapping and added a lot of cool shadow effects and pseudo point light sources.
  • Added nice looking vista compatible icon, also tested the whole game on vista, runs fine :)
  • Added some grunt sounds and an ambient theme in the background!
  • And many more ..

Structure of the Project
       If you want to drive into the source code I highly recommend starting all the unit tests in Program.cs after checking out the directory structure of the project:

  • UIManager.TestUI(); Show the graphical user interface of the game (boxes for health, player values, rpg levels, etc.)

  • ShaderTests.TestNormalMappingShader();Test the normal mapping shader, for more shader tests check out the XNA Rocket Commander and XNA Racing Game projects.

  • ColladaModel.TestCaveColladaModelScene();This tests the big cave collada file (80 MB) and renders it with the cave shader. Looks very nice.

  • ColladaModel.TestLoadStaticModel();This is straight from the SkiningColladaModelsWithXNA project from February. This test show shows a static collada model.

  • AnimatedColladaModel.TestPlayerColladaModelScene();Also from the SkinningColladaModelsWithXNA project. This shows the player or the goblins running, dying, staying, etc. This is a useful unit test to test animations for skinned collada models.

  • PostScreenGlow.TestPostScreenGlow();Test post screen glow, more details can be found in the Rocket Commander tutorials and most of my XNA projects. 

  • PlaneRenderer.TestRenderingPlaneXY();Test to render a plane on the ground, which is also used in some other tests. Also good for testing shaders.

  • ShadowMapShader.TestShadowMapping();Test Shadow Mapping unit test, pretty complex stuff, but kinda nice for this game. More details can be found in my book, this is a complex topic and involves a lot of fine tuning to get it right.

  • EffectManager.TestEffects();Since Dungeon Quest uses some effects for fire, smoke, blood, etc. it has a simple effect system build in. Use this test to see whats possible and to extend the effect system.

  • StringHelper.TestConvertStringToFloatArray();An example of a dynamic unit test, which can also be started from NUnit or TestDriven.Net (right click if you have the addin installed).

  • Sound.TestPlaySounds(); And another test to play the sound effects used in the game, just press A, B, 1, 2, 3, etc. to play sounds. 

  • ColladaModel.TestCaveColladaModelSceneSplitScreen(); This test shows how the engine supports split screen support, but it was never fully implemented into the game itself yet. To finish this the game logic + handling input from 2nd player has to be implemented.



Source Code
       Please note that the level was reduced to allow loading on the Xbox 360 (which otherwise crashes with an OutOfMemoryException), the game is not fully playable, only the first part is implemented. You can also press F2 to toggle the Options menu and some minor bugs were fixed. 

XNA 3.1 Version