BlockLeftTop, PRELOAD BlockLeftBottom, PRELOAD BlockLeftStretch, PRELOAD BlockTop, PRELOAD BlockBottom, PRELOAD BlockStretch, PRELOAD BlockRightTop, PRELOAD BlockRightBottom, PRELOAD BlockRightStretch, PRELOAD
Latest Game

Lost Squadron, Day 19: Shoot'em'up

by Benjamin Nitschke 8. January 2005 10:10

Day 19:
Some effects in action, the shoot line helps you to see where you shooting at (will be improved with a special texture, its just a line now). Some 3D to 2D converting is also not correct and needs some fixing. In the next days I will try to bring together all the completed parts and start with the mission design in the beginning of the next week.
Ratta ratta, peng peng, boom!

Shoot'em'up

Yeah, hey now. This time I had way to much fun when generating this screenshot, now it is actually possible do aim with the tank and shoot at stuff (with all the new effects and sounds). It is a lot of fun.

Warning, this is a long post (I've written it in the last 2 days), but I have a nice idea: Content links, just click on them to jump to a section:

Troubles with IIS

I had some trouble the last few days with my IIS (Internet Information Server, the thing producing ASP.NET web sites), it keept crashing and hanging up with out of memory errors (this page was down a couple of times, sorry!) Really strange, that thing is running for over an year now and I never had much troubles with it. The memory usage was also pretty high (total ~900MB, IIS worker process alone had ~400 MB), I guess this has something to do with dasBlog using .NET 2.0, dunno (there are no errors logged anywhere). I had a lot of page hits this week after all the posts on other blogs about me.
The memory consumption of IIS goes constantly up and I had over 200MB mem usage again after a couple of hours, hmm? Don't wounder if the site is down or you get some errors, may happen because of these memory errors ...

I also optimized the page from 50 entries max to 10 and cut down the number of entries you will see on the start page. I hope that helps a bit, my server is really crappy and old and needs a lot more memory (had only 256MB, but I upgraded to 512MB recently, but its slower memory. I guess I need a gig or 2, lots of other services are also running on that server). I also changed the app pool to a special one and set some timeouts for requests and processing, maybe this will help (had no problems since that change).

RenderState errors

Another annoying thing is the RenderState property of the DirectX device, it will tell you you can "get and set" some state like FogEnabled, well you can set it, but if you try to get the state it will just throw an exception. A lot of RenderState gets will throw an exception actually, I'm really impressed by that. Great work not to mention any of these things in the docs (the docs are pretty useless anyway, most descriptions are trival anyway and IntelliSense helps you just as much).

Light-Effects in DirectX

The light effects for the effect engine were pretty easy in DirectX, I remember this was very hard to do in OpenGL (had to invert the alpha color, and with different color settings everything got messed up, so a lot of special cases had to catched and handled).

Basically this code is used (the light effect is a white texture with a spotlight effect in the middle as the alpha channel):

Device.RenderState.AlphaBlendEnable = true;
Device.RenderState.SourceBlend = Blend.DestinationColor;
Device.RenderState.DestinationBlend = Blend.SourceAlpha;

Now make sure both the color channel and the alpha channel will modulate from the texture color and the diffuse color. Switching back to normal SourceAlpha - InvSourceAlpha causes also no troubles with that. I like that :)

DirectX OutOfVideoMemory

Another problem I did have the last days when unit testing was running out of video memory all the when creating the DirectX device (getting D3DERR_OUTOFVIDEOMEMORY exceptions) after ~10 tests. When restarting VS, everything worked again for some time.

I worked with that problem all week and found no solution, I changed a lot of debug settings and changed some parts of the code, but nothing helped and there wasn't any solution for out of video memory exceptions posted anywhere (my card has 128MB, how can I run out of vid mem after a couple of tests?). Then I saw that some part of the screenshot generation code wasn't finished and I saw the presentParams.SwapMode was set to Flip instead of Discard (Discard is somewhat faster, but Flip allowed me to easily catch the back buffer for the screenshot generation). I changed that, reduced the back buffer count to double-buffering and reduced the resolution for tests from 1024x768 to 800x600 and never had any Out of Video Memory exceptions since then. Maybe they happen after over 50 or 100 unit test runs, but then I can just restart VS and it is not as annoying as before.

VS2005 needs a lot of RAM

But VS2005 consumes still a lot of RAM (>800MB, I got only 512MB ram on my dev machine). I guess I have to buy some more RAM soon, everything gets very slow and crashes more often when all the ram is used (and I can't work without VS2005 anymore). Restarting VS helps, but with that much complex unit tests the memory comsumption goes up very fast again. For example todays screenshot is actually just a unit test with around 50 lines of code, making very simple unit tests helps a lot to force you to refactor and simplyfy your code constantly.

Todays Links

The links for today are The Z Buffer and Managed world, both great Managed-DirectX sites.

GosuGamers.net

If any StarCraft fan reads this, the guys from www.StarCraftGamers.com did have a lot of troubles with their hosting partner and left the partner. StarCraftGamers.net was one of the greatest StarCraft community sites ever IMO, the new site is called www.GosuGamers.net. Looks like the crew will continue their great work there, so check it out (the site has still some bugs because it is new): Good luck www.GosuGamers.net

Tropical-Islands

I'm now going to visit the Tropical-Islands resort (new big thing here in germany) with my brothers and some friends :) Development will continue tomorrow.

Comments


1/9/2005 1:23:02 AM #

IIS is still working, wasn't betting on it. Well I hope it stays this way Smile

abi | Reply



2/17/2005 12:27:12 PM #

What happend? You havent updated in quite a time. Have you dropped the Lost Squadron project? I really liked it :/

Riad | Reply



3/11/2005 7:08:30 PM #

No, I didn't drop it, but there was a lot of other stuff going on at exdream and I hadn't much time and improved the engine a lot and the concept for Lost Squadron changed also a bit. Now the new engine is working nicely and I will post new screens and more information about Lost Squardon very soon.

abi | Reply



3/22/2005 8:07:21 PM #

Hi, ich dachte ich lass mich auch mal wieder blicken... Smile
Lost Squadron immer noch nicht fertig? Smile

Cry | Reply



4/17/2005 3:08:34 AM #

I have a question? What lanugae do you guys program in? Is it C#? Also is that the same lanuge as Arena Wars?

Luke | Reply



5/3/2005 8:06:40 PM #

I'mdeveloping using lua,directx and c++ at the moment.  I am wondering how you are using lua specifically with rendering.  I have a 2d static image class in lua that stores all the information (except directx interfaced such as meshs, textures which are stored as lualightuser data).  This means I ahve to pull around about 5 ish items off the stack per render (position, texture, sprite, directdevice, scale).  What is your approach?

Russell Long | Reply



1/29/2010 8:45:53 PM #

Success is not measured by what you accomplish but by the opposition you have encountered, and the courage with which you have maintained the struggle against overwhelming odds.

cash loans | Reply



5/7/2010 10:41:06 PM #

Twenty years from now you will be more disappointed by the things you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbour. Catch the trade winds in your sails. Explore. Dream. Discover.

payday loans | Reply


Add comment




biuquote
  • Comment
  • Preview
Loading



Disclaimer: The opinions expressed in this blog are own personal opinions and do not represent the companies view.
© 2000-2010 exDream GmbH & MobileBits GmbH. All rights reserved. Legal/Impressum

Recent Games

Fireburst

ArenaWars Reloaded

Jobs @ exDream

Current Poll

Do you know what the Delta Engine is?



Show Results Poll Archive

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

Blogs

Download OPML file OPML