Code Download

warning: Creating default object from empty value in /home/hplus/enchantedage.com/modules/taxonomy/taxonomy.pages.inc on line 33.
This article contains a lot of code.
jwatte's picture

Using the OpusFile library with Microsoft Visual Studio for Windows

The "opus" codec performs pretty well across a wide range of bit rates. When doing voice chat over the internet, or streaming music, or even including compressed music for a soundtrack for a game or other application, it is a pretty reasonable choice. Especially since it's free, as in beer!

jwatte's picture

Measuring scheduling latency on virtualized versus bare hardware

The scheduling latency is the longest time that a "ready" process may have to wait before it actually gets to run.
On a system with a single CPU/core, and many ready processes, this latency will be very long.
On a system that is idle, and has many free CPUs/cores, it should theoretically be zero.

jwatte's picture

Highscores for XNA 4.0 test release

I've heard the requests, and decided that they are right: It's better to release something that probably works for Xbox for XNA 4.0 now, and then follow up with the Phone version later.

jwatte's picture

Node.js Mersenne Twister random number generator module

I made a Node.js module. It's a packaging and slight update of the JavaScript implementation of the Mersenne Twister random number generator (which is a really high quality generator, as well as pretty fast).

I'm hoping you can soon get it with npm:

$ npm install mersenne
$

Usage is simple:

r = require('mersenne');

jwatte's picture

The XNA Offline and Online Highscores Component Version 2 (distributed leaderboards, sort-of)

XNA Game Studio makes it possible to write games for the Xbox without being a developer with good publisher contacts and lots of money to pay for marketing and Xbox development kits. This is great!

However, because the XNA Indie Games system is not fully controlled by Microsoft, certain features of Xbox Live! are not available, because they would be too easily abused. These features include online Leaderboards, and unlockable Achievements.

The XNA community has developed alternatives to those functions. Many XNA games contain "Awardments" that can be unlocked, and many more XNA games use the XNA Network Highscores component to implement distributed, peer-to-peer highscore sharing. The name for this is generally "Online Highscores" rather than "Leaderboards," because the latter name is reserved for use by Microsoft-certified titles that use the real Xbox Live! functionality.

This article introduces version 2 of the XNA Online highscores component, which is free for you to use in your own game under the terms of the MIT license.

Time Limiter turns off your computer at night!

There are parental controls in Windows Vista that can prevent a restricted account from using a computer at times you specify. However, if you let your kids have admin accounts (because they keep needing to run programs that need admin for compatibility reasons, say), then this won't work.

Also, Windows XP does not have any feature to limit use to certain times of day.

jwatte's picture

Procedural Planet models generated in XNA

Show how to generate a random planet based on midplace displacement noise and
a simple height map color ramp. Note that you typically want to add some cloud
cover for the best effect.

Press Space / A to generate a new planet.
Press Backspace / B to view the height map.
Press Y / Y to view the color map.

Released into the public domain by Jon Watte. You may freely use this in your

jwatte's picture

Mouse Picking in XNA Framework using Viewport.Unproject

When developing a PC program for the XNA framework, you usually find that you need to do mouse picking. This means taking the mouse coordinates, and turning them into a ray that you can then raycast in your world to see what, if anything, is being hit when the user clicks the mouse.

jwatte's picture

Scheduling jitter measurement for UNIX

2009-03-12 latency2.txt README -- jwatte@forterrainc.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

jwatte's picture

Evaluating paths in XNA games; how to run triggers and dynamically configure properties!

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!

Syndicate content