Intermediate

You've been doing it for a few years.
jwatte's picture

A simple approach to native network marshalling

I used to do serialization using all kinds of fancy templates and macros. You can create pretty elegant systems that way. However, at some point, simplicity should win out. Here's a system that might work just fine for you:

A simple packet class, which really is all you need:

class packet {
public:
  packet() : pos_(0) {}
  void append(void const *data, size_t size) {

jwatte's picture

More about that dungeon

While I'm thinking about lighting, I'm dropping in a camera, and a player model based on kW Animation and kW X-port. This is mainly for proportion, and to get a feeling for what a unified scene will look like.

jwatte's picture

Theories about lighting a dungeon

So, I'm generating a dungeon-like structure procedurally (in Rogue-like tradition).

Initially, I just lit it using a "sunlight" type directional light. However, that looks approximately like ass. Mainly because that's not how dungeons are actually lit, I guess :-)

jwatte's picture

Software quality rant

Last week-end, I lost the boot disk for my Linux server. Mostly, that server just serves as a file server for MP3 files, photos and ripped DVDs these days, but not being able to listen to music or watch movies does cramp your style a little bit.

jwatte's picture

How to structure a reusable game networking library

I recently have answered several questions about how to structure a networking library such that it can be easy to use for users of the library and/or when expanding the game you're writing. Here are some thoughts on that. (Code examples in C++)

Networking generally ends up needing to do three things:

1) Mirror state updates from one object to another.
2) Request remote services ("RPC").

jwatte's picture

Animated illustration of how a networked game server works

Here's a general illustration of how a networked game server works. While the animation is somewhat fast, you can just fix your eyes on a particular spot and read the explanation text as it shows up.

jwatte's picture

Static reflection in C++ using minimal repetition

Don't Repeat Yourself.

That's a great rule for writing code. If you find that you repeat yourself in code, then you're probably doing something wrong. Writing code should be about expressing what's unique about something, not filling out standard forms of data. (Copy-and-Paste coding is the worst version of this)

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

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!

jwatte's picture

.NET Reflection, Boxing, and Properties in XNA games

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).

Syndicate content