Categories

Navigation

MVP

Microsoft MVP (since 2006) in the XNA/DirectX category

Tag cloud

Ajax (8) All (206) Arena Wars (21) Boo (4) BroodWar (8) Conferences (1) Development (44) Game Development (142) IronPython (3) Lost Squadron (17) Lua (6) meinSport.de (4) Other (150) Polynapping (12) Programming (156) Racing Game (7) Reviews (76) Rocket Commander (49) Silverlight (10) SQL (1) StudiHelp.de (2) XNA (40)

On this page

Lost Squadron, Week 3, Day 2: Getting back on track
Lost Squadron, Day 14: Effects and Game Unit Testing
Lost Squadron, Day 13: One week more plz ^^
Lost Squadron, Day 12: Back to the game
Lost Squadron, Day 11: Another day with the shaders.
Lost Squadron, Day 10: Editor finished
Lost Squadron, Day 8: Editor and more UI controls.
Lost Squadron, Day 7: Still struggeling with shaders.
Lost Squadron, Day 6: And there were lights.
Lost Squadron, Day 5: Exciting stuff soon ^^
Lost Squadron, Day 4: Why can't I just press start and play?
Lost Squadron, Day 3: No screenshot today.
Lost Squadron, Day 2: Looking good right now.
Lost Squadron Part 1: Daily development screens
How to write a CodeRush plugin: Commenter helps you to comment your code
Arena Wars Website Update

Archive

Popular

NormalMapCompressor v1...
CR_Commenter v1.7 Upda...
Reminder: Rocket Comma...
Your Christmas Present...
CR_Commenter Update v1...
The year 2005 - Review...
Seattle Day 3 - XNA Pr...
NormalMapCompressor - ...
Zombie Quest - A new f...
Cool tools
My Bookmarks
CeBIT 2006 Pictures

Blogroll

Projects

Arena Wars (2004)

Rocket Commander (2006)

Pizza Commander (2006)

Rocket Racer (2006)

Coop Commander (2006)

Flower Commander (2006)

Fruit Commander (2006)

Euro Vernichter (2003)

Lost Squadron (2005)

Zombie Quest (very simple 2D Adventure, 2006)

Freifunk Hannover project (GoogleMaps support)

Older projects (2000 and earlier)

MeinSport.de - German Sport Community Site

About

About me: Contact

Send mail to the author(s) Email:

Total Posts: 213
This Year: 0
This Month: 0
This Week: 0
Comments: 434
Made with

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

My brothers

netfreak.de

mirkman.de

Sign In

 Wednesday, December 29, 2004
Wednesday, December 29, 2004 11:42:35 AM UTC (  |  |  |  |  )
Omg. I have become a total slacker the last couple of days, no updates here :( I didn't had much time over christmas to code, but I read some more of my Rapid Development book (abi/blog/PermaLink.aspx?guid=42bdcd49-2490-4f60-af1c-3ff54c1be1d1">see last post) and it is still interessting and insightful. Yesterday I still was in vacation land and had to force myself to get back to coding ^^

I also reconsidered some choices I made and came to the conclusion that this project was originally started to make a quick little game with DirectX9 in c# and also to write a new base engine for upcoming DirectX9 projects. I did obviously spend too much time researching shaders (DirectX9 fx high shader language) and saw last week there is no way to implement that nicely in 2 weeks (when the game is running with all the other parts finished I will reconsider implementing shaders). For the engine part of the deal this is still great work and I have a lot of base classes for any shader effect development ready, but for the "quick little game" Lost Squadron part it is not looking so good. It is a conflict of interests because finishing up something quickly does not work hand in hand with researching and implementing new techniques. For this project I think it is better to focus on developing a solid base engine, next project will be planed much straighter.

Yesterday I collected a lot of effect graphics and sounds and made some new ones. I got now a nice collection of effects with graphics and some funny sounds for the effect engine and made a couple of effect types (parameters, testing, etc.), but when adding more and more effects it became very obvious that this would be a great think for scripts. Instead of hating myself later for not using scripts right away, I just went crazy and implemented the whole effect system in LUA scripts and can add new effects there without changing any code of the engine. I did the base code for that a month ago (check out LUA.NET for doing that in c#) and have read the great book Programming in Lua by Roberto Ierusalimschy.

LUA links in case you are interessted:

The effect engine needs still some testing and I haven't worked with lunit yet (will do that tomorrow), everything should be up and running tomorrow and I will post a new screenshot with some nice effects then. The rest of the base classes except wayfinding and enemy ai is also pretty much complete, so I hope I can finish up a small demo till New Years Eve (driving around, shooting at some stupid enemies).

Sorry for no screenshot today and sorry for the long pause. Fabian is ill (my intern helping me out a bit with Lost Squadron), hope you get better till next week :) Tomorrow the LUA effect engine should work and I will post a screenshot of the actual gameplay finally (I want to kill some stuff).

 Friday, December 24, 2004
Friday, December 24, 2004 9:43:25 AM UTC (  |  |  |  )
First of all: Merry christmas to everyone and thanks for reading all this stuff, my page views increased a lot since I do this daily series.

I spend the last couple of hours trying to get Unit Testing on the engine level to work and I finally got now everything up and running. This is really one of the greatest things ever in Game Development IMO! Normally I would spend a lot of time changing code to just test stuff or even write small test application only to check the behaviour and graphical output of effects, newly imported textures or models or new game features. Now I can just write a VERY short Unit Test for that INSIDE my project, no more extra projects, no more messing around in the code.

Just to make this clear: This is not a usual Unit Test like in other parts of the engine, like when checking file input/output, internal methods or some logic issues. These Game Unit Tests (thats how I will call them from now on, or just GUT, which is german for good ^^) give you all the features and easy testing possibilities like normal unit tests, but you can initialize the whole engine, see visually whats going on and shut down everything automatically or by user input. Let me give you an example how this looks:


Note: This code uses .NET 2.0, if you want to read about Anonymous Methods click here.

Same thing is of course possible with a couple of lines more code when not using Anonymous Methods (using Events or just duplicating the code in TestInitEngine). This code will create all the stuff required for the game engine, then execute the initialization code to create the effectManager. Then it will proceed to the game loop and execute the render code each loop there, everything will be shut down if the user quits the form, presses some key or if we set a timeout to quit automatically. There is a lot of hidden code behind all that, but this is exactly the code executed when just running the game and testing that is always good :-)

In the next 2 days I will not code much (visiting family, chrismas, etc.), but I will to read 2 nice book from Steve McConnell: Code Complete 2 and Rapid Development. I already read a couple of pages of Rapid Development and it is really written good and very interessting.

The next Lost Squadron screenshot will be posted presumably in 2 days.


Day 14:
The game itself did only get some minor improvements today, I spend most of the time on the engine. As you can see on the screenshot, there are now effects like that explosion effect (there are already over 20 effect types), but the EffectManager isn't complete yet. Additionally to the road it is now possible to set railroads and I imported some new objects and new graphics into the editor (not on the screenshot).
 Thursday, December 23, 2004
Thursday, December 23, 2004 9:19:14 AM UTC (  |  |  |  )
Hey everyone. Today I made some improvements on the graphical side, mainly because I received some mixed feedback about the current graphics. Doesn't look too pretty right now. For that reason and because a lot of classes for the game handling are not finished yet (and only 1 day left till chrismas) I think its much better to give this project 1 week more. Maybe this time will be enough to finally implement shaders and shadows for all objects. Especially shadows will add so much to the game, it is pretty much impossible to tell how height an object is when looking straight down. Shadows would not only make the scene more realistic but would also improve the gameplay (you would see what your unit can and can't see).

As you can see on the screen I completed the roads stuff and added some new objects. Also as planed yesterday the moving around and mouse aiming does work now, but I'm screwed again with those X files, there are totally messed up (rotation wrong, each object is rotated differently, meshes do not fit on top of each other, the upper part of the tank does not have the same pivot point, really annoying), grr, but I don't have the time to write an own 3d-model format (or import any format into the engine, 3ds would suck at a similar level).

I also started the game message classes and most classes needed for gameplay are existing now, but most of the functionallity is missing. I will try a new approach this time to write that code: Unit Testing. Many smaller methods of the internal engine are already checked, but I never done large Unit Tests for a whole game. The tests should be able to run the whole game (creating units, moving around, blowing stuff up, doing graphic effects, winning, losing, etc.). I will report back how that works. Later today (when I slept a couple of hours ^^) I will start that stuff with my intern Fabian :-)

So the new date for the first Demo version of Lost Squadron is 2004-12-31. It might be playable tomorrow already a bit, but I don't think it is wise to release it so early. The first experience should be very nice and for a quick look you got the screenshots here ^^

Here is a fun link about Programming Languages and why some of them failed and others not:
why-microsoft-can-blow-off-with-c.html


Day 13:
Some new models, but still a lot of problems with x files (man they suck, I can't imagine anyone is actually using them for anything except test projects). Note: Don't expect that this screenshots will fully represent the final game, everything can change (just check the screenshots of the first days, there have nothing to do with the current state).
 Wednesday, December 22, 2004
Wednesday, December 22, 2004 9:52:57 AM UTC (  |  |  |  )
Yes! Finally I got back to the game code after all this Editor and Shader coding and run into some problems when rendering some models with transparency. First of all the models had to be rendered from back to front, but even then the models with multiple alpha layers were completly messed up. So I had to split up the alpha layers to multiple meshes and tryed to render them back to front, but DirectX tries to render per materials and not per meshes, so that didn't work easily.

I had another idea to just test the alpha values for 50% alpha and then skip writing to the frame buffer and that didn't work either (framebuffer is full of false pixels anyway). Instead of banging my head into the wall I just steped back and thought about needing this feature at all and no, there is no need for that in this game: I can just delete or don't use anything with multiple alpha layers. For example the palm had 3 layers of palm leaves, but I killed 2 of them and no everything is working perfectly (I still have to sort objects and to render first solid, then alpha materials, but thats pretty fast). I'm happy I got this solved :-)

The Editor was also improved a bit and everything needed for a full mission can be set there. As you can see on the screenshot there are a couple of new features for the map: Roads, some more neutral objects and some enemy units. Shadows and shaders would be nice too, but there is no time for that right now. Maybe I will be able to put that into the engine next week.

Moving around with the tank and aim and shoot on stuff should work tomorrow. Effects and AI won't be complete till christmas, there will be most likely only a couple of standard effects. Also collision detection is another big issue.


Day 12:
Lots of dummy objects (especially the red car), but lighting works, loading maps from editor works and roads are going to work soon too ^^ Also a lot of gameplay classes done today. More objects will be made and imported soon to improve the game feeling.
 Tuesday, December 21, 2004
Tuesday, December 21, 2004 5:42:51 AM UTC (  |  |  |  )
Well, this shader stuff is really annoying. I got a new shader for the landscape in a test app working and implemented some test textures there. But when changing the light to a spotlight I ran into many problems, not so easy as I thought. At least I know now how to pass all that vertex buffer data to the vertex shader, but for a ground shader with works nice with all the lights there is still some work to do and I don't have the time for that. So I will skip now all the normal mapping stuff until later when the game is complete. For meshes normal maps are working (at least with directional light), maybe I will use some of that.

Anyways, time is running out, I wrote down all the weapons, powerups and enemies today and created some classes for that, but there is nothing finished yet, so no screenie today. Sorry. Worked the last couple of hours on shader stuff anyway and I told myself it I don't get it working today, I will leave shaders out and add them maybe later.

 Monday, December 20, 2004
Monday, December 20, 2004 8:13:54 AM UTC (  |  |  |  )
I was working still on the Editor today, not that much editor features were missing, but a lot of other stuff eat up a lot of development time. Drawing lines for example is really bad in DirectX, either you just draw some primitives and get slow when drawing a lot of them and have a lot of overhead each time setting all states (and recovering from some crazy states the caller might have left, nothing is working as espected) or you use this stupid Line class wrapper thing, which will cut your framerate by the factor 2 or 3 (really great, no wonder noone uses it). Or you can just draw stuff with vertex buffers, but thats also very annoying because you have to create the vertex buffer and handle all that vertex creation, and also obviously not the right approach for a single line.

So I ended up writing a nice LineManager class, which collects all lines draw each frame and put them in a vertex buffer and because the lines are only changed when some big change happens, the vertex buffer can stay the same for a long time and thats really fast. Everthing gets rendered at the end of the frame (used for on screen controls and other stuff anyways). Same thing for filled boxes, color blending effects, etc. lots of helper classes.

The texture blending (as you can see in the image) was also not a piece of cake, but the blending over 5x5 vertices is now a nice technique. The textures are not really fitting good together, when you just put them besides each other, but with this blending technique it looks really good (or maybe I'm just to tired to tell anymore ^^). Another bonus is my new vertex format, which is compatible with a test shader I wrote 2 days ago (which didn't run correctly back then, I only managed to do some basic stuff). Seems like some arguments where missing and the vertex shader wasn't complaining, but crashing some time later (after couple of calls, not really funny to debug).

There isn't much time left, so maybe some features might have to be put on hold because I really want to finish the base game this week (just 1-2 missions, only basic features to see if its really as much fun as I imagine). If its playable a small demo or some sort of beta-version will be available before chrismas this week. Anyways, till new-year the game and the final demo-version should be finished, lets see. Maybe in the next couple of days things can be done more quickly because all the base classes and the complete framework are now completed.


Day 10:
Yup, yesterday no screen, I was too tired. The editor is now finished, only setting objects and the roads is missing, but that should be easy. All the other sub menus and UI is now complete too, even the multiplayer stuff has a UI now waiting for implementation (dunno if there is enough time this week for that, would be nice though). Time for some gameplay this week :-)
 Saturday, December 18, 2004
Saturday, December 18, 2004 4:21:08 AM UTC (  |  |  |  )
Today was Editor-Day. Our intern Fabian helped my out a little with the map file and we implemented all the UI controls for the Editor, all of them are working now, at least on the UI side. The Map Editor itself will be finished tomorrow, still a lot of smaller things to do before everything can run smoothly.

The UI needed also some improvements, so I made completly new graphics for them and updated all UI controls and added some we needed for the Editor. All this little things, like writing UI code, writing smaller classes for the ground textures, the road logic, neutral objects and the enemy units can really keep someone busy. I still hope the basic engine for this game can be finished this week, so we got next week to make some cool missions and the advanced stuff (shooting, effects, multiplayer).

About all this shader stuff from the last couple of days: I managed to get some basic shaders to work, which is really nice now, but still no clue how to implement all that spotlight normal mapping with alpha blended textures. Maybe I will just use some sort of directional light for the bump effects (or maybe a point light if I can pull that off, but then all the lighting calculation has to be done inside the shader as well, uhh complicated).


Day 8:
Half-time, 1 week has gone by for this project. This is a image of the editor, you can easily create new maps or change existing maps with this nice tool :)
 Friday, December 17, 2004
Friday, December 17, 2004 4:54:06 AM UTC (  |  |  |  )
Some internal work for the Editor was done today and I wanted to finish up all this shader stuff, but run again into a lot of problems. Vertex Shaders are really a pain in the ass to debug, everytime anything goes wrong the whole app crashes (I catch exceptions everywhere, but DX will just fail at everything and the app has to be shut down). There are also a lot of problems with the shaders to support spot lights and some other stuff in the engine like blending textures over each other.

Because of all this problems there is no real screenshot this day (with all this shader errors Lost Squadron isn't looking pretty today ^^), but you can see my first shader version of normal mapping on the right. Tomorrow will be the last day I will try out to get this goddamn shaders to work, else I will just leave them out and finish the rest without any high level shader support and maybe add them later ...


Day 7:
Shader test (extra program I wrote), works ok after lot of testing finally, but shader needs lot of improvements to work correctly with spotlights.
 Thursday, December 16, 2004
Thursday, December 16, 2004 6:24:42 AM UTC (  |  |  |  )
I completed the landscape rendering class and object loading today and played around with light effects. Directional lights were pretty easy, but very boring for this top-view-camera. So I tried out Point lights and they are nice, but why not test Spot lights? Well, now I know why, they are very hard to maintain. Setting all values properly is not that easy. But I like the effect (you can even rotate the light direction).

Other than that I tried also to implement the ground normal map shader I developed yesterday for the last couple of hours, but I can't get it working. Some mul operation always crashes inside my shader and is very hard to debug. Maybe I need to debug everything with DEBUG_PS and DEBUG_VS. Well, I hope I get that working tomorrow.


Day 6:
A big spot light effect on the landscape. The objects are not final yet and have no effects. But lighting does work well, maybe there is even some time to implement shadow maps later this week. We will see.
 Wednesday, December 15, 2004
Wednesday, December 15, 2004 5:23:04 AM UTC (  |  |  |  )

Day 5:
A boring ground texture. You might guess there is still a lot missing and yeah, you are right! At least a lot of things are happening in the background: 6 different high-detail ground textures with normal map support are implemented into the engine right now, all the map, menu and game base classes are working now. Let's see what will be finished tomorrow. The shaders and the light effects are not implemented yet, so everything is at 100% brightness and normal mapping isn't working yet (but it will soon ^^).
Yep, thats right, I started implementing shader support and programming a normal mapping shader for the ground textures. You might ask, why the hell do you do this for a 14-day project? Well, I'm crazy, that's why :-) I finished up testing some shader effects and writing a fx file with normal maps and multiple lights, but I didn't manage to get that into the engine today. Tomorrow I will try to import some objects, test out all that normal mapping and will play around with lights and light effects (dunno if a night mission with a lot of lights isn't total overkill and if I should stick with a simple directional light and maybe 1-2 point lights for the tanks).

There was also a noticeable delay when loading all ground textures (6 512x512 textures with 6 512x512 normal map textures and some other smaller textures), and thats not nice when debugging and testing out everything every few seconds. So I converted all textures from .jpg, .png, etc. to .dds format and used compressed formats like dxt1 and dxt5. Now the loading is lighting fast and I guess when not using the retail DX9 runtime the delay will not even be noticeable (remember, over 10mb of pixel data are loaded here).

For models I will see how long I can stick with .X files. Usually a format like this will make me angry after using it a couple of days because it does not support some little things and is most likely not extensible and I end up writing my own format (which can't obviously not happen in the short timeframe of this project).

It is also important to use the proper tools for DDS files, normal map generation and writing fx shaders (or other formats, but I like fx), which are:

  • FxComposer by NVIDIA too for testing out .fx effect files and writing your own
  • RenderMonkey by ATI is a really cool tool to try out shaders and test stuff, making shaders is not a piece of cake, even with all this tools around there is a lot of testing and modifying going on even if you got some nice shaders working.
  • NVIDIA_Photoshop_Plugins for saving DDS files and making normal maps from heightmaps or textures
  • DDSViewer by NVIDIA for viewing DDS as thumbnails, but thats not really helping that much (because windows thumbnails just suck). The DXViewer or so by the DXSDK is also really useless because its so user unfriendly. Also ACDSEE, IrfanView and Google Image viewer (Picasa Photo Organizer) and any other Pic-View program I tried do not support DDS files and don't even have plugins for that. But I found another viewer, which pretty much can't do anything but converting and displaying every format ever invented called: Konvertor. This thing is really crazy, don't ever try to read the full list of supported file formats (its 840 or so). Well, navigating suxx with this tool, but at least you can quickly display DDS files and zoom around. Konvertor has also another really nice feature: When you right-click on a file you will see a small preview, thats really one of the coolest thing I ever saw in a popup-menu :-) Sad thing is: For DDS files this does not work, only .bmp, .jpg, etc. files previews are generated, grr!
  • There are also a lot of other tools involved when saving stuff in 3D Studio Max, Maya, etc., but I won't get into that. Has nothing to do with programming ^^

I also underestimated all the classes I had to create for just rendering the landscape, there are of course still a lot of things missing as you can see on the screenshot. The basic layout for all the menu and game classes is now more or less complete and I'm pretty happy with it. Everything is still very easy to maintain and I got a good overview of the classes. The game has to be filled up with a lot of objects, roads, enemies, etc. in the next days. Hopefully all of this and the basic game engine and gameplay will be finished by the end of this week, so we have next week to test and balance the game, make some cool missions and bugfix the hell out of it (well, the engine is only a couple of days old now and only tested by me and my unit testing stuff).

Btw: VS2005 will get REALLY slow when you have a lot of files opened and try to compile or work on some older file. I think some part of the auto-recovery of files when crashing is not really optimzied. Anyways, when you close all documents and open only a couple (lets say no more than 10-20), VS will responde quickly again. Little annoying, but I'm now much better of knowing that ^^

I also registered the domain www.LostSquadronGame.com, which will be the official site for Lost Squadron. But when its up and running it will just link to this site until we got some finished page (which is not planed before chrismas, but as I know our graphic guy Leif, he can't help himself and will make a page design when I'm not looking).

 Tuesday, December 14, 2004
Tuesday, December 14, 2004 2:42:06 AM UTC (  |  |  |  )
Today there was a lot going on, but I managed to finish up some things. First of all I finished all my UI classes and got finally rid of the DirectX Utility Toolkit classes. Not that they are bad or anything, but they are total overkill for me right now, around 15000 lines are in this utility classes and there is not much fun going on when you want to customize anything there.

Ok, so I just wrote my own UI classes, I only need a very simple support for buttons, textboxes and listboxes, thats it. But I definatly encourage you to take a look at the utility toolkit and use some nice functions there, which help you to initialize DirectX and find the correct Device configuration programmatically, thats good stuff and saves you a lot of testing time :)

Instead of starting with the game engine and rushing into creating some incomplete code for today and leaving the menu unfinished as well, I decided to finish up all the menu stuff. Some base classes were improved, like sound and music playback, and I wrote the complete concept for the editor. I got also another new intern helping me a bit with the editor, thank for your support Fabian.


Day 4:
Another menu screen, graphics are also improved a little, but not finished yet. But why not show them off? :) Also all sub menus are working now, maybe some tweaking here and there, but the menu stuff is now kinda complete.
 Monday, December 13, 2004
Monday, December 13, 2004 4:59:28 AM UTC (  |  |  |  )
Well, there is no screenshot today for several reasons. First of all I hadn't much time to program today because I visited my grandparents (brithday and stuff) and then was visiting my parents (all this family crap ^^). And secondly I was developing via remote today and for graphics this can be a pain in the ass because everything is so slow (software rendering with remote desktop suxx (slow and no effects are working) and hardware rendering with vnc will never display whats going on ^^), so I have finished some base classes and all the Sound and Music classes required later on. I also started writing my own UI handling, the DirectX9 utility toolkit seems to be a bit of an overkill for my little game.

I promise, there won't be any more days without screenshots.

 Sunday, December 12, 2004
Sunday, December 12, 2004 5:05:30 AM UTC (  |  |  |  )
I'm back to VS2005, I just can't live with VS2003 after using VS2005 the last couple of months, too much features are missing. Intellisense is just not working, which is very annoying if you don't know anything about the DirectX classes and have to search the stupid managed DirectX help files (takes forever to find anything useful there. Btw: Why is everything "preliminary" there when parts of the docs are already 2-3 years old?)

In VS2005 it's really nice in that respect and has a lot of other useful stuff when writing new code, so I converted the project back to VS2005 (I'm getting an expert in converting stuff from generics back and forth).

The graphics for the controls are still pretty dummy (as you can see in the pic, pretty ugly right now) and the controls are not working yet correctly (oh oh, I'm already behind in schedule). Hopefully tomorrow I can finish loading some 3d objects so I can start with the real gameplay.


Day 2:
Programmed some of the User Interface, texture display and tryed out some effects. I also implemented the game manager, keyboard shortcuts for a lot of stuff (fps, making screenshot, etc.), cursors, the main menu and some animation effects for the menu.
 Saturday, December 11, 2004
Saturday, December 11, 2004 4:51:19 AM UTC (  |  |  |  )

Day 1:
Finished loading textures, displaying text, game loop, imported lot of useful classes from older projects, tryed out dds and x file formats, etc. but we still got a boring black window. I promise tomorrow there will be something more fancy :-)
Hey now! Today I started the game and engine of a new smaller game project I will hopefully finish till chrismas. Our intern at exDream Ivo will help me out with some models and textures, other than that its only me ^^ The game will be called Lost Squadron and is a kind of an advanced shoot'n'up game, you drive around with a tank (and later on other vehicles) and blow up stuff (this might get you an impression on how I feel right now ^^)

I will use DirectX9 with c# for my first time (used only OpenGL before), but I already know how to program with DirectX (worked with DirectX in my c++ times) and I am pretty aware of some uncool factors when DirectX just returns a stupid error code -420529345 without any reference and no documentation about this (maybe when you search long enough you will find out that this translated to "some error occurred" or "some of the freaking 100 parameters you passed is invalid", like that tells you anything useful).
Don't believe me? Then just try to load a texture or create a empty texture. If any parameter is wrong, the file does not exists or the color of the sky is not an exact RGB value, the app crashes (an exception is thrown with an error message that tells you nothing). DirectX won't tell you whats going on, just that you have to try out for half an hour to find the correct combination (or you might find out that just some file was missing).

I always woundered why nobody bothered to tell Mircosoft that this is bullshit, any robust framework needs to handle that way better, you can't assume everyone passes only 100% correct stuff to you.

Whatever, maybe it's normal to be pissed, when dealing with this again after 2-3 years of OpenGL development (in OpenGL on the other hand you will sometimes not give you any error message at all, which can also be annoying).

To top that of I fought several hours to get DirectX9 native debugging enabled with VS2005, which resulted always in an IDE look up and crashes if any native exceptions occur (if nothing goes wrong or you use the release builds it works, but hell, I want to debug the freaking DirectX stuff). Anyways, I'm back to VS2003 for this project and had also to rewrite all my generics code back to work with VS2003 and .NET 1.1 (well, I had to do that anyways because this game should not require .NET 2.0).
Later I found out that any project (including all the c# tutorial and example files) will crash when quitting in debug version them because some memory is not freed properly. I just deactivated any Direct3D memory exceptions (with DxDiag) and now finally I can work without all this stupid exceptions (maybe it has something to do with bad graphic drivers or a corrupt dx version) ...

Well that aside, DirectX9 has a lot of good stuff. I really like the way you can now implement easily user interface graphics, buttons, textboxes, etc.

This game is not about writing some ugly spagetti code as fast as possible in this 14 days. I will try to produce the base code for my new engine and just develop the game to check out its basic features.
The engine will use a lot of Unit Testing, base classed for all the grunt work and also a lot of error handling and generalization.

I thought about using some existing engine for this smaller project, but I don't the way most engines just focus on first person shooter development and I also want to use my base classes I am comfortable with.

 Thursday, December 09, 2004
Thursday, December 09, 2004 2:01:42 AM UTC (  |  |  )
Hey everyone. I've been busy doing some smaller projects and finishing up some things.

I just posted an article on www.CodeProject.com: Writing a CodeRush plugin: Commenter will help you to comment your code and make it easier to navigate through your code.

The program, including an installer and the complete sourcecode can be downloaded there. If you got any questions about this, please ask them there.
If you just want to download the tool or the sourcecode, you can do it also here: CR_Commenter Installer, CR_Commenter Sourcecode.
Remember you will need CodeRush to use this plugin.

We also have now a nice idea for a nice little game we might release just before chrismas. Last year we made www.EuroVernichter.de just before chrismas.

I've also updated abi/blog/PermaLink.aspx?guid=f44ddbad-ea76-478a-a091-241fd9c8b209">My Bookmarks and the Blogroll.

Click here to download CR_Commenter.zip v1.7
And here is the sourcecode for CR_Commenter v1.7

Older versions: v1.4 (VS2003 support), v1.5, v1.5 source

History

  • Initial version: 2004-12-08 (v1.0)
    Initial version supports commenting, adding header block and basic XML generation. Wrote the CodeProject article.

  • First Update: 2004-12-12 (v1.1)
    Lots of smaller improvements (more generated comments, click on auto generated comments to jump to function, etc.), very stable now!

  • Second Update: 2004-12-17 (v1.2)
    New version 2004-12-17 with some minor bug fixes (wrong comments, etc.)

  • Third Update: 2005-04-04 (v1.3)
    Several new features and some bug fixes, see TODO list. Supports now newest CodeRush version, auto XML comments work now for non-public methods too and will produce better comments. Also added better support for non c# files like fx, cpp, h, etc. If CodeRush does not parse them, Commenter will do it and still generate nice comments and the header section!

  • Another Update: 2005-10-27 (v1.4)
    Basically I was annoyed of some old bugs like namespace commenting (which produces a compiler warning in vs2005) or auto-commenting of initialized variables inside methods with xml (again, a compiler warning, but this happend only if all commenting features were turned on). I fixed those things and added a couple of cool new features:
    • Fixed: No more Xml Generation of namespace sections or for variables in methods.
    • Fixed: All sections are updated, the first one is not skipped anymore.
    • Fixed: Using directives section generation works now fine with multiple lines for a single using statement.
    • Fixed: Structs, enums and switch statements to now correctly generate comments and xml comments.
    • New feature: Added a bunch of keywords to translate abbrivations to full names. This one is very cool, it makes the Commenter look smart because it will automatically generate meaningful comments for methods and parameters. For example "xPos" becomes "X coordinate position" or "bmp" becomes "Bitmap", "descNum" becomes "Description number", etc.
    • Also made some of the choices smarter where to generate which xml parameters, e.g. variables and classes do not longer use the return xml comment.

  • And another update: 2005-12-28 (v1.5)
    • First version for VS2005 and using .NET 2.0 now for supporting generics and anoynmous delegates (more useful comments now inside of anoynmous functions and code blocks defined there).
    • Fixed again: No xml generation inside of methods (recent CodeRush version changed its behaviour somehow). Check is now performed inside the recursive method, this fixes all older issues too.
    • When commenter is disabled the globol hotkeys don't work anymore now.
    • Version number in options and a link to check if any new updates are available
    • Hotkey for generating comments and XML: Ctrl+1. Saves you typing '}' and doesn't require you to go to the last line of a block all the time.
    • If using defines in the using statements the surrounding region is now generated properly. Also adds automatically the #if DEBUG and #endif statements (which I use to exclude NUnit from the release build) around using NUnit.Framework, which is often generated by adding the namespace automatically or using some template.
  • Update to support C# 3.0/LinQ May 2006 CTP: 2006-06-08 (v1.6)
    • Added add namespace feature to support C# 3.0 (CTP May) in VS 2005.
    • Added action hint effects for commenting, regions and namespace adding.
    • Improved options screen a little, added more hotkeys and help
    • More hotkeys available, Ctrl+1, Ctrl+2, Ctrl+3, Ctrl+F9, Ctrl+.

  • Added some features and fixed some old bugs: 2006-08-06 (v1.7)
    • Bugfix: Long comment lines got now properly cut off (doesn't go over 80 anymore)
    • Bugfix: Fixed autogenerating header when user modified or shortened it
    • New feature: Generating comments will not longer expand any collapsed regions, at whichever file position we are. This means if you generate comments for a whole file, all collapsed regions will be collapsed again after everything was modified.
    • New feature: Parameter comment generating works now always, no matter if you add or remove parameters. This is a quite useful feature, even refactoring parameters is supported (moving, removing, adding stuff).
    • New feature: Autosorting feature for using directives, also fixed couple of using issues.
    • Improved hotkeys a little:
      • Ctrl+1: Does perform the same action as closing a block with '}', but can be used anywhere inside a method or class.
      • Ctrl+2 or Ctrl+.: Adds a namespace for the current word at the cursor. Used to support automatically adding a namespace in C# 3.0
      • Ctrl+3: Autogenerate region around the current block (method, property, constructor, etc.), for selections use Ctrl+R.
      • Ctrl+4: Toggle collapsing and expanding current selection.
      • Ctrl+5: Toggle collapsing and expanding everything at top level (also supports sub regions).
      • Ctrl+6 or Ctrl+F9: Update all comments and xml blocks for the whole file.
 Wednesday, December 01, 2004
Wednesday, December 01, 2004 2:18:53 AM UTC (  |  |  )
I just finished updating the Arena Wars Website, but I had some stupid troubles with the IIS security. If I change any file there, I get .dll could not be accessed error. Everytime when deploying I had to rename the full directory to another one, reset all directory and security settings and send rename it back (and set again all security settings). Seems also to be only an issue with Win2003, on XP I had no problems at all deploying the WebApp (1.1, 2.0, doesn't matter). Really strange .. the MSKB articles also don't help much (because they describe 1 mio other unrelated problems).

As you can see on Graphical Statistics I did some graphics by the WebApp (and for generating them I need the security stuff above). I did take a look at stuff like NPlot, but its much to complicated to do anything with libraries like that. My code is only 100 lines or so for the image generation, its pretty straight forward and much easier to modify IMO (or am I the only one thinking the NPlot stuff is kinda ugly?)

Also check out the final release of TestDriven.NET if you haven't got it yet, the free registration is kinda stupid (you have to enter a lot of stuff), but the Unit Testing Addins for Visual Studio are really good and should be used by any Coder (I use it now for 3 months, even the beta versions were great)!

Search

Projects I currently work on

MeinSport.de - German Sport Community Site

StudiHelp.de - German Student Community Site

Arena Wars Reloaded

New Arena Wars Website

My book: Professional XNA Game Programming (May 2007)

Dungeon Quest

Racing Game XNA Starter Kit

Speedy Racer Mod (from da book)

XNA Shooter

Some unannounced projects (games, websites, wikis, and my favorite: a new programming language)

See completed projects on the left side

Downloads: Games, Tools and Sourcecode

Rocket Commander, Mods and SourceCode

NormalMapCompressor v1.3

CR_Commenter

AbiKeyboardV9 layout and CountMostUsedKeys