[MUD-Dev] TECH: programming languages (was: Re: TECH: STL / Heaps, etc.)
Justin Rogers
justin at mlstoday.com
Fri Aug 17 20:01:46 CEST 2001
[Daniel]:
> Aren't there severe performance issues working in interop mode
> (bridging between old-style code and .net code requires a proxy
> for you non .net people)? I imagine that would stifle direct X
> work to a large extent?
You're arguing a common misconception here. When programming direct
very little of the actual code happens between your program and the
DirectX library. Of course every time you make a call there will be
some COM Interop putting a small overhead in, but most of the time
your going to be simply modifying data within the managed program,
and at some point where you render the scene you quickly make calls
across the Interop boundary and blast a screen out.
If you're wondering where all the .NET games are then you haven't
seen Donkey.NET yet, and you certainly haven't seen some of the
stuff we are working on (nobody has really).
To even further improve the performance of DirectX under .NET custom
type libraries can be made (we currently use the VB type library)
and instead of auto-generating the proxy class you can write custom
wrappers. In this manner there are loads of perf optimizations you
can do rather than simply using the general Interop mechanisms.
> Probably because its seldom that new code bases are started and
> continued for more than a week compounded by the paucity of
> information available on .net. All I know, I got from a 5 day
> Developmentor course. I must say I went into the course expecting
> to hate it, and came out really rather impressed - especially from
> a server-side perspective. I am yet to be convinced about its
> viability for games though especially as I don't think
> hot-spotting etc. is supported yet.
Well, I should be able to release CSharpMUD sometime soon. I'll be
taking off some time from work and that'll give me the time I need
to finish the code work. It is rather difficult to generate
something from scratch and be forced to work through all of the
design and implementation phases (it always feels good when you get
the server up for the first time and have it echo some stuff back to
the screen).
Don't know what you mean by hot-spotting, but I'm assuming your
talking about some features of Windows Forms. For the most part
when programming DirectX games you're NOT using Windows Forms. You
can't really since as soon as you go to full-screen mode you have to
custom paint the screen and the controls won't show through (they
can, its just a pain in the ass). Of course in a windowed
environment you can easily mix and match DirectX enabled controls
with normal Windows Forms controls. My base for any games I make
using .NET is still a special DirectDrawPictureBox which inherits
from a System.Windows.Forms.PictureBox. I simply override the paint
method so it never redraws using GDI, attach the appropriate clip
rects, and its good to go. A small helper library lets me produce a
game like Pac Man in about 2000 lines of code (AI, Sprite
Manipulation, Paint code, Input, and Game Loop).
Justin Rogers
a-justr at microsoft.com
justin at mlstoday.com
The a-justr is going away, I suggest using justin at mlstoday.com instead
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list