2009-03-12 latency2.txt README -- email@example.com
This program measures scheduling latency/jitter for a CPU bound process on a UNIX system. It is intended to determine the suitability of various virtualization products to hosting real-time processes such as game servers. To compile it, use g++ (make sure it has been properly installed!):
$ g++ -o latency2 latency2.cpp
Thinking about how a MMO FPS like Planetside was most fun when you were in a good group, and you were winning, I started thinking about how you could set up a situation where each side can have the impression that it's winning. Playing FPS against NPCs is not as much fun as playing against other people, so it seems like a preposterous idea at the outset.
Inside an XNA game, you invariably start needing to wire things together. "When the player steps on this tile, run that action" or "when this timer expires, open that gate." For simple levels, you may be able to write this using code, but once your game reaches a dozen levels, each with hundreds of possible actions, hard-coding each and every one of them becomes a real nightmare!
System.Reflection is great! You can find all public properties on an object, and manipulate them programmatically, without knowing the exact type of the object. You can also treat properties generically, by passing a PropertyInfo and object instance around. This allows you to build generic animation systems (similar to how the Windows Presentation Foundation dynamic animatable properties work).
I'm using WPF 3.5, Visual Studio 2008 SP1, and developing for Windows XP SP3.
No matter what I do, the menu bar and menu items of my application are ugly, blurry, anti-aliased. WinForms, MFC and Win32 applications however have nice, crisp, clear menu items.
I've tried checking the "align to device pixels" box, but it only gives a marginal improvement.
I've been working on a GPU accelerated light map generator for XNA for a little while. I'm using the light map only to tell shadow/light for each surface for each light, and then solving the basic light equation (ambient + diffuse + specular + emissive) per pixel, multiplied by shadow.
Attached, please find a syntax highlighting file for HLSL and Effect files for Notepad++. This file is substantially better than the one available on the Notepad++ main download site:
A question came up on the XNA forums: "how do I draw the silhouettes of objects in red when they are covered by smoke?"
Here is my proposal on how to use destination alpha to do it:
0) When setting up the back buffer, make sure you get destination alpha:
graphics.PreferredBackBufferFormat = SurfaceFormat.Color; // has alpha
"So," you may ask yourself, "what if I figure out a way to detect that the player has hit a button, or stepped on a landmine, or entered a goal zone?
I want to implement my own CSettingsStore that stores data in a file in local application data, rather than the registry. (I note that the documentation claims this is a good idea from a security point of view, but I'm doing it for other reasons).