Newcomers

warning: Creating default object from empty value in /home/hplus/enchantedage.com/modules/taxonomy/taxonomy.pages.inc on line 33.
Not very complex stuff.
jwatte's picture

Outline of a Scalable Web Backend

Here's a common question for newcomers to mobile game development, web game development, and similar systems:

How shall I design my application for scalability? And what do you mean by application, for that matter? Do you mean the whole iOS app/PHP/mySql system, or something else?

jwatte's picture

A hexagon texture. For free!

Here's a PNG file of a hexagon. The hexagon itself is 256 pixels wide and 225 pixels tall. The PNG is 290 pixels wide and 290 pixels tall. You can use this to generate hex tile grids in HTML and Canvas and XNA and really any other presentation framework you want!

jwatte's picture

Visual C++ doesn't have strtoll(): use _strtoi64() instead

When building code you port from Linux (or other GCC based systems) to Visual Studio, you may run into the Microsoft standard C library not containing a definition for strtoll(), which converts from a C string to a long long, 64-bit integer value.

error C3861: 'strtoll': identifier not found

jwatte's picture

Dealing with noise and off-center in joystick input

A joystick is a nice input device for certain kinds of games, like flight simulators, space games, etc. A mini-version of the joystick is the gamepad, ubiquitous in console games.

jwatte's picture

MUD/Telnet terminal emulation

Now and then, someone will say "hey, I want to write a MUD (or some other text-based program), and I want the text to be in color -- how do I do this?"

The answer actually requires a little bit of understanding of pre-Internet computer arcana, so here we go:

jwatte's picture

A texture of grass!

Here's a texture of a grassy field.
I made it by customizing a downloadable filter for the wonderful FilterForge application (which now comes in version 2!)
I hereby grant this texture into the public domain.
jwatte's picture

Digging through older code

In my career, I've dug through a number of scene graph renderer internals. Almost always, they claim to be "hardware independent" by abstracting the hardware, and then they go ahead and expose functions like "bindSecondTexture()" and "setAlphaBlendFunc()" to objects, and have objects "render" themselves by calling those functions.

jwatte's picture

MD5, SHA1, SHA256 and SHA512 hex digests in Erlang

Orignal post 2011-06-10:
In various web APIs, there is some confusion between the representation of a hash value.
There exists APIs where a password is validated as, say, MD5(challenge + MD5(salt + password)).
Let's leave aside the fact that MD5 is not a secure algorithm anymore (you can procedurally generate an input that generates any MD5 hash value you want in cheap-to-compute time).

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.

jwatte's picture

Structure of a user-hosted client/server network game

Recently, a question came up about how to structure a client/server networked game where users can host games that other users can join. I think I did a reasonably concise write-up of a common-sense approach that's been successful for many years, so I'm archiving it here for posterity:

Syndicate content