September 2007 - Posts
While reading a Gamasutra article about open world games, I've found something fantastic: A Metroid remake done with voxel technology.
Voxel (from volumetric pixel) is about representing a 2D grid in 3D, by elevating each element of the grid (each pixel) by its position relative to the rest of elements.
It is used in some videogames to represent terrain, calculating elevations from 2D maps, and provides a way to avoid having to handle polygon counts, in exchange of more CPU power (as far as I know, voxels are not hardware accelerated, although maybe GPU processing power could be used to help with it).
Voxels have been used since the old 386 days, for example in the simulation game Comanche: Maximum Overkill (maybe the first voxel game?):
Another well-known (and with a hollywood-like sci-fi story) game that used voxel technology was Outcast, being known too for its use of the Pentium MMX instructions to allow antialiasing and lighting effects, all purely done by software:
A recent game that shows voxel improvements with the newest CPUs is Perimeter, a strategy RTS in which the terrain has an important role (you are an alien terraformator commander), showing real-time terrain deformations:
We live in a "3D world" where almost everything is rendered using triangles and polygons, but it's not the only way. Voxel is just another technology, raytracing and blobs/metaballs are other rendering techniques that, if hardware would not just focus on triangles, could allow fabulous graphic results...
Among other 20.000 things, I'm creating a game design document for an online videogame (that's why I posted about adapting boardgames earlier this month).
Not having done others before, I'm learning a lot of things.
First one is that you may have your idea crystal-clear inside your mind, but writting it properly so others can understand what you want to do, it's not always easy.
Another important subject is thinking the game's premise in few lines, and why you think it's cool. In my case, the game forged about a simple idea, and now I'm expanding all with the feedback of the rest of the "team members". For example, the game mechanics are changing a bit, because at long-term the game may get boring and uninteresting.
Adding sample tables, lists of possible actions, "turn sequences" (even if it's a real-time game, showing a flow of actions/events helps to understand the mechanics), diagrams, and lots of samples helps too.
One thing I'm trying hard to acomplish is forget about technical details. We are aiming for a web-based game, but apart from that, right now I've only thought about architecture and development per asking of the rest of the team, and only did a fast-sketch of the server architecture I'm thinking about. I don't want to enter into class design, layers and communication protocols until the game idea is clearly defined.
The draft of the design document is still way from complete, but I'm enjoying this a lot :)
Oh, and there are chances that the game will be developed in Java, so maybe I'll touch it again, after more than 3 years since I left university (and with it, Java and C++).
Yesterday I finished Medal of Honor: Airborne, and I have mixed feelings: It is quite impressive and you almost feel like if you were in the middle of WWII, but... the game didn't last me one afternoon!!!
Why companies release games so damm short?
I can think of few reasons, but none of these are really good excuses...
-
Development costs are high: Ok, now doing a AAA title is like producing a Hollywood movie, but once you have all the assets (sounds, graphics, and some levels designed), why not spending one or two more months creating additional chapters? As a player, I feel cheated, like if I bought a really beautiful videogame, but which smells like released in a rush.
-
Designing a level is not easy: Ok too. Neither easy to do it "fun" nor to do it quick because the increasing level of details... but why not repeating some level designs with different makeup? Changing textures, enemy types and effects you can give it a different look... Hell, Wolfenstein 3D had tons of levels almost with the same GFX!
-
Schedules: Worst excuse. As a player, I don't mind if I have to wait further if I know I'll be getting a better product. Mass Effect has been delayed at least two times, but it looks it's being really polished.
-
Modding is available: That would be great, if MoH had modding options ;) But as most of EA titles, it doesn't (at least officially supported and provided), so doesn't applies here.
-
Designed for console: This is a (bad) excuse sometimes I've heard from friends. Gran Turismo or Final Fantasy series are quite long games, so find another better excuse!
-
Designed for casual players: Another increasingly typical excuse. What are difficulty levels for? Making a game shorter doesn't mean it'll be better for casual players, means shorter game experience.
Any other excuses you know of? Any good reason except costs for developing a game that you can finish in 5-6 hours?
One of the topics I'm slowly starting to read about and learn is WPF, and as I don't know anything about Flash (except that it must be cool for web games because there are millions of them ;) I've just found and read this comparison between Flash and WPF.
It serves well to get a general overview on what are the differences of both technologies, and contains source codes (too much, actually). Saddly, there's no comparison with Silverlight, but let's hope some similar articles appear soon.
Anyway, if you want to see how they work, it is a good starting point.
One of the nice features of developing a messenger robot/agent is that you can easily load data from XML files. Combining this with few lines of code, you can make your agent more rich by giving a different response each time. Here is an example:
We'll use this XML file to store answers for specific topics:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<answers>
<topicGeek>
<text>Yeah, of course I am!</text>
<text>Indeed, my friend</text>
<text>You are a geek too!</text>
</topicGeek>
</answers>
The first step is to define how to load our desired topic answers into a datasource:
datasource AnswersXMLFileLoader() => text
file
answers.xml
simple xml
answers
topicGeek
text {loop=content}
Then, we create a datatable to load those answers, and keep the desired fiels (in this example, just the text field)
datatable AnswersGeekTopicTable {expire=never}
load text {index=exact} from datasource
AnswersXMLFileLoader()
With this simple code, we count the number of elements of a datatable, randomly choose one, find it and return its text field:
function RandText(TABLE)
COUNT = get count in TABLE
ITEM = Rand(COUNT)
VAR = 0
TEXT = get text in TABLE
if VAR == ITEM
return TEXT
VAR = VAR + 1
return TEXT
Now we setup the procedure that will call our RandText() function and output to the user the answer:
procedure RandomAnswerGeekTopic()
ANSWER = RandText(AnswersGeekTopicTable)
- ANSWER
And finally, we create the pattern which will be answered (notice that "You are a" it's optional):
+ [You are a] geek
call RandomAnswerGeekTopic()
And that's all!
This 5 tips are very general, don't expect any magical formulae. They are based on my 5-year experience with the free spanish UO shard in which I help and do some administration tasks.
- Have a Website or at least a blog. Writing news, announcing new features/patches, changes and important subjects is vital.
- Provide official forums. While this needs aditional human resources (at least an administrator), part of it can be handled by loyal and friendly players (forum moderators). If not present, the players will create themselves forums, but if you provide them, you can have all the player base in just one place.
- Make contests, polls, and other participative events. Players can actually help you designing new logos or graphics, levels, or simply ideas for new game objects. Reward them with public recognition, a decorative in-game object, a t-shirt...
- Allow them access to additional tools or directly provide them. Why not creating a Wiki for the players to fill with game basics, lore and other info they find useful? If most of players use a tool or third-party software, place a link in your website to download it.
- Advertise your game, and promote advertising of your game by your players. Run a contest to design signatures promoting the game. Search for gaming tops or online game directories and add yours. Promote it in gaming portals. Send news to specialized game new sites.
While our player base has a quite steady graph (the player base grows very slowly), we have players who have been since the shard (server) was created, and some others keep coming back over and over. We're starting now to adquire new players who didn't even know the game (in the past it was more like word-of-mouth).
It's not easy to keep luring people to play a game 9 years old :)

Each time a new employee starts working at ilitia, we celebrate what we call a "Parrondo", a party in where we drink tons of beer and cider and eat spanish tapas all night long.
This time we hit a new record, with more than 70 people!!! (I think nobody knows/remembers the exact number }:)
Lots of employees of ilitia came, friends, colleages,... We even had geeky guests like Daniel Matey, Luis Fraile and Jose Francisco. Others failed to come, but next time I'll take them out of their houses if necessary.
I've uploaded just 2 photos to my web albums (and they aren't mine), so this time I'll give a link to Zoran's photos from the event ;)
Logging information of applications usage is something not only useful but most times vital. It can help both in the development phase (debugging variable values, code flows,...) and when your application is deployed (for example, tracing error sources).
While developing a Windows Live Agent, you can use the IDE integrated Query Window to test your patterns, matchings and debug some info, but when you start to test the Agent launched on MSN Messenger, things get complicated and you loose some of this capabilities.
One thing that I've implemented for our first agent is a "Log and Tracing" package, with some levels of information dumping.
Creating a simple file log is very easy:
function Globals_LogFileName()
return "AgentLog.log"
procedure WriteLog(CONTENT)
CONTENT |= ""
DESCRIPTION = DateTimeObjectToDateTimeString(GetCurrentDateTimeAsObject()) + " : " + ObjectToString(CONTENT) + "\r\n"
RES = WriteToFile(Globals_LogFileName(), "append", DESCRIPTION)
RES = WriteToFile(Globals_LogFileName(), "close")
The first function is what I call a "global constant". BuddyScript has some scopes for variables (local variables, package variables, global variables and shared global variables), but lacks support for global constants, so instead of having a global, per-user variable, or even worse, a shared global variable (which has to be locked-unlocked for reading it's value), defining a function that returns a string is IMHO the most elegant solution.
In this example, it contains the name of the log file.
The second procedure is the actual log writing. It creates the file if not present, and writes the contents of the parameter to the file. If the parameter is an object, it converts it to a string array with it's key-value pairs. If it's a simple data-type, it writes it's contents like if it were a string.
Another trick you can see here is avoiding null references with parameters. By doing CONTENT |= "", if CONTENT comes uninitialized, it becomes initialized as an empty string (BuddyScript uses internally almost everything as strings).
Having objects is way more handy, so for example if you want to write an exception, doing EXCEPTION.DATA |= "" will avoid exceptions thrown without DATA property failing and crashing your code.
This is a very simple example, usually you would log more stuff, like user email address, source file where the WriteLog() procedure was called, or a short description just in case you want both to flush an object's contents and a message indicating why you do it.
Note: I will mix simple low-level posts with tricks and tips like this one. The SDK documentation is very good as a starting point for learning the basics.
Today I'm a bit tired so the selected topic is "Tweaking", in this case the Firefox browser.
Firefox is my favourite browser, but sometimes it takes too much RAM (more than 150 MB), and as I'm a bit maniac about computer performance, few days ago I researched a bit about how to improve it's performance and reduce it's memory usage.
I found lots of small tips and tweaks, but not so much "complete tutorials", so this are the two best ones in my opinion:
-
Firefox Tweaks (element14): A fabulous guide to tweaking. Contains a collection of tips which reduced my memory consumption from around 150MB to 50MB, and improved the webpages loading times noticeably.
-
Firefox Tweak Guide: Another excellent guide. This one is bigger, because lots of configuration options are explained in detail. I used it after the first link, to further tune-up the browser, but it can be a bit "too much" if you just want some quick kung-fu tricks ;)
I'm right now reading this Windows Vista tweaking guide now, to see if I can disable some useless stuff and regain more RAM or CPU cycles :)
For the past months, I've been working with something new: Windows Live Agents (or, as most of us will call them, bots).
ilitia was chosen as a Windows Live Agents Partner by MSN Spain, and we've been trying the official SDK. Few months ago, we started developing our first commercial bot, for an important client.
Now, the bot is reaching a beta stage, where it works and does some cool stuff on the inside, and will probably launch in few time (now the client needs to do a big QA and human relations check on it, to choose how it will talk, behave and look).
We're also starting a second commercial bot probably this week, so the work keeps coming and I'll probably be developing bots at least for a couple of months.
For this first post, I don't wan't to dig into complex stuff, so instead I'll provide info both about the official SDK (which uses BuddyScript, a custom scripting language developed by Colloquis, the company that Microsoft bought and adopted as the official SDK), and third-party SDKs and APIs available for indie developments.
So here they go :)
Official WLA SDK
-
-
MSDN WLAs forum: The new, official forum for questions about Buddyscript and WLAs.
-
-
-
Windows Live Messenger Add-In API: With the appearance of Windows Live Messenger 8.0, Microsoft exposed a .NET API to create add-ins that attach to MSN Messenger and allow to create Agent-like assistants (I've just discovered this one so I still don't know it's limitations or capabilities in depth).
Unnoficial SDKs & APIs
-
Incesoft: A small API for multiple languages (.NET, Java, C++) that allows to develop agents. The problem is that the server is hosted by them, so speed is not too fast as your bot/agent has to bounce from your "logic components" to their servers, then to Messenger servers and finally to the user's Messenger window.
-
DotMSN: Another API, this one fully run on your side, and extensible via .NET. While not professional and scalable, allows the greatest level of customization and control of your agents.
-
AIML: An open standard to develop natural language for Artificial Intelligence conversations, via XML.
-
Wikipedia info on MSNP: Wikipedia link to gathered information about Microsoft Notification Protocol, which MSN Messenger uses to transport the conversations.
Thanks to gabi for the Messenger Add-in & DotMSN info!
Note: Next post will start with handy tips, coding examples and other things interesting if you're developing WLAs.

I've just came back from a weekend in Salamanca with some of my friends, so tomorrow I'll return to normal activity (and a new topic of which I'm going to start posting from now on).
As usual, I've uploaded some photos to my web albums.
Did you know that at ilitia we have an "uncommon" pet?

His name is MeMata (something like "it kills me" in spanish), and he is a mixed public relations and developer that we adopted at Microsoft's Madrid CodeCamp 2006. He now lives at our offices.
He's young but has gone through a lot of adventures, like when we took him with us for our Kick'off 07. When we were moving our supplies to the bus, he fell off from my bag and our grandfather Agux kicked him very hard. The funny part came when a car came and the driver stopped, alarmed thinking what the hell could be there in the middle of the road. Thankfully MeMata survived the accident.
I could spend hours talking about how MeMata scares our clients when they come to the office, or the fantastic programming skills he has (when he works, which is not very often...), but I think it is better to just point to his Picasa Web Album (which I often update).
Today I've been searching for more missing software to install into my new PDA-phone, and one that I didn't tested on my old PDA was NXT Remote/Pocket Remote, a small tool that allows remote control of Lego Mindstorms NXT robots via Bluetooth :)
Setting up the connection is quite easy (there are step-by-step instructions on the application's website), and it works really nice!
Here is how the application looks:
Now I can chase my dog with my robotic creations }:)
Note: The tool I used for the screenshot is Pocket Controller Professional. it is a "remote desktop"/VNC for PocketPC, with skins and some handy tools like a Registry Editor, a Task Manager or a remote MS-DOS Console. Quite handy too if you're debugging your Compact Framework applications from VS2005 directly on the device.
Today I did a bit of research about porting boardgames to online multiplayer games (for a possible project? who knows ;)
A standard, turn-based game has a clear set of rules. When porting it for example to PC, some decisions have to be made, and if the game is going to be multiplayer, those decisions become critical.
The game mechanics can get to one of this states:
-
Keep the pure, turn-based rounds. The most obvious one. This means having to wait for the CPU to compute it's turn (which as of today is instant except in games like chess ;). Example:
Magic The Gathering.
-
Keep turn-based rounds, but with time limit. Each player has a time limit to make his decisions. If time expires, turn goes to the next player. This is good to create a "pressure" state in the players, but generally I don't like it. Example:
Space Hulk boardgame.
-
Switch to real-time. This may appear trivial to do, but very often a game is meticulously designed to take advantage of careful turn planning, so switching to real time may crash the game experience. Example:
World of Warcraft.
-
Develop a mixed-mode. This is the approach I'll probably choose. Action takes place in real time, but each action has a
cooldown time, so you have to plan what are you doing ("
are you going to slash into the skeleton skull with your sword, which is fast, or are you going to throw him a fireball, which takes 3 seconds to cast?"). Example:
Final Fantasy VII's Active Time Battle.
Another option that I don't see suitable for my game idea is the Conditional Turn Based system, in which there are no rounds, but a "timeline" of turns that gets modified by each player and/or NPC actions. It is similar to the Active Time Battle, but more reminiscent of turn based games (and I'm searching for a way for the game to be more real-time, not more turn-based).
So... What would you choose? Would you play like in D&D in pure turns? or you would prefer a more real-time like experience?
EA, to celebrate the 12th aniversary of the C&C series, is giving for direct download and for free the pc videogame Command & Conquer Gold!!!
This is a fantastic gift, as C&C is one of the greatest strategy games and made history for it's simple interface and "high quality" videos. Go and grab it if you don't own it yet!
The game can be downloaded at the official website.