Friday, November 30, 2007

Has gamespot becomes a whore?

I use to like the gamespot site but with my favorite reviewers leaving the site I was finding the site to be less and less reliable. Today I found out (thanks to the Penny Arcade comic ) that my favorite reviewer, Jeff Gerstmann, not only was leaving gamespot but was being fired for writing a negative review of one of their larger sponsor's games. If this turns out to be true, this act alone means that no gamespot review can be trusted. They have gone from a trusted semi-reliable source to a site to be avoided overnight.

Apparently gamespot is claiming that it was the tone of the review that got him fired. Having watched the review, which now seems to have vanished from the site, I can only say that the review was very well done. Any site that would let let advertising revenue determine the rating a review receives is clearly not worth bothering with. I should probably point out that gamespot is owned by cnet and that I will have to assume that all cnet owned sites are tainted likewise. I should also mention that eidos is the publisher of the game being reviewed, though as they haven't made a good game in a long time there is not much to boycott.

I am still holding out hope that this is all one big misunderstanding. Game reporting has been steadily dropping in quality everywhere so seeing my last semi-decent source of gaming news vanish is a sad day. I guess editorial integrity is a thing of the past. Sadly, other than not visiting or supporting the sites above, the only other thing I can do is show my disrespect of them by purposely not capitalizing their names, which sadly is only going to be noticed by English teachers.

Thursday, November 29, 2007

Revealing my hand

With the release of the fourth game in the Dozen Days of Dice series, I feel obligated to reveal some of my plans with the series. Next year I will be developing the 5th episode and posting the diary on the site as the game is developed. January 12th is currently the scheduled date but that could change if something comes up. Depending on how well things go, that may become a monthly event. Even if I fail to finish the game in a single day, work will continue on the game until it is done, but it will be marked "failed to finish within time limit".

Wednesday, November 28, 2007

Billy's 8-Bit Virtual Game Console

All of this talk about virtualization and virtual machines has me wanting to create my own. While I am certain that I know more than enough about how computers work to do it, there are quite a few VMs in existence already so writing yet another one really wouldn't serve much of a purpose from a practical point of view. From an educational and self exploration point of view, however, this would be a great project to undertake. In fact, if I took it an extra step and tried to create a virtual game console it would fit in with this blog. So, when I am not discussing site related development or giving you my opinion about the latest game/development related news I will be taking anybody who bothers to read this along with me on my few minutes a day virtual game system side project. I don't want to byte off more than I can code so this will be a simple 8-bit machine. Every project needs a name, so I will give this project the generic name of "Billy's 8-Bit Virtual Game Console" or B8VGC for short.

Tuesday, November 27, 2007


While virtual machines are related to virtualization, those are slightly different things. Virtualization generally refers to creating a virtual instance of a computer that runs inside of another operating system. For instance, Macintosh users that need to run Windows software may use an inexpensive program such as Parallels or VMWare to create a Windows instance. This allows the user to run both OSX and Windows at the same time. The best part is that since intel based macintoshes have hardware virtualization support, the speed is almost as fast as if you were running the operating system on it's own machine. That is assuming that you have enough ram. With a Virtual Machine, however, you are actually emulating a non-existant processor. Actually, there are Java processors, but I haven't seen them and don't know how they compare speed wise to running a virtual machine on a fast processor.

Monday, November 26, 2007

VMs are everywhere

One of the interesting things about Android is that Google is using their own virtual machine, called Dalvik, which is not the same as the Java VM but JVM code can be converted to Dalvik code using a tool included with the Android SDK. This started me thinking about how virtual machines have taken off. You have JVM, Microsofts CLR, and Flash forming the big three with many other's such as YARV (Ruby's upcoming VM) and Parrot (Perl 6s VM) also starting to take off. While VMs have the advantage of being processor and operating system independent, ultimately the code has to be converted to native machine language. There are three basic ways of doing this. Interpretation, JIC, and re-compilation.

Interpretation is the slowest of these techniques, though when combined with specialized compilation (which is essentially what Hotspot does) can actually be the fastest. The idea is that the program converts the program to machine language by converting the code every time it is executed. Hotspot improves this by detecting the parts of the code that run frequently and compiling those sections into highly optimized native machine language. When you consider that most code runs rarely, this can be very efficient.

JIC, which stands for Just In-time Compilation, compiles the classes into native machine language as each class is needed. There is an initial delay when a class is first used, but once compiled the class will run fairly fast. This has largely become the way of creating virtual machines. Often optimization of the native code is not done due to the fact that the compilation is happening as the program is running so it has to happen quickly.

Finally there is re-compilation. This is essentially a compiler that takes virtual machine bytecodes as input and outputs native machine language. This could be a good way of distributing code as you could do the translation from bytecode to native code as part of the program's installation. In this particular case, when you install a program, part of the installation is compiling the virtual machines code into native code. There is no overhead when ran as the compilation was done before hand. While the initial installation of the program on the machine would take longer, most people wouldn't notice and this only has to be done once.

Friday, November 23, 2007

Fragmenting Java

One of the biggest issues with Android is the issue that it fragments Java. As Java ME is already different from Java SE one can argue that fragmentation has already happened. What I was originally hoping for Android would have been support for Java SE which would have made porting to Applets much easier. Right now, I am going about projects in a similar way to when I was doing C/C++ coding. Cross platform coding consisted of writing a lot of generic classes while putting platform specific code into it's own classes which can hopefully be accessed in a generic way. The problem with this technique is that when you are under a tight deadline, you suddenly stop worrying about cross-platform compatibility and just start writing for the biggest platform with plans on making the code cross-platform when you have time. Of course, you never have enough time and the code base gets more platform specific and your initial noble goals vanish.

The API for Android is very clearly for Android. All the android specific classes are in packages with the Android prefix, so people who are claiming that Google is doing what Microsoft did are quite mistaken. Microsoft's platform specific extensions were not clearly distinguished making it very easy to accidentally write code that was platform specific without realizing it. More to the point, with Android, you are not actually writing java code but are just using java as your programming language and generating Dalvik code instead of JVM code.

Thursday, November 22, 2007

Christmas special Officially in development

I am working on the Christmas special which will be a three part game. The first part will either be released on December 7th or December 5th, 2008. I already have alternative releases if I fail to finish the game on time for release this year. The Christmas special will be a Java game, as a large chunk of the code for that game will be used with my Android project.

Wednesday, November 21, 2007

Final thoughts on Modern Maze

I have pretty much covered everything that you need to know about Modern Maze. There is a lot of room for improvement, but with today's hardware I am not sure it is worth any of the optimization. I should point out that the raycaster will be used with the upcoming Modern Dungeon Romp 3D that will be appearing next year (though it will probably be posted to the repository well before it is released on the blazing games site for those of you who can't wait and don't mind compiling programs yourself). The raycaster is going to be indirectly used with my Android plans. As the Android API has support for Open GL ES, I will be taking advantage of that for the rendering of the Android version of the game. The applet version, however, will need a different solution. While I could use JOGL to do this, too many visitors had problems with my test game (Coffee Quest GL). For that reason, I will have to use some form of software rendering for the applet version of the game.

Tuesday, November 20, 2007

Maze Raycasting

Modern maze uses a raycasting engine. I believe I have discussed raycasting in the past but review never hurts. Essentially raycasting is a simplified version of ray tracing. You follow light from the camera (the player's eye) to the nearest wall. The size to draw the wall is based on the distance the ray had to travel to hit the wall. A texture strip is then drawn based on where on the wall that the ray hit. Lighting could be applied to the texture also based on the distance, but this adds a lot of time per pixel plotted and we are using software rendering which is slow already.

The method that I used for doing the casting is a bit different from the other methods I have seen described. I calculate the stepping distance between entering different tiles. I then just take steps picking the x or y step based on the distance. Only one of the steps is adjusted each iteration since obviously the farther crossing distance hasn't been reached. The one that is crossed gets the distance needed to travel across the tile added to it.

Monday, November 19, 2007


Texture mapping is an old 3D graphics technique. It is a way of cheating by faking the details there are in a 3D scene. The basic idea is that you can make a 3D model look like it is made up of many more polygons than it is by wrapping an image around the model. This effectively means that you are distorting an image, such as a photograph, so that it fits the shape you are texturing. More advanced rendering engines will even take account of the z distance of the different points on the polygon.

The texture class that was created for Modern Maze was designed for use with a ray casting engine. As such, the texture class is designed to draw vertical strips on a memory image source. It has two drawing methods. The first one draws a solid strip, while the other one will check the alpha channel not drawing transparent pixels. There is a lot of room for optimization within this class. If I was going to create a more advanced 3D rendering engine, I would add a function that would allow the drawing of a horizontal strip using any two endpoints on the texture. This would allow one to easily create 3D textured polygons.

Saturday, November 17, 2007

Repository thoughts

I decided that even though it is a large blob of code that I would post all the code for Modern Maze to the repository at once. I know that I should post to the repository more frequently but don't want to post code until it is fully functional. I suppose I could create branches, but it is far easier to have it on my local repository and only post to the real repository when I have final code. That being said, I am considering switching my local repository over to git, which has the great advantage that hosting a git repository is much easier than hosting a CVS or Subversion repository so I would be able to do so on The disadvantage of git is that it is still largely a Linux thing. As more Windows and Mac tools come out, the decision to switch will make more sense. If I had something called "time" then I would probably contribute some towards developing cross-platform tools as it would be an interesting project. I'll review the code that I posted starting Monday, unless something more news-worth comes up.

Thursday, November 15, 2007

Modern Maze

While I have a few flash games yet to post this year, I am shifting my development to be more Java focused due to Android. In fact, I just released Modern Maze to the site and am going to slowly post the code for it to the repository over the next few days. Along with each post, I will have an entry here explaining what the code is and how it works. Today I posted all the graphics that the game uses. These consist of a picture for the title screen, four 256x256 images that are used as textures in the game, a start sprite and an exit sprite.

Tuesday, November 13, 2007

Android Decision

The big problem that I had with Java ME, which also happens to be the same problem with Android, is that the API used for the user interface is different. If it was just a subset of the standard edition, then things would be fine because you would only have to write code for the lesser API. Sadly, the drawing commands and user interface are kind of important for games, with a lot of code going into this. Still, I would probably be able to share between 70-80% of the code between an applet version and an android version and would possibly even be able to do a third application version that would take advantage of 3D hardware. In fact, one of the features Android has is OpenGL ES support. Despite it's many flaws, I've always liked the Java language so moving my development to Android and porting to Java SE might not be that bad of a move. While I am not likely to win money, entering their contest might not be a bad move exposure wise. If I am lucky enough to have my game win one of the 50 slots, then it was a really good move otherwise I still have the option of finishing off my entry and attempting to sell it commercially. I would also break the game into a bunch of chunks and release it episodically on the Blazing Games site for those who don't want to (or can't afford to) pay for the game.

Monday, November 12, 2007

Android SDK Released

Android has been released. My initial reaction was that the API was a modified version of Java ME and that the amount of work to write code that could work both in an android phone and as an applet was probably more than it was worth. Then I noticed that Google was giving away $10,000,000 to encourage Android development. The first contest runs from January 2 and submissions end March 3rd, with 50 winners getting $25,000 and a chance to get $275,000. While I am unlikely to win, even if I don't I'll have a bunch of code that can be pushed towards a commercial project and can be used on the Blazing Games site. Granted, applet versions will be a bit more work than I would like, but the potential payoff does change the factors a bit. I will be sleeping on this decision but will update you tomorrow.

Sunday, November 11, 2007

Remeberence Day

Today is the day when we are suppose to remember the past and the sacrifices that were made to bring about a relatively peaceful world. The saying that "those who forget the past are doomed to repeat it" is most appropriate today. Sadly, our current leaders seem far more interested in petty greed than in making the world a better place to live in.

Thursday, November 8, 2007

One of those Chapters

As people following the Blazing Games site may have noticed, the open source release of One of those Weeks episode 19 was released along with chapter 19 of the Making of One of those Weeks eBook. I would have released early drafts of the sections here, but I never started writing the chapter until a couple days ago so never bothered. This has me again thinking about whether I should be posting the early drafts here or not. Of course the reason I was so late writing the chapter was because I knew I could do it quickly so was working on other projects that needed time spent on them. It is quite possible that this will be the last article that I release on Blazing Games this year. I do plan on fulfilling my one episode a month commitment to One of those Weeks, though next year I might only release a single day's worth of episodes. Again, non of my plans are finalized so if you are a big OotW fan you might want to complain early before my plans for 2008 are finalized. Granted, looking at how well my 2007 plans went, I'm not sure there is that huge of an issue anyways.

Wednesday, November 7, 2007

Can a SDK change anything?

The Android SDK that is suppose to be released on the 12th could affect my plans far more than people would think. In particular, the rumors that Android will be using the standard edition of Java for it's programming environment would probably start my development pendulum swinging away from Flash and back towards Java. The sad thing about this is that even if the phone is an open platform, most of the phones would probably end up being locked down meaning that phone users would still be limited with what they could run on their phones. That is the problem with monopolies. They make the rules and if you don't like those rules you are stuck with them anyway because you don't have any real alternatives. Heck, even with computers I tend to cater to Windows machines due to their dominance. Yes, I test on macs and linux machines but the majority of my visitors are slaves to the OS monopoly. Will an open platform for cells change the cell phone landscape? While I would like to think so, I am not so sure.

Monday, November 5, 2007

The gPhone is an Android

Rumors about Google creating a gPhone have been around for quite awhile so it came as little surprise to me that today they announced the open handset alliance ( which is an open standard for phones that would allow developers to easily create applications for phones. I have briefly looked into mobile Java and Flash lite so next week when the SDK is released to the development community I will be taking a look at this standard as well. Phones that support this open platform will not be out until next year.

Thursday, November 1, 2007

Threes - Final build

I've covered the creation of the pre-alpha, alpha and beta versions of the creation of this game (which was officially released on today) in previous posts. This post looks at the completion of the Threes game.

20:30 Three and a half hours of time remain, though I am getting pretty tired already so a couple of hours is more likely going to be the case. At this point my tests seem to indicate that the game is functioning fine, so it is time to start fine tuning the game. The first piece of tuning that I am want to do actually requires some code work. The problem I found when playing the game is that once the player has moved all the dice into a hold position, the game still displays a click to roll message. What I want to do is have the game be able to detect this particular case and change the message in this case to Finish the Game. Of course, the button I am using is a simple button that has a graphical message. While it is possible to modify the button to make this dynamic text or switch to a different type of button, I am instead going to go the cheating route and simply create a second button right on top of the first button. Only one of the buttons will be visible, and both buttons will result in the same event being triggered. Another piece of obvious tuning is to better represent the shoot the moon event. This is a rare event and deserves special attention so I changed the win results display to detect this condition and display a shot the moon result instead of win. Of course, testing this proved very challenging as it truly is hard to shoot the moon. This is where debuggers come in. I added a break point to the Six Sided Die class and manually forced the dice to roll 6's to test this special case, though I got a lot of testing in before I caved in and opted for the easy way of testing. This is my first release candidate!

22:00 I have now finished the game with time to spare. Not enough time to do anything major, but a better animated title screen would be nice. This is fairly simple though time consuming motion tweening work. Once set up, a bit more testing and I decided that there should be some gap between the dice. Right now the dice are a good size as they are bitmaps so you ultimately want them to be even resolutions to reduce the stair step look that often results from scaling bitmaps. So instead I cheated and simply added a layer over the dice and added lines between them. An additional tweak to the results message as it blocks the human/ai toggle. Things look good so at 22:57 I make the final build of the game.

23:00 While I suppose I could do a bit more tweaking and fine tuning, an hour isn't very long and I am getting pretty tired so I will call this game complete.