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 Linux Game Development

Oracle’s Eye Development: March Goals

In mid-December, I wrote Oracle’s Eye Development: Gameplay Tweaks, Planning Next Steps. I will summarize the list of next steps below:

  • The Player should not be able to occupy the same space as a Ball.
  • Graphics: the quality of the images and the animations need to be improved greatly.
  • Sound: need to add music and sound effects
  • Levels: Rooms should be able to have different dimensions. The Player should be able to choose levels from a menu, and finishing one level should allow him/her to continue to the next one.

I’ve accomplished the first item. The Ball and the Player feel more solid since they don’t overlap each other.

I have managed to implement level loading using TinyXml. The player can’t choose levels yet. The level to load is hardcoded currently, which means that if I want to test different levels, I will need to recompile each time.

1.5 out of 4 ain’t bad, right?

Since I wrote that original article, I’ve added a few more items to the list:

  • Cross-platform builds: I want to have a Gnu/Linux and Win32 binary built from the same source.
  • Installers: I want Gnu/Linux and Win32 installers.
  • Reintroduce banked walls: otherwise, having to reset the level if the Ball gets into a corner would be annoying.

I want to be able to compile and build packages to provide people a way to try the game. It’s hard to get feedback when the only people who can immediately check out my progress are Gnu/Linux users who don’t mind unpacking a tar.gz file and finding the binary. I’ve improved the Makefile so that it is easier to compile the program, but I’d like to be able to provide an installer. I think providing RPMs and .deb files would be a good start. As for Win32, I’m sure there is some installer setup that I can get scripted to run on my Gnu/Linux system. I just need to find one.

I had eliminated extra items like banked walls and pipes because I thought doing so would help me to focus on making the game. They became nice-to-haves instead of necessary components of my game. Now that I’ve had a chance to play the game, I can see that certain items are going to be a bit more necessary than I originally thought. It is easy to kick the Ball into a corner. The only way to continue is to restart the level. I’d prefer for it to be impossible for the Player to kick the Ball into a dead-end.

I’d be optimistic about finishing the game by the end of March, but I have a feeling that I will push back the date again. We’ll see.

Categories
Games Geek / Technical Linux Game Development

Total Annihilation Hawesomeness!

I believe I reported on TA Spring last year. TA Spring is a project to make a new RTS, but its current goal is to get a game running with the Total Annihilation data. The most exciting news for me is that the developers ported the project to Gnu/Linux. Now I can play Total Annihilation on my Gnu/Linux system AND play it in 3D!

Categories
Linux Game Development Personal Development

Motivation Threshold

This week I was coding for hours on end while also doing laundry. It was great because I had 45 minutes within which I was trying to be productive before I had to do another load. If I had 5 hours to sit still in front of the computer, I would probably get maybe an hour or two of work done. During some sessions, I only did 15 minutes of work, and usually towards the end. The thinking was “Oh, geez! The timer is going to go off soon! I better get some productive time in!” Other times, I managed to use between 30 minutes to the entire 45 minutes.

After the laundry, I was still in a productive mood, so I kept going past the time I would otherwise eat lunch. My sandwich was especially delicious afterwards. I worked for a few hours, and then I felt I needed a break. I decided to play a game that I needed to review for Game Tunnel. I t would be fun as well as productive. I played for an hour or so, then tried out a different game since I was in the gaming mood.

It took me hours before I returned to programming that evening. I wasn’t exactly in The Zone earlier, so it isn’t that I fell out. I just wasn’t too motivated. Maybe I was too tired? No, I felt fine. It took some effort on my part to convince me to continue programming. Steve Pavlina, as he uncannily and usually does, wrote about exactly what I was experiencing in What’s Your Motivation Threshold?

He describes how certain tasks might not require too much motivation while others require a great deal of it. Checking email or getting a snack might not require a lot of motivation. I think it is partly because it is so easy to do some tasks that it isn’t like you are thinking about the effort you need to exert. Some people can easily play games, but for most games, I have to reboot a machine so that it shuts down Debian Gnu/Linux and starts up Windows. I can’t just play a game for a few minutes like some people can. Maybe some people would consider it a good way to keep productive, but that’s besides the point. As for email, I have Thunderbird up and running at all times, so it is a few seconds of my time to check if I have new messages, and with RSS feeds, another few seconds to check on blogs and news items. It is so easy, in fact, that I can find myself checking email what must be hundreds of times a day. Those seconds can quickly add up.

Programming, however, involves work. I have to think about what I am doing, and the nature of what I am doing is such that it is uncertain and unexplored territory for me. I noticed that whenever I think about programming, I am either thinking about finishing something that I started the last session, which doesn’t require a lot of motivation to do, or I am thinking about starting or designing a new task, which requires a lot of motivation. In the first case, I am basically on rails. I might have already written some stub functions, so it is just a matter of creating the implementation. What algorithm would work best here? What variables would I need? I’ve done similar things before, so it is easy. It’s almost as easy as checking email at that point, although if you would have asked me to do so a year or two ago, I might have felt that the task was still daunting. In the latter case, I need to think a lot more. I don’t have a lot of experience with design or project management. I have to really want to do it before I will do it.

So I think that the motivation threshold is partly a function of experience and partly a function of urgency. I’m sure someone who doesn’t know much about computers would feel that checking email is still a strange and foreign task (present maternal figures excluded, of course) and would really have to need to check email before trying to do so. It is why students will wait to the last minute to do papers. It may be important, but it isn’t urgent…until it is the night before the due date!

I don’t have a strong and urgent need to finish Oracle’s Eye. My income doesn’t depend on it as I have a day job. So what helps motivate me to work on it? What acts as my motivation modifier? I remind myself that I want to depend on it. I want to finish the game so that I can have something to sell. The sooner I can get to selling, the sooner I can work towards getting GBGames to provide financial independence from any normal day job. I don’t always roll 20s, but it usually puts things in perspective and gives me the boost I need.

No, I’ve never played D&D.

Categories
Geek / Technical Linux Game Development

Distributing Binaries: G++, libstdc++, and Static Linking

I’ve been asking certain Gnu/Linux-using friends to test out Oracle’s Eye while I work on it. I’ve already found that I need to specify SDL_image as a requirement because of such testing; however, I don’t want to have to send an 8MB source package that contains mostly useless-for-the-tester code or binary data. Asking someone to get such a huge download and build a project themselves just to check it out or test it is asking too much, I think.

Since they don’t need the source to test it, I can just put together the binary files I need and send them together in a tar.gz or zip file. Or so I thought.

I stumbled upon one of the things that developers face when they are new to Gnu/Linux: shared libraries that prevent distribution of your binary files. When you distribute the source and expect people to build it usually isn’t a problem, but I don’t anticipate all of my end users being proud geeks who wouldn’t mind spending hours getting my game to work again when it was working perfectly fine previously.

I have two Gnu/Linux systems, one which runs Debian Testing, with a 2.6 kernel and GCC 4.0.2, and the other which runs Debian Stable, a 2.4 kernel, and GCC 3.3. I don’t update the latter often because I use it as a backup machine. I don’t want to accidentally introduce incompatibilities that would prevent it from working properly.

When I brought my “release” over to the other machine and tried to run it, I got the following:

./oracleseye: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

Let me just say that searching for solutions to this issue is difficult. You get a lot of results that aren’t relevant. Or I did, anyway. And I knew it had to be possible. Quake 3 Arena works fine, and I’ve upgraded libstdc++ a number of times, so why can’t my own code work so nicely?

So I asked on IRC, but people who leave their clients running all day even if they aren’t there are not too helpful. I searched some more, posted a question gamedev.net, but then found the possible solution immediately after the post.

Linking libstdc++ Statically by Johan Petersson talks about the exact problem I am having and offers a solution that is easy and seems elegant.

Basically, you need to statically link to both libstdc++ AND libgcc. GCC won’t let you do one without the other. And so far it seems to work.

I managed to get my code to run on my main system, my backup system, and my work system, and I no longer have to recompile on each. It only adds 0.5MB to my download, and I may even get better results once I stop using the debug build options. I’m not sure if there is a “better” solution, but I’m pretty happy for now. Thanks, Johan!

Categories
Game Development Linux Game Development

Oracle’s Eye Development: Graphical Enhancements

To continue with the improvements necessary for Oracle’s Eye, I decided I would focus on simple and quick things. On my list:

  • Shrink the Ball images to half size.
  • Create an actual sprite for the Player.

No coding for tonight, mostly. And there really isn’t too much to describe for the Ball, either.

The Ball

I just took the Ball image and scaled it so that it was 32×32 instead of 64×64. The tough part was rotating it 45 degrees at a time and putting it in the graphics collection for the Kyra Encoder. I could use the Kyra Sprite Editor to create the animation, but I found it much easier to manually edit the XML file. I already had the larger Ball, so I just changed the numbers. It was really easy, and I only had to fix a problem once. When I ran the game, the top of the Ball was cropped so it looked flat on top.

I even added some more Walls to the level. Eventually I’ll be able to dynamically load the level from a file so I don’t need to recompile for each change. For now I’m still working on the mechanics. The new Walls actually make the level a slight challenge. You can’t just kick the Ball three times and win anymore, although it isn’t all that more difficult either. Still, it is definitely a nice improvement. What is especially nice is that the Ball only spins if it is moving now. Once it stops, it stops spinning as well. Eventually I’ll change the rotation depending on which way it goes, which means more frames of animation to handle movement up and down.

I also decided to change the movement of the Ball. Instead of bouncing perpetually between the Walls, it now stops upon collision. I think handling the Ball movement will be more interesting this way, and levels can be created that take advantage of the fact that the Ball stops once it hits a Wall. We’ll see how it works out. It’s actually more of a puzzle now, so I think it might stick.

The Player

Next, I wanted to change the image of the Player. A white stick figure isn’t all that exciting. A non-animating stick figure is even more so. If he can’t move between two Walls, that would be a problem. I needed to provide a better Player.

I didn’t exactly want hyper-realistic graphics, but I realized that I hadn’t thought of an art style to use. I was thinking about making it simple for now and using a cartoon blob, but I felt it would be cheap and would make it look too much like Lolo. I wanted something that showed character but was also mine. I still wanted a cartoon feel to it, but I thought I would do well to make up a nifty character. Beetles? Snails? Pigeons?

I made a quick drawing of a corporate cubicle dweller. No reason, really. Yeah, this is all very temporary, but it is easier on the eyes, as you can see:

Image of updated Player and Ball

The Player still floats around the Room, but I figure that animating him would be premature. I would prefer something a bit more adorable than this guy. B-)

Downloads:

codenameOraclesEye-r97.tar.gz, 8.0 MB
codenameOraclesEye-r97.zip 8.5 MB

To build, you will need libsdl1.2 and libsdl_image. Go into source/kyra_2_1_1/kyra/engine/ and run ./make. Then, you go back to source/ and run ./make. To run, ./oracles-eye.

Only available for Gnu/Linux currently, but apparently it doesn’t take much to get it to run on Windows. Thanks, Scott!

Categories
Game Development Linux Game Development

Oracle’s Eye Development: Technically Completed!

That’s right! If you look at the plan for Oracle’s Eye, I finally completed the tasks that I originally wanted to have completed at the end of the second week of August. B-)

  • The Player moves in four directions. Actually, it moves in eight, although it is coded badly and so the Player moves faster diagonally than on the four main directions.
  • The Room is currently empty and hardcoded. I wanted to be able to load Rooms from a file, but for now I’ll deal.
  • I have a Ball that can be kicked around the Room. It obeys the Walls, although it will get stuck. The Ball also passes through the Player instead of stopping upon impact.
  • When the Ball hits the Goal, the level ends. Well, the program itself just closes, but still.

It’s ugly. It needs work. It’s definitely unpolished. But it runs, it works (for the most part), and it is pretty much “complete”. The question I have now is “Do I stop?” Should I continue to work on it and make it more appropriate for mass consumption, or should I just stop here and work on something else? Right now, you just move the stick figure towards the Ball, and upon touching the Ball, it moves towards the Goal. You could play around with it before it gets there, of course. It’s not very interesting, I know.

Download files:

codenameOraclesEye-r90.tar.gz, 8.0 MB
codenameOraclesEye-r90.zip 8.5 MB

To build, you will need libsdl1.2 and libsdl_image. Go into source/kyra_2_1_1/kyra/engine/ and run ./make. Then, you go back to source/ and run ./make. To run, ./oracles-eye.

Only available for Gnu/Linux, but there shouldn’t be too much needed to get it to run on Windows.

Categories
Games Geek / Technical General Linux Game Development

Why I Want to Make Games for Gnu/Linux

LinuxGames posts about the possibility of porting the sequel to Savage to Gnu/Linux. Basically, the Savage 2 engine is heavily utilizing DirectX, and the developers are going to try to work with Transgaming to get it working with Cedega instead of providing native binaries. Apparently Never Winter Nights 2 is also having these issues.

I really don’t like the idea that I have to buy games and then pay recurring fees for the right to play them on my preferred operating system. But if you read through the threads, apparently people are also upset at the level of support they received for the first Savage.

It is already bad enough that I have to keep Windows around to play most games, and there aren’t very many natively Gnu/Linux games of great quality, but why develop half-ass “ports” and make it worse?

I want to make great games natively for Gnu/Linux because I am tired of waiting for someone else to step up and do it.

Categories
Linux Game Development

Learning Kyra: Installing the New Version

I decided to install the latest version of the Kyra Sprite Engine since I am still so early in the Oracle’s Eye project. Historically, Kyra allowed you to dynamically link to the library, and so I had it installed on my system as any other library.

I wanted to install the latest version similarly. I found that the latest version doesn’t have a working configure file; I was expecting to be able to use the standard ./configure; make; make install. It still worked for the most part without the ./configure part. In fact I took advantage of checkinstall to create a nice Debian package for me so I can uninstall and install easily.

So it builds, but I found that there are a few differences. For one, kyra-config doesn’t exist. I normally used it to get the cflags and the lib arguments for my Makefile, similar to the way you would use sdl-config. So, how do you build a project now?

I asked on the Kyra forums, and the maintainer was actually just sitting in front of it waiting for my posts. He was that quick! Eventually I found that the way I wanted to use Kyra wasn’t the way it was supposed to be used anymore.

Kyra isn’t currently capable of being backwards compatible, meaning that different versions of the same library can’t be installed at the same time. So basically statically linking is easier and less likely to cause problems. My only concern is the fact that the LGPL license requires different things for code that statically links to it, but I was planning on releasing my code under the GPL anyway so it isn’t a huge problem.

To make one of my famously long stories short, I ended up working on my Makefile and the library until I found out how to get it to work dynamically…just in time to read that I shouldn’t use it that way. I managed to get my project to build with the new library only to find out that I should use it a different way. I spent some more time until I finally managed to get it to build the preferred way. I have a source directory with all of my source files as well as a subdirectory with the Kyra library source.

It was definitely a good learning experience, as I learned more about linking and libraries on my Gnu/Linux system. I actually built my project successfully three different times: once with the old dynamic library, once with the new library fixed up to be dynamic, and once with the code statically linked. The last option is actually cool because I can actually add the Kyra library directory to my Subversion repository for Oracle’s Eye.

Still, I would have liked to schedule my learning experiences better. I was supposed to be working on my game project instead of the supporting library. I really wanted to try to work on what William Willing mentioned on his blog about Composition vs Inheritance. I’ll probably be able to work on it this Friday though. At least the new library seems to be working great now.

Categories
Geek / Technical Linux Game Development

An Open Source Alternative to Google Earth

NewsForge reports on NASA’s World Wind project. While the images in Google Earth of higher quality, the functionality is mostly the same.

Apparently World Wind is still Windows only. It was written in C#, which wouldn’t be much of a problem, but it also uses DirectX, which is. But it is open source, and so Russian programmer Vitaliy Pronkin created a port called WW2D that uses C++ and OpenGL.

WW2D is currently at version 0.99.5, has binaries available for Windows and Gnu/Linux, and has the source available. Apparently a Mac version shouldn’t be too far behind.

I’ve been waiting for a Gnu/Linux version of Google Earth for some time. Apparently a lot of people have. And a port shouldn’t be difficult to do since they already have Google Earth Fusion running on Gnu/Linux. I haven’t had a chance to look into WW2D yet, but the idea that people can make their own custom applications based on the code is exciting. While Google has released the Keyhole Markup Language, developers can’t make tweaks or add functionality to Google Earth.

These are exciting times.