Thursday, October 27, 2005

This is one of the reasons why we hate dealing with the rendering system:  It's hacked.  We take over the call to create that AC makes and "do things" to the object so that Decal knows when to draw.  Well it turns out that our repeating textures were directly related to this.

In the previous version of Decal, the rendering hack consisted of a proxy object, a complete reimplementation of the DX object, that told us what was happening.  Under this model, AC had a reference to our proxy, and we had the real object.  In the new system, we decided to go with another method, vtable patching, which only alters the particular functions we want.

Well, as things would have it, Checksum created the initial hooking setup for Decal3, not Haz or myself, so this little detail wasn't exactly fresh in our minds.  So here we are, testing various ways of drawing to the screen, expecting the DX object to behave normally, but we keep getting this weird repeating effect.  We found a few methods to, ah... minimize the visible effect, but this backfired when multiple huds were generated.

Well it just so happened that Check popped up again while we were exploring the issue, took a glance at our code, and "reminded" us about the hook.  We nearly died when we realized what was actually happening.

To keep Decal drawing on the screen on top of AC's 3D, we hook a DX function called EndScene.  When AC calls this function, we send a signal to Decal to do all of it's rendering work.  Well, in our new HUD implementation, we use a technique that renders on an off-screen texture instead of the main window.  As part of that operation however, we have to call EndScene.  It turns out that our repeating texture was actually a recursion issue that somehow fixed itself before causing a crash.  So we reworked the code a bit to call the real EndScene and no more issue.

Just goes to show you how being too close to a particular project can bite you when the bugs creep up.

posted on Thursday, October 27, 2005 4:09:23 PM (Central Daylight Time, UTC-05:00)  #    Comments [1] Trackback
 Thursday, October 20, 2005

Well,  I wanted to officially give an update on the status of my various projects.  First, Plugin Manager has been updated and works the same as before.  Second, I've started a project to redo the "engine" portion of NB2 in c#.  I'll be releasing this once it's stable as a profile-runner.  It won't have any edit functions, but at least you'll be able to use what you have.

I may continue this project as a replacement for NB2 in the future.  I haven't really decided yet how to progress on that particular matter.

Lastly for the developers, we've been working hard on getting a new and better HUD implementation, and I can honestly say we've made some progress.  Some of it more humorous than others (There should only be *3* images in the shot).

posted on Thursday, October 20, 2005 12:47:52 PM (Central Daylight Time, UTC-05:00)  #    Comments [1] Trackback
 Monday, October 17, 2005

Well, after much pain and suffering, mostly on Haz's part, the new HUD system is finally making progress, and since I'm in a mood, I'm going to talk a bit about how it will work in the .NET Native Framework in an upcoming alpha release.

Firstly, creating a HUD:

// hudRect defines the area of the screen on which we draw
Rectangle hudRect = new Rectangle(10, 50, 300, 16);
Decal.Adapter.Wrappers.HUD hud = Host.Huds.CreateHUD(hudRect);

Now that we have a HUD, lets make it colorful!

Color myBGColor = Color.FromArgb(64, Color.Gray);
hud.Fill(myBGColor);

This gives us a nice, mostly transparent grey background.  Lastly, we'll render some text:

hud.BeginText("Times New Roman", 16);
hud.WriteText("SomeText", Color.White);
hud.EndText();

And that's IT!  Of course there are other neat features that need to be tweaked a bit, and some issues that need to be solved, but we'll have progress or kill someone trying!  Lastly I leave you with a potential outcome of the above code, of course with some additions.

working hud

posted on Tuesday, October 18, 2005 3:29:40 AM (Central Daylight Time, UTC-05:00)  #    Comments [0] Trackback
 Thursday, October 13, 2005

I've often had trouble sleeping.  I've usually shrugged it off too.  Until recently it hasn't turned out to be that big of an issue, but I can honestly say I should have taken care of it ages ago.  My ability to focus is almost completely gone now, and I can barely get any work done.  Even after taking ambien to help me sleep, I'm still exhausted and unable to concentrate.

Oddly enough though, in the middle of this, I've never had more dreams (which I hear is a side effect of the ambien) or inspiration for stories.  I've penned a few paragraphs of a tale that really intrigues me, and I hope that I can do it justice while writing it.  As the stories, or even the chapters, find themselves whole, I'll be posting them for all to enjoy.  I'll probably post a teaser in a few days after I flesh out some of the direction better.

posted on Thursday, October 13, 2005 4:28:39 PM (Central Daylight Time, UTC-05:00)  #    Comments [0] Trackback
 Wednesday, September 21, 2005

Since it's been quiet on most fronts with the alpha, our continued development, and the impending patch, I just wanted to let everyone know things are rolling along.  I've been having some trouble with my development setup the past few days that has hindered me, but I've mostly solved that as of a short while ago.  Tonight I'll be hitting the new rendering system hard, and may even have some good news or screenies by the end of the week.

Also, here's a quick overview of the status of the plugins/utilities that I maintain:

Zone Launcher -- Retired.  I did however hack up a quick version that works with the new launcher.  It apparently has a naming conflict with some other app that was announced a few days after I posted the update.  Oh well.

Plugin Manager -- Limbo.  I will be updating this as soon as I figure out how.

Mouse Wheel 2 -- Actually updated already.  It just needs to stay current with our changes.  It's also waiting on QueryKeyboardMap to work again.

AC AIM -- Planning.  I will not exactly be updating this;  I'll be completely rewriting it using the new .NET framework.  I'll also be using that time to write a series of articles detailing the development process using the new framework.

Nerfus Buffus 2 -- In Progress.  NB is broken.  Very broken.  I will be updating it, but I'm having to rewrite large chunks of it.  I don't really have an ETA other than to say it will NOT be ready when decal releases.  If time permits, I plan to do my best to have it out with in the month following decal.

posted on Wednesday, September 21, 2005 4:47:50 AM (Central Daylight Time, UTC-05:00)  #    Comments [1] Trackback