Categories
Game Development Geek / Technical Personal Development

Finding Ready-Made Code

This past weekend I was trying to work on some code that makes use of math. Specifically, I was working on acceleration and velocity, but I didn’t necessarily need a heavy-duty physics engine. I just wanted some low-level C++ code for vector math.

I shouldn’t have to write it myself, right? It’s been done before, by myself and others, and I’m sure some publicly available code would be better tested and more functional than anything I would write. It should be easier to find some code online than to pull out the math books and write my own. There is no need to reinvent the wheel.

It spent about an hour and a half researching a Vector class. It was difficult to find because a number of hits were for imitators or enhancements of std::vector. When I finally found a good implementation, it was part of a small library, but it was fairly trivial to separate it out. I had to make some changes to adapt it to Doxygen, but it definitely beats creating a complete class definition from scratch over the course of a few days.

It was difficult to find code that was generic enough and well-written. Some were too specific or too unwieldy. I found one library that was a “tiny matrix and vector” library, only to discover that the vector was a small footprint version of std::vector. It was one of those WTF moments. I found one class that would have been fine except that the author didn’t bother to present his name or the date that it was created. How can I keep the author’s name in the source code if he/she didn’t bother put it in there in the first place?

I finally found some useful code through Koders, a source code search engine. I also learned about a few other code search engines that I may use in the future:

Planet Source Code
Krugle

What do you do when you need some basic code that you know should be available as a library? Do you just take the time to write your own, or do you look for code online? Do you outsource it to someone, using a service like Rent A Coder?

Categories
Games Geek / Technical Marketing/Business

A Loaf of Bread, a Game of Pong, and You?

I already wrote about Nolan Bushnell’s new venture of a restaurant chain that will feature video games, food, and alcohol that will somehow appeal to women.

turbo from the #gamedevelopers channel pointed me to the restuarant’s website. It actually does sound promising. You can play games with people at your table, other tables, or even the entire restaurant. You can order food from the touch screen display, which is actually something I’ve been telling my friends we should be able to do for years. You can even go to wine-tasting school by having wines brought to you and scoring them on the screen.

There is even a blog, and one of the recently made posts outlines the kind of games that you will see at uWink:
Nolan Bushnell’s Rules for Social Games

Will uWink develop all of its games in-house, or will they be outsourced to some enterprising indies? Is “social game” really a new genre, or is it just a marketing buzzword for making the LAN party experience more accessible to the masses? When will we see uWink in Chicago?

Categories
Game Development Geek / Technical

Debugging

Richard “superpig” Fine has written a piece called Introduction to Debugging. While it is clearly biased towards using Visual Studio’s debugger, it does provide a general checklist of things to do when killing those bugs:

  • Issue recognition
  • Intelligence gathering
  • Diagnosis
  • Prescription
  • Response
  • Verification
Categories
Games Geek / Technical

Video Game Detox Clinic Opens in Europe

This past Sunday I read an article in the newspaper about a video game addiction center opening in Amsterdam.

Smith & Jones Addiction Consultants have created Game Zone Center, an “outdoor gaming treatment camp”, to help people with a video game addiction.

I am not going to claim that there is no such thing. In fact, I think it makes sense that there are people who have a serious addiction problem with video games since there are addictions to a number of other things. I take issue with the following statement:

The participants will gain true self esteem by spending 2 weeks in a team of real people, achieving real goals and having real fun!

That statement bothers me because it sounds too much like the uninformed statements I’ve heard from people in high school and college. “Why don’t you put down the controller and get a life?” or “Why don’t you go out and hang out with real people?”

To a lot of those people, going out smoking and drinking with friends until you get sick is healthier social time than LAN parties. They were not exactly the kind of people I wanted to use as role models. Besides, not all games involve solitary confinement, especially not today. Even the single player games can get communities of players talking to each other. It may sound like I am stretching the truth to make a terrible point, but I’m serious. Playing video games does not require cutting yourself off from the real world.

I don’t really know how to talk about “real goals” since I do not know what they mean. Video games involve goal-setting, and accomplishment of those goals can provide a very satisfying feeling. It does not compare to life accomplishments, such as getting a new job or winning a championship soccer match, but it isn’t as if video games promote inferior goal-setting techniques. I would argue experienced video game players are the ones most likely to create great goals for themselves. They know that if they set out to acheive something, whether in a game or not, they can do it if they attempt it. They’re the ones getting the experience of trying, failing, and trying again.

Video games are real fun. I’m sure that the clinic will offer their own enjoyable activities, and I’ll be the first one to tell you that I think sports are a lot of fun. I just don’t see how playing a simulation of a sport or any other type of game disqualifies it as “real” fun. Tell a bunch of people playing Super Smash Bros Melee or Guitar Hero in the living room that the fun they are having isn’t real. Tell them that it doesn’t count unless they are actually playing guitar or having epic martial arts matches. I’m sure it will be a real eye-opener and they’ll change their ways.

I don’t know nearly enough about the subject to talk about the addiction problem. I’m sure it is a real problem, and those suffering with it will need the help that such a clinic can provide. That issue is not what I am talking about. I simply don’t appreciate the sentiment that video games are the enemy of normal, healthy, and socially acceptable people. Not to get too dramatic, but I’m waiting for someone to say,”Well, have you ever tried not being a video game player?”

Categories
Game Development Games Geek / Technical

Carnival of Gamers is Here!

I keep forgetting to post about it when it happens, but the Carnival of Gamers is here! This time it is hosted by Kim Pallister at …on pampers, programming & pitching manure. My post about Roger Ebert is featured this month, as well as a number of great posts by other participants.

Categories
Games Geek / Technical

Nethack Song

Greg Costikyan posted a link to the NetHack song. You can find the lyrics and an mp3 of NetHack.

And, of course, the game is teh awesomes.

Categories
Geek / Technical Linux Game Development Marketing/Business Politics/Government

Open Source Java

A friend pointed me to this article: Sun Promises to Open Source Java.

If Sun does make Java open source, it is good news for people who prefer to run Free operating systems. It’s one less technology that they have to do without. Existing open source solutions are always behind the one provided by Sun.

Now the choice for Free software developers is “Do I switch to Java or do I continue to use the language I have been using?”

It is interesting that Sun’s main concern is fragmentation of the codebase. When you give people the right to redistribute the source, it is bound to happen; however, the worst-case scenario nightmare that opponents of Free software think of is not typical. There aren’t exactly hundreds of forks of the Linux kernel, for example. Everyone basically works off of the main branch of development. If someone wants to take Linux in a different direction, they are free to do so. Of course, if everyone is sticking with Linus’ original project, then the fork won’t exactly be a problem in terms of “fragmentation”. And with Free software, forks are free to merge back into the original project anyway. Contrast the situation with software under the BSD license, which would allow someone to fork a project without giving anything back.

Categories
Game Development Games Geek / Technical Linux Game Development Marketing/Business

Linux Gaming Feasability

Hackenslash had posted Is Linux Gaming Plausible?. It makes for a good read, although I felt it was light on details and didn’t provide much of a definitive answer.

However, a major disadvantage for Linux gamers is the availability of DirectX in Windows, a multimedia tool that allows developers to create applications easier for the Windows platform.

“Unless DirectX runs on a different platform, it (Linux game development) might not really take off,” Gotangco said, adding that Linux gaming and game development would most probably remain an “indie” or independent industry.

DirectX is a Windows technology, and as such it is platform-specific. I don’t see Microsoft opening up access to their API to other operating systems. Since some major games, notably Doom 3 and Unreal Tournament 2004, have been ported to Gnu/Linux without the “advantage” of DirectX, it shows that Gnu/Linux game development is entirely possible and doable. Like DRM, DirectX isn’t a requirement for game development.

Multiplayer game servers are almost always provided for Gnu/Linux, and so the porting effort shouldn’t be too difficult for the client software. Unfortunately, when a developer uses a platform-specific tool such as DirectX, the porting effort becomes difficult. To create a version of the game that runs on a different system, you essentially have to gut your game code to remove the DirectX-specific parts and replace them with something available on a the target platform. Most developers will decide that the rewards would be too little to justify the expense of making such drastic changes to the code.

Still, I don’t believe that game development will be so dreary on Gnu/Linux.

A few Linux gamers actually have ways of circumventing the cross-platform issue of playing an enticing Windows game to Linux, without having to port it. One answer is just emulating the game for Linux. But according to Zak Slater, this isn’t an accepted industry and he said it is better for users to buy Linux versions or directly create Linux-native games.

I am 100% in agreement with Slater. I am not a fan of technologies like Wine or Cedega. It’s great when it works, but I would rather have native support for my platform of choice.

While the Linux gaming industry would not certainly be able become as big as traditional PC gaming, both Slater and Gotangco agree that Linux gaming is there to stay. They suggest that Linux game developer-hopefuls can get their Linux game fix from Icculus, Pompom Games (www.pompomgames.com), Tux Games (www.tuxgames.com), among others.

I’ll also note that the Torque Engine from GarageGames is both inexpensive and cross-platform, so games like Orbz and Dark Horizons: Lore can have native Linux-based clients right out of the box. With more indie games like those, I don’t think that we’ll have a problem if game development on Gnu/Linux remained an indie industry.

Also, using open source engines will probably become more common in commercial games. The infrastructure of a game isn’t the game, yet developers always spend a lot of time on recreating it. Using existing tools just makes sense, and using open source tools gives you a number of advantages, including the ability of your more technical customers to give you more than a simple bug report.

I believe that gaming on Gnu/Linux is definitely plausible. It’s very difficult to tell how many Gnu/Linux gamers there are since there are hardly any games available for them and they’ll likely pay for their games on the Windows system for lack of a better choice. They WANT native games for their preferred OS, and so far there aren’t many options.

Categories
Game Development Games Geek / Technical Personal Development

A Project Completed!

At the beginning of March, I interviewed for a position at a company. I was asked to create a small text-based game to demonstrate how I would go about solving it. After a week, they asked to see my code even though it wasn’t finished yet. Apparently they liked it since I got the position.

Even though there was no need to complete the project, I kept working on it. Last Friday morning, I finally finished it.

It took almost two months of (admittedly inconsistent) part-time work, but I have finished a project. It was simultaneously simple and more complex than I thought it was going to be.

I used the tips from my previous post,Object-Oriented Game Design. I separated almost everything into Entity, State, and Action objects. In the beginning, I had to work on not only wrapping my head around the concepts but also code up the infrastructure to allow for it. By the end, adding a feature became as simple as creating the appropriate State or Action derived classes.

I’ll admit that I cheated a bit. For instance, when I create the game board from an XML file, I have a class that has no business populating the board with Space objects. I probably could have created a few Action classes to do it, though. PopulateBoard, AddSpace, etc.

Still, the game is finished. I spent a bit of time trying to match up each delete with its respective new. I fixed an off-by-one bug that would crash the game if you moved back three spaces and you were going to cross from the beginning of the board to the end of the board.

On the other hand, it isn’t really a “game” since there is no interaction to speak of. The players roll two dice and move according to the dice. There are no choices. Still, this simulation proves that it is easy to create games based on entities, components, and actions. I hope to translate what I learned into Oracle’s Eye and other games.

Categories
Games Geek / Technical General

The Name Everyone Is Talking About

Even Seth Godin had something to say about Nintendo’s Wii, so I felt that I should comment.

My first impression? I thought it was a terrible name. I get the concept of “togetherness” and all, but Wii? Seriously? I won’t try to make a bad pun with it because anyone who was on the world wide web after last week’s announcement would have read them all anyway.

Interestingly, I feel that now that everyone has gotten it out of their systems, we can all agree that Playstation and XBox were pretty bad names as well. We’ve gotten used to them though, so if Nintendo doesn’t make a new announcement admitting that they made a mistake, we’ll probably get used to Wii, too.

Still, I’m shaking my head. Does it make more sense in Japan at least? Are the Japanese wondering what the big deal is with the rest of the world’s reaction?