| Tuesday, January 24, 2006 |
 Busy Bee Be Me |
Posted - 1/24/2006 11:02:00 AM | Busy is my new key word. I'm loving it though. Staying focused and moving forward is always a nice feeling. I did take some time out today to fool around with some things I haven't checked out in a long while - Netbeans and JOGL.
When it comes to Java, I'm an Eclipse diehard. Netbeans sucked hard eggs in the past. The 4.x series improved it, but it still paled in comparison to Eclipse. So now the 5.0 release candidates are being put out in preparation for the final release. A week or two ago, I downloaded rc1 to give it a spin.
Right off, I hit a stumbling block. My old 4.x version wouldn't uninstall. I kept getting an error message that said the installer couldn't run in graphical mode and I should run it with the -console or -silent switch. The -console switch didn't work, so I ran it with -silent and finally got rid of it. Then came time to install rc1. Same damn error. Running with -silent got it installed. Ditto for the profiler. But then it wouldn't run. Kept crapping out with an error message without ever displaying a window (can't recall what the message was). So I gave up and moved on to other things.
Today, I noticed rc2 has been released. After uninstalling rc1 in -silent mode and deleting the .netbeans folder from Documents and Settings, I attempted to install rc2. Same error message. Rather than moving forward with the silent option, I decided to hit the Netbeans mailing list archives and investigate. After some amount of searching (more than I wanted to do), I finally discovered the problem and the solution.
Apparently, there is a bug in Swing that can cause problems when using the Windows XP L&F on a system which is not running the default Windows XP theme. I had switched mine to the classic theme some time ago. Since both the Netbeans installer and the application itself run with the XP L&F by default, they were running into this bug. I switched back to default XP theme and all is well. The installation was flawless, and the app runs perfectly. Since they insist on using the Winsdows XP L&F by default, this is a perfect candidate for the Troubleshooting section of the installation guide. It's not there. So I was a bit miffed that I had to search for the problem and then change my settings as a workaround. Minor issue though.
After running Netbeans and playing with it a bit, I'm no longer firmly in the Eclipse camp. It has come a long, long way from the bloated piece of gargabe I remember. For the most part, it's smooth and responsive. The only stutters I saw came from the context sensitive help on the javax.media.opengl.GL class members (from JOGL) which is a gigantic class. Featurewise, there's nothing I can say I miss horribly from Eclipse. Setting up custom file headers is a bit more involved, and I miss the automatic completion of Javadoc comments that Eclipse has just a little bit (though to be fair, I sometimes find that annoying in Eclipse). Overall, I have found nothing to fault it so far. I'm not much of a keyboard shortcut type except for a handful of standard things, such as copy/paste and save, so there's nothing frightening in that department. I'll use it for my next Java project and see if this good feeling keeps up. Oh, and the profiler rocks.
As for JOGL, I haven't used it in a long while so I have not had a chance to take a look at the JSR 231 changes. I downloaded it, started a new Netbeans project, and in short order had a small test application coded up to use a single threaded OpenGL canvas and the new texture utilities in the com.sun.opengl.util.texture package. It was a port of some C code from my Game #1 project. I compiled and ran.
Aside from a couple of issues with image formats (uncompressed Grayscale TGA images are not supported), it all went well enough. It was quick and easy to set up and use. One thing I like about the TextureIO object is that it supports DDS files, and the loaders have support for loading in a background thread. I'll have to spend more time with it later when I have some to spare.
One of the things I've been meaning to write about is a utility class I have for helping with dynamic class loading in Java. I'll be posting that on my new GameDevMike blog. I think 4 blogs are enough to categorize and focus the things I want to write about!
| |
| Saturday, January 21, 2006 |
 Warnings Are Great |
Posted - 1/21/2006 7:22:31 PM | I always compile with full compiler warnings enabled during development. I rebuild after every change to make sure nothing is broken and I continue rebuilding until they are gone. My code is always warning free. And if I incorporate third party code I do my best to make it warning free as well.
The reason I'm posting this is because I remember a discussion I was involved in here about coding standards or some such. In one post I mentioned how it's always a good idea when comparing a variable and a constant to put the constant first:
if(3 == myVar)
This way, if you accidently type an assignment rather than a comparison:
if(3 = myVar)
the compiler will cough up an error. Someone told me that it doesn't matter these days as compilers will spit up a warning when you make the same mistake with the variable first:
if(myVar = 3)
I don't know how many compilers or which ones do catch it, but it doesn't matter. What happens if your code is compiled on a compiler that won't spit out a warning? What happens if the compiler only warns about this case at a higher warning level than what you have set? Robust code makes no assumptions.
I nearly always put the constant value first and I haven't actually made the error in so long that I can't remember the last time. But today I slipped - I put a variable first and used an assignment instead of a comparison. GCC was kind enough to let me know:
render/r_texture.c:224: warning: suggest parentheses around assignment used as truth value
I haven't tested or read any docs to find out at what warning level that message is spit out, but it doesn't matter as I always compile with -Wall. If the warning level had been too low, or if they were turned off altogether, I'd have had a nasty bug to catch. The moral of this story, or course, is that you should always crank up your compiler warnings.
| |
| Wednesday, January 18, 2006 |
 So Many Things |
Posted - 1/18/2006 2:34:10 PM | I've been brainstorming a lot lately on things I would like to do. I'm starting to expand my ideas outside of the realm of traditional game development. Well, outside of game development for that matter. One of the ideas I have is for a web-based game.
Some years ago I started work on a javascript game at Geocities. It was a Choose Your Own Adventure type thing. Recently I've noticed quite a few web-based games using technologies such as PHP, Cold Fusion, and JSP/Servlets. Currently, I'm hooked on one such game called Project Rockstar. If you've never tried it, give it a whirl. It's a blast.
The thing that impressed me most about Project Rockstar is the simplicity of the concept. You can get a lot of enjoyment from the game from just a taking a few minutes each day to issue commands. Or you can get involved in the community and strike deals with other players, earn special items, and so on - none of which is required to play. So far, everyone I've introduced to the game has gotten hooked. It's brilliant.
So I looked at what else is out there. Project Rockstar is one of a kind. Most web-based games I found are empire builders in a fantasy or sci-fi setting. There are some pearls out there, like Drug Runners, but most of it is the same regurgitated stuff. So one of my recent brainstorming sessions involved different ideas for web-based games. I think I hit on a winner.
As I posted recently in my personal blog, I'm looking for alternative methods of sustaining myself while I develop games. I want to quit teaching and work exclusively from home. I would love to be able to do that before the end of the year. I have a lot of free time as is, but my teaching gigs really are not reliable and the pay never increases. My total income fluctuates from month to month as classes are postponed or cancelled. I really want to replace it with something steady.
So the web-based game idea is one means of generating some extra income. The game would be free, but would be supported by Adsense. I doubt I'd be able to replace my income with Adsense alone (unless I managed to achieve what Steve Pavlina has), but any extra income is income puts me one step closer. Plus, I think I would enjoy managing this web-based game. And I have a couple of other, less time consuming, ideas to play with.
The big hole in the plan, as always, is time. Developing and operating a web-based game is not something that can be relegated to an hour a day. It would take a considerable time investment. And that time would compete with the time I spend on Game #1. I'm confident that I can make it work, though. I just need to drop the time I allot myself for playing DAOC ( a few hours per week) and other non-essential activities. It wouldn't be permanent and I think it's well worth it to try. It would also be good from a marketing sense. The free web game could help generate a user base that might very well be interested in purchasing Game #1.
| |
 The Wrong Question |
Posted - 1/16/2006 6:17:08 AM | This post has nothing to do with my project or my business. It's just a rant that I want to get off of my chest.
It seems that every year I pick up more pet peeves. Perhaps it's a side effect of getting older. Most of them come from reading the same idiocy again, and again, and again, ad infinitum in message boards and blogs. Some examples off the top of my head (meaning, some that bug me the most): the use of the word 'loose' in place of 'lose' - not just a typo (typos are understandable, everyone makes them), people actually think 'lose' is spelled that way; the proliferation of blogs that are 'random/mad/insane' 'rantings/ravings/babbling' of 'deranged/depraved/crazy' people; the abuse of punctuation marks in forum posts (wtf???!???!!!??); the propagation of misinformation; many, many more that I could spend a couple of hours writing about.
Today, I want to go off about a question I see repeated on the GameDev forums, "Is Java/C#/Python/some other language 'fast enough' for games?"
I understand that more often than not the person asking the question is relatively inexperienced. Even so, it drives me bonkers. It's the wrong question to be asking. You can create a game in brainfuck if you wanted to. The performance of the language alone does not prevent you from making games with it. The question itself is just too broad, too black and white. The reality is it that it is never a yes-no situaition. There's plenty of gray area there. But the real kicker is that often the people asking the question couldn't code their way out of a wet paper bag in the first place, no matter how 'fast' the language is.
This wouldn't bother me so much except that such questions often lead to flame wars where reality is lost in the arguments of extremists on both sides. And people who should know better, people who have some amount of experience and, more importantly, common sense, add fuel to the fire. In politics, I'm far to the left. Neocons are the spawn of satan in my mind. In terms of programming philosophy, I'm solidly in the middle. Taking it to religious or political extremes is just pure idiocy.
Avoiding that sort of thing and having intelligent discussions starts with asking the right questions. I don't believe any question is 'stupid', but there is a difference between asking the right questions (i.e. learning what you really want to know) and asking the wrong ones (i.e. learning what you *think* you want to know). If we all asked the right questions, there would be more wheat and less chaff in forum posts. Of course, if people would read the forum FAQs they might have a better chance of asking the right questions in the first place.
It's just a nasty, vicious, cycle that begins with one innocent question from someone who really means no harm. They just want to learn something. I just want to wring their necks!
| |
| Saturday, January 7, 2006 |
 Back to the Game |
Posted - 1/7/2006 12:04:29 PM | So my little side project has been a nice diversion. For the curious, it's a Java DAOC server emulator based on the work done in C# by the Dawn of Light team. It's not a straight port, as I used a different architecture. DOL was a great source of info on packets and database structure. This is not something I plan to release, so don't ask. I don't know if I will continue work on it or not, but I did carry a few things away from it. One of the biggest things is that I fell in love with Sleepy Cat's Berkeley DB Java Edition. It will definitely be my first choice when I need an embedded DB in an open source Java project. The commercial license is quite a bit out of my price range, though.
=======================================================
I came back at Game #1 with a fresh persective. I mentioned in my last blog how I intended to refactor. Refactor I did. I have a much more streamlined code base now. I went about it in a brute force sort of way. I set up a new project tree and started rewriting stuff. Some of it was copy/paste, but much of it involved starting over from scratch. It only took a few hours and went rather smoothly.
Since I do hope to reuse the core modules for Game #2, one of the top priorities was a to dump the game-specific naming convention I had been using on the core modules in favor of a more generic one. It's really important that the core be clear and distinct, as that will be where the contractor for the Mac port has to do the brunt of his work (which should actually be very little, really). But even if I were the only one to ever see the code it would still grate at my nerves to be using Game #1's naming convention in Game #2.
I also got rid of my config file, csv, and font loading code. I hated the fact that I was laoding 3 different text formats when I could easily use the same format for all cases. I briefly considered XML, but opted instead for the record-jar format. Rather than throwing together my own record-jar reader, I instead went with Matthew Wilson's OpenRJ. It's very light and very efficient. The downside of this is that I still have to knock up a script to convert the font files to the new format. Rather than a script, I'll likely just take the original font loader I wrote and modify it to work as a standalone executable that spits out the record-jar file. Whatever I do come up with I'll definitely hand off to Witchlord in the hopes that he adds support for export plugins to Bitmap Font Generator.
================================================
The class I teach on Saturdays, which takes a big chunk of my day, is on break for 2 months. That's more time to work on the game. Even so, I'm going to be up all night tonight. It's currently 2 am, Sunday morning, here in Korea. My wife and I have reservations to see Narnia around 9 am. That usually means we'll spend most of the day out of the house - movie, lunch, shopping, dinner. So I want to get as much done tonight as I can. I've been sleeping erratically lately anyway since most of my classes have been on break for one reason or another, so it's no big deal.
I actually still have a couple more modules to refactor. Then I'm going to start looking at something fun - terrain. I've been quite eager to work on it.
| |
|
| S | M | T | W | T | F | S | 1 | 2 | 3 | 4 | 5 | 6 | | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | | 17 | | 19 | | | 22 | 23 | | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | | |
OPTIONS
Track this Journal
ARCHIVES
June, 2006
February, 2006
January, 2006
December, 2005
November, 2005
October, 2005
|