Monday, September 24, 2007

Not playing Halo 3

While I am going to be busy the next few month's so will not be updating this blog as often as I would like (I am still going to try to post a couple of times a week) I will say right out that it is not due to Halo 3, as I do not have an XBox 360 nor have I plans to get one in the short term. That being said, Modern Cribbage is under way and is starting to look nice, but it will not be finished this Friday. After looking at the news archive for Blazing Games for the last few months, I have decided a couple of things.

The first thing, which actually was decided a few weeks ago, is that I am going to start combining Open Source releases with other things and will only have one open source release every four weeks unless there are special circumstances.

The second thing is that I will try to make sure that other series are represented between releases of One of those Weeks related items. Obviously, for the next while at least, the open source releases will be for One of those weeks. There will then be a game from a different series. Then there will the new episode of One of those Weeks, followed by another game from a different series.

Wednesday, September 19, 2007


I have not had too much problems with spam since I moved my blog over to Blogger. Still, when I was checking my mail earlier today I noticed a spam comment was posted (I have blogger set up to email me if there are any comments posted). I am hoping that this is an isolated case and that the amount of spam that my posts get will continue to be a minimal amount. Thankfully if worst comes to worst then I take advantage of Blogger's moderated comments feature. The problem with this feature is the simple fact that I only check my email once or twice a day. This is probably all moot since this is a blog about game development and has very few readers. Sill I want to leave the possibility of comments open to readers.

Another thing that I was thinking about is changing the way my feed is set up. Right now only the first 256 characters are sent in the feed. I am thinking of changing that to the entire post. While this would probably eliminate almost all of the visitors to my blog, it wouldn't eliminate readers as they would be subscribed to the feed. If you think this is a good idea, email me through the contact page and I will make the change.

Tuesday, September 18, 2007

Your BDS is in My GPL

There is an interesting debate going on in the open source community about the use of code under the BSD license with code under a GPL license. If you actually read the BSD license, or better yet have your lawyer read it, you will see that certainly is allowed. If you follow the BSD license to the letter, and include the BSD license with the BSD code you are using then you can certainly use BSD code within a GPL project. What confuses me is the fact that die-hard BSD fanatics have no problems with BSD code being uses in commercial projects from which no code is returned to the open source community, yet have a problem with the code being used within a GPL project.

The issue, I believe, is that the GPL is a more restrictive license than the BSD license because it forces you to share changes. This means that GPL code can not be used within BSD programs due to the basic fact that the code sharing requirements are not covered by the BSD license. This means that any changes to the BSD code within the GPL project would be under the GPL license. While someone could strip out all the GPL code and be left with BSD licensed code, they would not get the improvements. As the BSD license does not require sharing of improvements, this is a non-issue. If the author of the code wanted to make sure that improvements had to be shared, then they should have gone with a license that requires this, such as the GPL.

I tend to be a NIH (Not Invented Here) type programmer meaning that I tend to want to write as much of the code myself as possible. While I have no problem using the libraries that are a standard part of a language, I tend to avoid using third party libraries whenever possible. This is largely a result of bad experiences with closed source libraries. As code complexity continues to grow this is becoming less possible to not use third party libraries and I suspect that future projects will likely be built on top of other peoples code so issues like the one above are going to become increasingly important to me. My thoughts are that if changes are made to a third party chunk of code, those changes should be offered to the original project.

There are al lot of BSD fanatics who seem to live in an alternate universe where big businesses are honest and give back to the community as much or more than they take. My experience with big business is quite the opposite which is why most of my projects tend to be released under the GPL or LGPL for the very simple fact that I want any source code that I release to stay open. I think that most people who do go with a GPL license feel the same way which is why there is such a vast amount of projects that are licensed under it.

Monday, September 17, 2007

A Weekend of Cribbage

This weekend I decided that I would finally finish the Third volume of the Ultimate Retro Project. The only outstanding game in that volume of the series is the final Cribbage game. I was partially successful and managed to finish the classic version of Cribbage which will be released this week. As most of the code in the game is shared between both the classic and modern versions of the game, it is quite likely that the modern version will be finished quite soon, though my evenings are going to be put towards getting texturing into Coffee Quest Revenge.

One of the problems I ran into, a problem I am going to refer to as the final 10% problem, is the fact that once you have a game running, the fine tuning of that game always seems to take forever. You find that there are a bunch of loose ends so you tie them up only to find that a new bunch of loose ends have been exposed. What I do is have a to-do list that starts off with the list of all the things that need to be done. Every time I run the game, I add any new tasks to be done to a new to-do list. Once all the tasks in the original list are done, I do a complete play through of the game which inevitably will lead to a few more entries in the new to do list. I then look at the new list and decide if another iteration of tuning is warranted.

I would like to think that if I was actually being paid to develop these games, that the "good enough" threshold would be much higher so more iterations would happen. Sadly, having worked on third party games I know that is not always the case. In real games it is often not the developers who have the final say but the managers and company executives. While one could argue that they are paying for the development of the game so of course they should have the final say. In some cases, such as with free promotional games, that is true. In most cases, though, they are going to sell the game to customers so it is really the customers who are paying for the decision.

Do I have a point? Well, there is the obvious one that if you are not paying for a game, don't complain about it, but I honestly don't mind getting complaints about my games because that helps me improve future games. I suppose what I am really trying to say is that consumers should be more choosy about the games that they buy because if they were we would have fewer rushed-out-the-door-to-make-a-quick-buck titles on the market.

Friday, September 14, 2007

Jigsaw puzzles

One of those Weeks episode 17 revolved around what is essentially a jigsaw puzzle. Creating such a puzzle, both in the real world and on the computer, is a fairly simple task. The nice thing about jigsaw type puzzles is that not only is almost everyone familiar with them but there is a lot of flexibility in how the puzzle is put together.

If we look at making a real world jigsaw puzzle, it is a fairly simple task. You simply take a picture and glue it to cardboard or wood. Alternatively, you can create original artwork directly on the cardboard or wood. Once you have the artwork on the wood or cardboard, you take a cutting tool, such as a jigsaw, and cut the picture up into pieces. If you are using wood, you may want to carefully sand the pieces so you don't get slivers. You then have a unique puzzle.

I should point out that the shapes of the pieces do not have to be the traditional shape that most purchased jigsaw puzzles are, though that familiar shape has it's advantages. If you find some really old jigsaw puzzles, you may notice that many of them have more of a wavy shape to the pieces and often there are size variations in the pieces. The problem with this style of puzzle is the simple fact that the pieces don't stay together. The more modern puzzle piece have interlocking holes and tabs so that when assembled they do not easily come apart.

When writing a computer version of a puzzle, the biggest obstacle is with the graphics. It is always easiest to work with blocks of pixels, so often shapes are blocky in appearance. Another potential problem is the positioning of the pieces on the board. If all pieces are the same size, this can be treated as a grid (even if you are not using square pieces). Variable sized pieces are a bit trickier in that you would have to break the results grid into pieces that are the lowest common denominator in size and have pieces be aware that they are taking up multiple slots.

Thursday, September 13, 2007

CQR Pre-Alpha Build 6

The new episode of One of those Weeks is up. For those of you following the development of Coffee Quest Revenge, the renderer used in the episode of One of those Weeks is the one being developed for CQR. In fact, pre-alpha build 6 is now up at the coming soon page which uses alpha blending to render a view on top of the automap. I think it kind of looks neat. I forgot to fix the keyboard bug. For those who are curious, the keyboard bug is caused because I am attaching the keyboard listener to the main movie clip instead of the stage. When you click on something, focus is given to that and the result is no more keyboard events being broadcast. By attaching the listener to the lowest level stage, all keyboard events get passed through to the program.

Wednesday, September 12, 2007


My discussion about open source continues with a look at the LGPL license. When you are modifying large programs, the GPL is quite fair. In the cases of libraries, things are a bit different. A library is a collection of functions that are used to make writing new programs easier. The problem is that if you are using a GPL licensed library, you are using GPL code and have to release your project under the GPL. While one could argue that nothing but development time is forcing you to use that GPL library, some programmers feel that the library should be considered a separate entity from the main program and understand that some people don't want to release their source code. For those people there is the LGPL.

The Lesser General Public License was at one time known as the Library General Public License as the whole purpose of the license was to make it possible for library creators to allow other people to use their libraries in the project without forcing the project into the GPL. This license effectively treats the code within the library as a separate project from the main code. Any changes to the source code of the library are treated like changes to a GPL project. However, the project using the library can be released under any license or even kept as closed source.

The reason that the name was changed from Library to Lesser has to do with Richard Stallman's basic philosophy when it comes to open source software. Richard wants to see everything released under an open license, and as such the LGPL fails as it can be used as part of a closed source project. At the same time people who do use this license tend to do so because they want their source code to be usable by as many programmers as possible while still wanting the code they release to stay open. Some companies won't use GPL code but will use LGPL code so the LGPL programmers do have valid arguments. Likewise, certain types of projects really can benefit financially only if they are closed source so the LGPL allows those developers to at least contribute part of their work to the open source community which would be something they could not financially do if the GPL was their only choice.

Tuesday, September 11, 2007

What is ray casting?

I am sure some of you are wondering what this ray casting thing I am talking about is. Essentially it is like ray tracing except with only one ray per column of pixels instead of one ray per pixel. So the next questions would have to be what is ray tracing and what are the advantages of ray casting over ray tracing.

Ray Tracing is one of the oldest forms of 3D graphics generation. The concept is simple. What we see is made up of light. This light comes from one or more light sources and bounces off objects that absorb some of the lights energy causing it to change color. Eventually the light reaches our eyes where we see the results. Some brilliant person came up with the idea of doing this process in reverse. If you start from the eyeball, you can mathematically work out the path of the light as it travels through the world and trace the route the ray of light took back to it's original light source. By doing this, you can generate incredibly realistic looking images. The down side to this is that there are an awful lot of calculations, and the more complex the objects in the scene the more calculations have to be performed.

The advantage ray casting has is that it is done in a much simpler environment. In fact, it is often done on two dimensional maps that get projected into three dimensions. Because the geometry being calculated is so much more predictable, the amount of calculations that have to be performed are drastically reduced. In fact, ray casting can be done fast enough that it can be used for a game without requiring any 3D hardware support. When you are using Flash, at least as of Flash 9, you don't have 3D hardware support or for that matter any type of standard 3D library. The popularity of open source Flash 3D libraries is growing so eventually Adobe may finally add 3D support. I know for a fact this is a feature that a lot of developers have asked for. Until there is proper 3D support in Flash, all 3D will have to be done in software which means that the speed will be significantly slower meaning that the experience won't be anything like you could achieve if you had hardware 3D support.

Monday, September 10, 2007

Cruel Weekend

The weekend was a failure for my work on Dozen Days of Dice. While I easily finished the original game I conceived, it just wasn't fun enough. Meanwhile, my plans for Coffee Quest Revenge have changed and progress is finally being made.

I really need to write a proper explanation about what I am doing with Dozen Days of dice. The detailed explanation can wait for another day, but the short summary is that I am doing a series of Game in a Day challenges. I am doing one challenge on every weekend I don't have other plans for. While ideally all twelve games in a series should be done over a block of 12 days, right now that isn't practical, so weekends will have to do. While I could release the game I did finish, I instead am going to cheat and declare it a bonus game. It will be used as filler for when I don't have a game ready to release.

The story behind Coffee Quest Revenge is quite interesting. While I was going to do the 3D stuff using Papervision 3D, I was having too much problems getting what I needed to do working. It is certainly possible that what I wanted to do could be done, I don't know the library well enough yet. I keep running into culling issues for which I suspect the solution would be to write a new camera that automatically subdivides partially culled triangles instead of removing them. Of course I would have to familiarize myself with the source code before undertaking such a task, so instead I opted to port my existing ray casting code over to flash.

The existing ray casting code is designed for a step based game not for 360 degrees of freedom. Still, I had started making a 360 degree ray caster for the ultimate retro project so I figured if I could fix the issues I was having with that version it would be simple to port that code over to flash. When I started looking at the code, my mind lead me to a potentially better way of doing the casting. As this was a new algorithm I figured I would do the initial tests of this algorithm as part of the Coffee Quest Revenge. It has been a while since I released a build of CQR so if you go to you will see the 5th build which features a test over top of the auto map of the casting. I should point out that this is pre-alpha software and it is kind of fragile. The cursor key movement seems to work fine on Windows but the Mac doesn't seem to automatically repeat keys. Likewise, clicking on the auto map captures the keyboard causing the keyboard keys to stop working.

Friday, September 7, 2007

One of those Weeks episode 17: The Puzzle solution

Once you have picked up all the pieces, the next step is to assemble the pieces. On the beach you will notice a spot in the middle of the screen. This is where the pieces are assembled. You have a fairly simple jig-saw puzzle. All the pieces are in their final orientation so no rotation of the pieces are necessary. Picking up and placing the pieces is fairly easy, though the program can occasionally be fussy about the exact placement of the pieces.

The whole purpose of a puzzle is to figure out how to assemble the puzzle yourself. That being said, for the sake of completeness here is the official solution to the puzzle.

As I know the official solution to the puzzle I never bothered trying other solutions. The game determines if the puzzle is compete not by looking at piece location but by checking to see if the surface area is entirely covered so it may be possible to solve the puzzle other ways than the above solution. If you have an alternative solution, I would love to hear about it.

Wednesday, September 5, 2007


The GPL (General Public License) is one of the longer licenses though all this legalize is needed in order to enforce the one primary purpose of this license. This license is designed to force people to share the source code. If you use GPL code in one of your projects then unless you have permission from the original owner of that code you need to release your source code under the GPL. Why should you have to release your source code? That is the cost of using the GPL licensed code. If you don't want to release your code don't use GPL licensed code in your program. Very simple, I don't see any issues. After all, if you are building your program on top of potentially hundreds of thousands of hours worth of other people's time, you have no right to expect them to let you use their work without any compensation. The compensation for their time is that any changes get released to the community.

If you have no intentions of changing the source code, then you have no problem at all. If you are just tinkering with the code and have no plans to release your experiments then you also don't have to worry about the license. If you are a huge corporation who want source code but don't want to pay programmers to write that source code for you, then you are going to either have to release your source code or find some BSD-like licensed program and make your changes to that as then you can keep your improvements to yourself.

One of the arguments against the GPL that boggles my mind is that it is a viral license. While it is true that any source code I release under the GPL stays under the GPL until the copyrights expire, I am still the copyright holder of any code that I write. If I want to then use my code in a non GPL project I am certainly within my rights to do so and nothing in the GPL prevents me from doing so. In fact, if I own all the code within a GPL project, I can decide to change the license of the project for any future release. While the source code for the last release is still available and under the GPL and can be forked by other people who may not like the new license I am moving my project to, the official version would be under the new license. So the only time GPL is viral is when you are using other people's GPL code and if you are using other people's work you have no right to complain.

Tuesday, September 4, 2007

One of those Weeks Episode 17 Beach Map

There are not too many people who read this blog, which probably is not that surprising considering that I don't do any type of promotion at all. The thing is that the people who do bother reading this must either be very interested in game development or in Blazing Games. For that reason, I have decided that from now on all of my articles will be released here before they make their way to Blazing Games. Many of them will be written here as well. Because most visitors to Blazing Games don't really like the articles, I am going to start combining the articles with other releases whenever possible. Let's start off the trend by starting writing chapter 17 of Making of One of those Weeks.

As this episode is the first episode of a new day, the episode is a dream sequence. This sequence is really broken into two different segments. The first half of the episode is finding the pieces necessary to assemble the second part of the game. The map is a very logical and simple map. What is tricky is that the pieces are all protected by Mr. Puck's Former Guardian. If anybody reading this doesn't know what I am talking about, you should either play through the previous day's episodes or read through the chapters of the book related to day two.

What may not be apparent is that there is one piece that is not protected by the guardian. Once you have picked up that piece (which moves the piece to the starting room) the guardian for the next piece disappears allowing you to gather another piece. This simply means that the pieces have to be gathered in a particular order. The map above shows you the proper order that you need to follow in order to gather all of the pieces.

Monday, September 3, 2007


I spent my Labour day helping my mother make multiple batches of salsa. This was worth the effort as I got a dozen jars of salsa out of the deal. When you take my normal consulting rate into account, each jar is worth $12.5. While that may sound like a lot, when you consider how much superior the homemade salsa is to anything you can buy in a store it was a bargain. This got me to thinking about why our society had devolved into one that worries more about quantity over quality. Looking at how many projects I have on the go at the moment, I certainly am no better than anybody else, though I am trying to finish off all my outstanding projects so I can focus on only a couple of personal projects and whatever I am being paid to do.

Sunday, September 2, 2007

Article project thoughts

It is IPE time in Armstrong, not to mention the labour day long weekend. I am still trying to decide what my policy on posting chapters from Making of One of those Weeks on the blog should be. The one problem with the Making of One of those Weeks eBook is the simple fact that the chapters are written well after the work has been done. I have made notes for some of the newer episodes but for another project I am working on I decided to write a diary which was updated as I made changes to the project. I think it worked quite well and am thinking that I will release the diary at the same time as the open source release of that episode is done. Though I am also considering releasing it earlier here. I am not sure if it matters as not too many people read this, or for that matter read the making of articles. I really am considering combining my article project with this blog. If anybody has thoughts on this, feel free to email me or post a comment.