Way to go Aaron!
Saw this post on the newsgroups, and I got a kick out of both the story and the little game Aaron wrote. Hopefully this post doesn’t give him ‘too much’ publicity.. =)
(Oh, and Aaron, my feedback is ‘nice job’ in the short time you worked on it.. I got a kick out of it.. I’ll add gamepad support to it because games like that are just too clunky on a keyboard. =) I hope your girlfriend was proud. )
From his post:
Hey I just wanted to post a link to a 2D game I made using Managed
DirectX in C#. Its a side scroller like Super Mario brothers, comes
with the source and everything you need to run it minus of course
DirectX and the .NET framework.
I have to say it looks pretty sweet and runs very well on decent
graphics cards and computers. But I have seen problems on older cards
with some textures. Definitly its a bit of a hog since it was my first
attempt at Managed DirectX, and is probably a bit inefficent. So keep
in mind its not the best code. But it should get people started if
they are looking to do a 2D game.
I did this game for my girlfriends birthday so it isn’t something I am
really actively maintaining or anything, but I am hoping to hear
feedback, positive, negative, or otherwise. And if people learn from
my code, I figure thats all the better.
Aaron
Blog entry on this:
http://theshellandcactus.blogspot.com/2005/09/texas-quest.html
Link to download the game and source:
http://www.savefile.com/files/5349900
Managed DirectX Game Engine..
I just got an email from the folks @ Suva Interactive, and it seems they have a game engine using exclusively managed code and MDX in particular.
I haven’t had enough time to actually look at it in depth, but it looks promising from what I did see. Seems they entered it into the CSD competition recently, hopefully they did well in that!
I’d recommend checking it out..
Professional Game Developers use Managed DirectX?
Check out the video that David Weller did with Steve Lacey, the graphics lead for Flight Simulator.
About 3/4 through the video his comments:
“The Managed DirectX stuff these days is a great starting point, and for a lot of people a great finishing point as well for shipping titles.”
and
“We internally in the flight sim team use Manage DirectX in a lot of our tools”
Always nice to see the professionals enjoying our stuff. Now just wait until they see the upcoming Whidbey stuff. =)
Wait, so you’re telling me I gotta work with this guy?!?
Features? Whidbey? Oh My!!
Well, as I’m sure most of you are already aware, the Whidbey beta has been out for a while now, and hopefully some of you have gotten a chance to play with it. Assuming you have, what features are you seeing that you absolutely love? What features do you now find ‘missing’ when looking at the Managed DirectX libraries?
In short, now would be the perfect time to suggest features on things you might like to see in a “Whidbey” specific version of Managed DirectX.
( And yes, I’m aware of the loader lock problem using the current MDX assemblies with Whidbey.. So ignore that one.. 😀 )
Edit: Comments seem to be broken.. I’m trying to fix it.. Let me know if it works..
My last post on render loops (hopefully)..
The most common topic on my blog returns again. This time it will be brief as all I’m going to to do now is show you the render loop the June’05 SDK will be using. A coworker in another group came up with this markedly simple, yet deceptively effective loop for that groups projects. I liked it so much, i’m sharing it with everyone else. =)
The basic loop (slightly modified from his original version and the version in the new SDK for ease of reading):
public void MainLoop()
{
// Hook the application’s idle event
System.Windows.Forms.Application.Idle += new EventHandler(OnApplicationIdle);
System.Windows.Forms.Application.Run(myForm);
}
private void OnApplicationIdle(object sender, EventArgs e)
{
while (AppStillIdle)
{
// Render a frame during idle time (no messages are waiting)
UpdateEnvironment();
Render3DEnvironment();
}
}
private bool AppStillIdle
{
get
{
NativeMethods.Message msg;
return !NativeMethods.PeekMessage(out msg, IntPtr.Zero, 0, 0, 0);
}
}
And the declarations for those two native methods members:
[StructLayout(LayoutKind.Sequential)]
public struct Message
{
public IntPtr hWnd;
public WindowMessage msg;
public IntPtr wParam;
public IntPtr lParam;
public uint time;
public System.Drawing.Point p;
}
[System.Security.SuppressUnmanagedCodeSecurity] // We won’t use this maliciously
[DllImport(“User32.dll”, CharSet=CharSet.Auto)]
public static extern bool PeekMessage(out Message msg, IntPtr hWnd, uint messageFilterMin, uint messageFilterMax, uint flags);
——
Simple, elegant, effective. No extra allocations, no extra collections, it just works.. The Idle event fires when there’s no messages in the queue, and then the handler keeps looping continuously until a message does appear, in which case it stops.. Once all the messages are handled, the idle event is fired again, and the process starts over.
Win a prize ($50,000) for writing Managed DX apps..
Since I’m feeling quite lazy, I’m just going to copy the basic post from the Zbuffer site..
So you think you are a good Managed DirectX programmer eh ? Well if you have some SQL skills (or a friend who does) then you could be ready to enter the Connected Systems Developer Competition. There are 15 categories to enter and number 10 is:
- Best use of Managed DirectX, Visual Studio 2005 and SQL Server Express
I know it seems strange to put DirectX and SQL server together, but the competition *is* all about connected systems. Closing date is September 15th 2005 so you have plenty of time. Lots of other prizes too – check out the official rules
They’re back!!
It seems the folks over at Koios Works are back at it, and this time in full 3D..
From what I’ve heard Tin Soldiers: Julius Caesar has just gone live..
Developing games quickly.. Now there’s a benefit of MDX I like!
VB.NET and MDX chat scheduled for next week..
Taken from the Chat Announcements blog:
DirectX 9.0 Direct3D Graphics with Visual Basic .NET
Tuesday, April 26, 2005 from 1:00 – 2:00 P.M. Pacific Time (Additional Time Zones)
Hosts: Tom Miller and Adam Gallant. More to come…
Do you have questions about how to best use Visual Basic .NET to program DirectX 9.0 graphics? Are you unsure when to use a particular Direct3D feature? Join members of the Visual Basic and Windows Graphics & Gaming Technologies teams and discuss how to leverage the power of DirectX 9.0 from Visual Basic .NET.
You can view this announcement on Microsoft’s main chat page, or add a reminder to your Outlook Calendar.