Archive for November, 2007

fragment space

Since the beginning of the year I’ve have the idea to create another website in order to split apart my game development work from my application development work. So digital radiation would be used for all game dev. related stuff and fragment space would be used for all my application development work.

My game development work is at a standstill and my application development work is going at a snail’s pace. My full-time job as a developer at NeedTuNo takes up the chunk of my time on the weekdays and one the weekends I just try to go out and get away from the PC (although I don’t think I’ve been very successful so far; damn Unreal Tournament 3 demo.). Anyways, firesync 2.0 is, for the most part, done (I’m just working on some last minute polish) and it’s the perfect flagship application for fragment space. A placeholder for the fragment space site has been up for months, but soon the actual site will go live and firesync 2.0 will be released.

A glimpse of the site to be can be seen @ (Note: firesync pics are old.)

fragment space logo

As for what comes after firesync 2, I’m not sure. It likely won’t be firesync 3 (even though I already have a fairly good idea of what firesync 3 will be like), as I’d like to do something fresh. I have lots of ideas, but the trick is to find something worth doing and something that’s manageable (short development cycle and solves an end-user issue is a simple, effective manner not provided by other applications).

I’m also not sure about putting up any of the small utility apps I’ve done (that I’ve posted in this blog from time to time and that’s in my portfolio) as, in the viewer’s eyes, they may serve to the cheapen the quality of “larger” (it’s still relatively small) apps such as firesync.

While the next app is uncertain, I will be trying to follow a few key design principles for all fragment space applications, there include:
  • Simple, intuitive interfaces. Anyone should be able to pick up and use the application without the need for a manual.
  • Limited use of the windows registry. I think the windows registry is a horrible place to store application specific info, config files are simple and elegant and they don’t flake out if the registry becomes corrupt or you have to reinstall windows.
  • If the application needs to startup with windows or integrates with explorer, these options should be toggle-able from within the application.
  • Advanced options exposed thru XML configuration file. Provides advanced options for expert users while maintaining a simple, streamlined UI. (firesync 2 does not do this, as no advanced options are exposed, but it’s planned for firesync 3)
  • No spyware. No adware.
In the future, I’d also like:
  • Custom UI for all applications that’s consistent across all platforms. There’s a lot of limitations and “design ugliness” that results from just sticking with the system’s UI. I’ll probably explain my reasoning more sometime in the future.
  • OS X support. (I’d also love to do something on the iPhone or iPod Touch hardware).
Finally, I’d also love to work with others and have them contribute their talents to fragment space, whether on a joint venture or something they’d like to do solo that they think would fit into the fragment space world. However, I’m not holding my breath. Unlike game development, there doesn’t seem to be any sort of community for application development, so I have no clue how to attract talent; even with the game dev communities, it’s difficult, so for app dev it’s seems impossible – especially considering that for the forseeable future, all applications will be free, so there’s no profit or payment for developers. Also, as fragment space is my baby, I’d likely be pretty strict about what appears on the site and ensuring that applications follow the guidelines listed above, so I might not be the nicest person to work with if our ideas don’t mesh.

That’s all for now, more info, design thoughts, etc. on firesync 2 soon.

Jonathan Blow, Game design, and McDonalds

I came across this news story on NextGen today, which is actually a summary of this news story from develop magazine. I’ve never heard of Jonathan Blow or his thoughts on game design, so in an effort to educate myself I went to his site where I found a video of a lecture (aren’t these things called talks?) he gave at a conference in Australia. Most of the lecture was on prototyping which was actually pretty interesting; however, my interest was in his controversial thoughts on design and how they mesh with various ideas on design I’ve been trying to formulate (the first of which being atmosphere, which I wrote about a while back).

One of the first topics touched on in the news articles and the lecture video is the idea that game developers are concerned more with how to get people to play their games and not why people want to play their games.
“All we care about is whether a lot of people want to play our game. We don’t care why they want to play, and we don’t show care for their quality of life,” he said.
From what I’ve read from developers in the amature, independendent, and non-independent crowds, this analysis seems incorrect or at best a half-truth. From what I can tell, most developers strive to make a game that they themselves enjoy playing and then try to expose and attract others to play their game. So, yes, developers do want a lot of people to play their games, but it’s not necessarily all that’s cared about. I can’t disagree with the argument that most developers don’t care why gamers want to play, but it’s likely that developers view gamers as others with their mindset and the elements that attract them to the game will inherently be what attracts gamers. (I’ll gloss over the quality of life issue, as he elaborates on what he means further on).

Next is something he mentions in passing in the video lecture, where he talks about games being taken seriously as art,
Art comes from the motivation, from the strong why…
The “are games art?” question always pops up every now and then. I’m not going to attempt to answer the question, but I do question the idea that art is derived (or at least derived solely) from the motivation behind the work. From my perspective, the viewer, reader, player, etc. is important as well and so is their understanding of the work and how it speaks to them. I reject the idea that someone is artistic or a work has artistic value based on the motivation of the person behind it; this just seems like an egotistical metric of attributing value.

In both the lecture and news articles, his views on scheduled rewards is noted,
In-game ‘scheduled rewards’ were playing a major part in this [not caring why players want to play or about their quality of life] he said, saying that collectibles, achievements, story progress and unlockables were poor substitute for genuine enjoyment in modern video games.

“MMOs have empty gameplay but keep players hooked with constant fake rewards,” he offered as an example. “Would players still play our games if we removed these scheduled rewards?”
His analysis is that scheduled rewards should be replaced with genuine, enjoyable, core gameplay. I can’t say I have a strong opinion of scheduled rewards one way or the other, however, I do believe if a game is able to capture the player in a compelling atmosphere, gamers would still play even with a lack of rewards. I’m not a fan of eliminating scheduled rewards in favor of focusing on a singular aspect of (enjoyable) gameplay. Most games have multiple aspects of gameplay which function together in synergy. If there is only a singular aspect of gameplay, you seem to need the scheduled rewards to keep players interested for any substantial amount of time. The game inherently becomes boring. Flow is a good example. I played the flash version and although it was cool for a while, I really didn’t feel compelled to play after about a half-an-hour. Like others (from what I read on blogs and message boards), the only reason that compelled me to play even this long, was that I was eager to see my creature evolve (in essence, a scheduled reward), and my tolerance seemed far below average (from my perspective the game seemed to be essentially a pretty version of Snake). Also, in Jonathan Blow’s game, Braid, you collect puzzle pieces, again, this essentially boils down to a scheduled reward – it’s your reward for manipulating the spatial and temporal elements of your world.
Said Blow: “In pursuing ever more players the games industry exploits them in an unethical way. We don’t see it as unethical, though, because we refuse to stop and think about what we are doing

“We don’t have a sense to be ashamed.”

He pointed out how the tobacco industry and McDonalds have faced such criticisms from commentators and said that World of Warcraft’s method of teaching players about routine was similar and “akin to advertising”.
This seems a bit out there. World of Warcraft’s developers want players to keep playing and to attract new players, so they institute routines by which scheduled rewards are granted. Viewing this as unethical implies that the players are ignorant of their own desires and the developer is solely focused on the acquisition of profit, neither of which I believe are true. At what point does the personal responsibility of the player come into focus? The same question goes to the comparisons with McDonalds, in large quantities fast food is bad for you, but do we completely ignore the responsibility of the individual to control their dietary intake? (I won’t get into the tobacco industry b/c that’s distinct here, as tobacco yields a physical addiction).
This was important as the games industry grows he said, predicting that “games are going to be huge” and in time grow to shape culture.
From my perspective, games already have the potential to shape culture, they simply don’t have the accessibility (expensive consoles, complex PC requirements, complicated controls, etc.) or social acceptability (like animation, games are seen as primarily for kids – although I think this may be rapidly changing) as other mediums. Jonathan Blow’s argument seems to be that games must first be changed to fit within a certain social norm or cultural context in order to be seen by the mainstream as a means to shape culture.
All games teach, and if games are going to be a foundation of human thought the question we have to ask is what they will teach the audience.
Technically, we learn from everything (or we can potentially learn from everything), so in essence everything teaches. I’m lost as to what the criteria is for consideration into the foundation of human thought. As for games, should the primary focus be to teach or to entertain? There’s a lot of value in both, but games have captivated people b/c they’re fun, they have entertainment value, forgoing that in an attempt to create something that primarily focuses on teaching, your likely abandoning what makes a game a game.

Success Depends on Others Failing

I came across this article today. It’s somewhat interesting overall, but there are 2 things which particularly struck me, first, the following paragraph…
The researchers were especially interested in the set of outcomes where both players answered correctly. For any given prize value, the brain’s reward response was bigger if the other player earned less. Players on average were more pleased with a 60 euro prize when the other player got just 30 euros, for example, than they were if both players earned 60 euros, or if the other player got more.
I can only guess what my brain scan would show, but my gut feeling is that I’d likely feel empathy for the person being rewarded less and/or reduced satisfaction (or no satisfaction) due to the fact that my reward is inflated. However, I could definitely understand the negative reaction if I were the person being rewarded less and the satisfaction for being rewarded more for doing more.

Also, this seems really sad to me. It would indicate that humans are, in general, inherently selfish as we have no problem seeing others rewarded less for doing the same work.

(I hate that the article somewhat convolutes the issue, by casually making a segway to the “keeping up with the Joneses” concept; there’s a fundamental difference in keeping up and keeping up unfairly)

The second (well, first actually) thing that struck me about the article is the picture used…

I guess it’s meant to convey success due to the expensive jewelry shown (the necklace being held); the woman on the left satisfied by her purchase, her satisfaction stemming not only from her purchase, but also the fact that the woman on the right is looking at the necklace longingly.

That was not my first impression.

Looking at the eyes and facial expression of the woman on the left, I couldn’t help but think there’s an erotic subtext present.

Whatever… maybe I just have a dirty mind.

Win32 annoyances and tips when working with files and processes

1. ShellExecuteEx and lpFile

memset(&setupxInfo, 0,
setupxInfo.cbSize =
setupxInfo.fMask = SEE_MASK_FLAG_NO_UI |
setupxInfo.lpVerb = L
setupxInfo.lpFile = L
"setupx.exe"; // can't be full path
setupxInfo.nShow = SW_SHOWNORMAL;
setupxInfo.lpDirectory = L
setupxInfo.lpParameters = NULL;


The code above is correct and it works, however if the lpFile member of the SHELLEXECUTEINFO struct is the full path to the executable file the ShellExecuteEx call fails. It seem you must specify the working directory for the child process (lpDirectory) and the filename only for the lpFile member.

2. SHFileOperation and pFrom

SHFileOp.hwnd = NULL;
SHFileOp.wFunc = FO_DELETE;
SHFileOp.pFrom = killFolder;
// double-null-terminated string, can't end with path separator
SHFileOp.pTo = NULL;
SHFileOp.fFlags = FOF_SILENT |
SHFileOp.fAnyOperationsAborted = FALSE;
SHFileOp.lpszProgressTitle = NULL;
SHFileOp.hNameMappings = NULL;

In the above code, SHFileOp.pFrom (killFolder variable) is a double-null-terminated string to a folder I want to delete (I want to also recursively delete everything inside the folder, that’s why I’m using SHFileOperation). However, aside from the peculiar double null-termination, the path can’t end with the path separator char or the SHFileOperation call fails.

3. WaitForSingleObject

After calling ShellExecuteEx or CreateProcess you can do the following to wait for the child process to terminate:

WaitForSingleObject( setupxInfo.hProcess, INFINITE );

4. fclose

Don’t forget to close your file handles. I spent a few hours today trying to figure out why I couldn’t delete an exe, thinking it was an issue with the ShellExecuteEx function. Turns out I opened the file and forgot to close it.

btw, Process Explorer is very helpful and a great tool for programmers; it’s wonderful for detecting things like unclosed file handles.

The pains of making an installer + uninstaller

I’ve been working on an installer/uninstaller for firesync 2. The installer is fairly straightforward, although it is quite a bit of work to set registry keys and make shortcuts, but overall it’s all fairly standard stuff. The one unique aspect of the firesync installer is that it is multi-part and actually consists of 2 executables. The first executable, the setup.exe file that will be distributed, is a native code binary + a zip archive. This program checks that the .NET Framework 2.0 is installed and extracts the zip archive to a folder in the user’s temporary directory. The zip archive contains the firesync executable and data files, but also contains another setup executable setupx.exe (a .NET executable). This executable is the real setup, as it shows/prompts the user for setup information (installation directory, whether or not to make a desktop icon, etc.), copies over the necessary files, makes program shortcuts, and writes registry entries so that firesync appears in the Add/Remove Programs list.

The reason for the multi-part installation is that it is much easier to design an interface using the WinForms designer in Visual C# compared to MFC, wxWidgets, etc. However, a .NET executable alone won’t suffice because users without the framework will just be given a cryptic error message (I think you get dialog about mscoree.dll not being found) and they’re not actually told that they need to install the framework.

(fyi, the native code executable is being done with wxDevC++)

Now making an uninstaller should be simple, your just deleting files and removing a couple of registry entries (in general, I avoid the registry and for firesync I’m only using it for the entry in Add/Remove Programs). Also, I think it’s rare that a user will uninstall the .NET Framework then try to uninstall firesync, so it’s pretty safe to make the uninstaller a .NET executable. However, there’s one big issue (and it’s a major pain in the ass) that pops up when it comes to making an uninstaller, how do you delete the uninstaller executable itself? I was lucky enough to stumble across this old Q&A from Microsoft Systems Journal. It’s a very inter… well to be honest it’s a very boring read (how interesting can deleting a file be?), but it’s important stuff. Ultimately, I went with the simplest method, and just used a batch file (although I haven’t played around with setting thread priorities as mentioned in the article; I’m not crazy about doing it and I’m not sure if it’s even worth it).

Finally, some important issues I ran across that was not mentioned in the article:

  • The directory your attempting to remove may be in use by the OS or another application. Another loop in the batch file should take care of this.
  • You can’t have the batch file in the directory your trying to delete (you’ll never be able to delete it as it’ll be in use by cmd.exe, you’ll have to manually kill cmd.exe to delete the folder and free the CPU). This is simple to solve, I just put the batch file in the user’s temp directory.