Thursday, January 31, 2008

February 2008 already!

It took me way longer to post the site today than it usually does. The really sad part is that the bulk of the time that I spent doing today's site update will be totally unnoticed. The bulk of my time in today's update wasn't posting classic dots or the updated February home page it was the new archive section of the site. I had to create new pages for the 12 months of this year (I find it easiest to do it all at once) and while I was at it decided to make navigating through the news archive easier by having the calendar for each year have a link to the main archive page and to the previous and next year. Thankfully the calendar is all handled with a php script so there wasn't too much code that had to be written and tested. This has me again thinking about moving my site over to one of the many content management systems that are available. I still think the few minutes that I would save doing this makes the huge effort required to learn and set up the system not worth the effort, though I suppose it would open up more consulting opportunities if I had firsthand experience setting up such a system. Something to think about, I suppose.

Wednesday, January 30, 2008

Goodbye B8VGC, for now

While I find the B9VGC project to be interesting, as part of my effort to get more focused I am going to be putting this project on ice until I have finished my official Sunday project. Once the Sunday project is finished, I will make up my mind as to what the replacement Sunday project will be, though this project is interesting enough and is ideally suited to be a personal experimental project so it is likely to be the successor. When I am not working for a third party, my work week will be spent on my primary project otherwise evenings and the occasional Saturday will be put towards my primary project. I will officially announce what these projects are on February 1st.

Tuesday, January 29, 2008

PC as a game console

Some people may have noticed that I did not mention the PC as a game console. The PC has quite a number of games for it, but suffers from one major problem: too much hardware variation. When you are developing a game for a console, you know exactly what hardware is available and what the limits of the system are. With a PC, every single model has different specs and their are many new models every month. If you add custom built machines to that mix, well, it is a nightmare. Sure, theirs the minimum hardware requirements stickers on the boxes, but only geeks (like me) can understand those.

The worst part of PC gaming is the simple fact that most machines do not come with adequate video cards for handling high end games. In order to play the latest and greatest games on your new PC, you either have to buy a premium model or upgrade your video card. A high end video card will set you back the same amount as it would cost you to buy an entire game console.

Another major factor going against the PC as a game platform is the piracy issue. While it is possible to pirate games on any of the consoles out there, it is non-trivial. PC game piracy, on the other hand, just requires knowledge of where to download the cracked versions of games from. As a result, piracy is very high so a lot of game developers are moving away from PC development. With consoles starting to let more independent developers develop for their systems, even indies will start to move away from the PC platform since people even pirate indie games.

Sunday, January 27, 2008

Modern Dots Release Candidate

Also for release some time next month, the release candidate for Modern Dots has been posted to the subversion repository hosted at ultimateretroproject.dev.java.net so anybody who knows how to compile java and download from a repository can play with it right now. Next month is only a few days away so it's not like its going to be that long of a wait.

There is not that much to say about the code, though I do like the way I implemented the AI into the modern version. First, the AI can be toggled while the game is playing. Second, the actual AI logic is placing in my timing routine that gets called roughly every tenth of a second. The timer checks to see if the current player is controlled by the computer. If so, it makes a move. The nice thing about this is that if you make both players AI controlled, then you can actually watch the game as it is played. Likewise, when you don't pay enough attention and give the computer a chain of squares, you can see the chain being filled in.

Saturday, January 26, 2008

Classic Dots Release Candidate

The release candidate for Classic Dots has been posted to the repository so anybody who knows how to compile Java and use a subversion repository can download and play with one of February's games. Tomorrow afternoon I plan on getting the modern version to a releasable state (also for February). I have made a slight change to the AI to make it play a much better game. Still, there is a lot more that could be done with the AI to improve the game even more and the best part is the additional changes would still not require using recursion! I have no intention of making the changes myself (at least not for the 1.0 version, though if I ever overhaul the series in the future I might) though the code is open source so anybody who thinks it might be a worthy challenge can. Lets take a look at what I would do.

Right now the AI looks at every square in the game and counts how many walls there are. 3 walls means that you are completing a square. 2 walls is a danger as you will be giving your opponent a square. 0 and 1 walled squares are relatively safe places to place lines. The problem is that it does not look at how the line would affect the neighbor, so the computer will occasionally draw a line that while is safe for the square it is looking at, results in the adjacent square having 3 walls. A more advanced AI would look at each line instead of each square to prevent this mistake. A really advanced AI would also run traces to count how many squares the opponent would earn if the wall of 3 was created so that at the end game the computer would be smart enough to give its opponent the least valuable run of squares.

Friday, January 25, 2008

Gatekeepers

The big problem with game consoles is that there are too many of them. While I have heard many people say that there should only be one game console, this is not likely to ever happen, and people who keep touting this idea are obviously too young to remember 3D0. The 3D0 was a game console that would be licensed to other manufacturers. In other words, anybody who wanted to make the console could do so as long as they paid their licensing fees, sort of like Blu-ray. The problem is that the game console makers made their money off of licensing the rights to make games so were willing to take a per-unit loss on manufacturing their machines so the cost of the 3D0 machine was significantly higher then it's competitors. It failed in the marketplace.

The thing is that money isn't made off of the machines themselves, the money in the game console industry is made by being the gatekeeper. In order for me to make a game for the XBox 360, PS3, or Wii I have to pay a fee to Microsoft, Sony, or Nintendo. In other words, the company controlling the console acts like a gatekeeper. The same thing applies to many other industries. For instance, the Java vs Flash/Flex vs .net/Silverlight battle is about controlling the format used for the future of interactive web content. Thankfully, in this war there is no per unit licensing fees (otherwise Blazing Games would not exist) but is about the sale of tools for working with that format.

The point being that as long as there is a lot of money to be made by being the gatekeeper, companies are going to be willing to take a loss as the potential long term gains outweigh the short-term losses. Consumers make this problem worse because they don't care about standards so choose to purchase the gatekeeper's offerings.

Thursday, January 24, 2008

A Special February

The final post for January has been made. February is going to be very interesting as this year is one of those very rare years (1 in 28) when there are five Fridays in February. As it is also a leap year, I am making a special game to celebrate that fact. More details in a week.

Tuesday, January 22, 2008

The Bits of the Dots Game Core

As I promised last week, I am going to explain how I implemented the Dots game core. As with any programming project, there are numerous routes that I could have taken. You have a grid of dots. Lines between dots are made. When a 1x1 box has been completed, the player who made the box gets a point and gets to make another move. This means that you need to track both the lines and the boxes. Each box is made up of four lines, but each line is shared between two boxes. My solution to this problem is to give ownership of the top and left line to the box. Each box then has six bits of information that need to be tracked. These bits are literally bits as all of the bits that make up a box can only have two states. This is why I grouped all the bits into a single byte and use an array of bytes to hold the game board.

Obviously you have the top and the left bits. If the bit is on, then the side has been drawn and if not, then it can still be drawn. Next, and this information is not needed but only takes a couple of bits so why not track it, is which player drew the line. I am using off to represent the first player and on to represent the second player. Determining if the box has been completed could be calculated on the fly, but it is more efficient to calculate this when a move is being made and store the results in a bit. Finally, you have a bit to tell you which player completed the box. That is all the information you need.

Setting a bit is done by ORing the bit's value with the byte. Clearing the bit, which is something that I never actually have to do as the only time bits are cleared is when the game is started at which point I just need to zero out the entire byte, is done by ANDing the inverse value of the bit with the byte. I know this is all old-school and that most people would probably create a separate class to hold the above information. Heck, you could store all four walls in each box and simply have the line setting function call a set wall function for both boxes that are affected. After all, it's not like this game is time or memory sensitive. I just remember way back when 64K was a lot of memory (and those poor Atari 2600 programmers only has 2K).

Sunday, January 20, 2008

Dots AI

A bit of time spent on Ultimate Retro Project. I reworked the classic dots input system so instead of having to deal with three separate prompts, you only have to input a single command in the format DCR. D is the direction which is either the letter H or the letter V. C is the column, which is a number. The rows have become letters so the final part is a letter. Parsing this is fairly easy, as you just take the character in position 0 of the string and make sure it is H or V. You then take the middle characters and convert them to an integer. Finally, the last character is converted to uppercase ASCII and has 65 removed from it (the ASCII value for A) to give you the zero based coordinate.

I also wrote a fairly simple AI class. This was quickly written just to get some type of computer opponent into the game. I had initially intended to later write a recursive AI for the game, but after playing with the AI I think with only a tiny bit of work I could actually salvage a reasonable game out of the simple AI. Right now the AI essentially places a line randomly on the board. It is, however, smart enough to notice when there is a box that can be completed and will automatically complete that box.

My next step is going to be cleaning up the classic version and getting it working with multiple board sizes. The modern version uses the same game core and AI classes as the classic version so once I have the classic version finished, the modern version will follow shortly after. While I am not going to make any promises, I hope to have both the classic and modern versions of dots ready for February.

Saturday, January 19, 2008

Sic Bo Release Candidate

The release candidate is up, so this will be my last post here. The This Week at Blazing Games feed will be updated when the final product is up. Right now the only thing left is a little bit of cleaning up of the main game display. Yes, I added support for multiple bets. You had to know that the lack of that feature would eat at me until I put it in. Overall, pretty successful day. Especially when you consider the complexity of the game I chose to do for this challenge. I hope that anybody who actually followed the development of this game will comment or email me and let me know what they think of developing games live on Blazing Games.

Sic Bo Beta

Well, I posted the beta. I found a couple of glitches when I run the game on Linux but other than that it is a fully playable game. As I say on the page, I am taking an extended supper break so don't expect the next update for a while. The next version will be more or less just cleaning up, though if I have the energy I might decide to add support for multiple bets. Overall, I am quite surprised that I was able to get such a complex game fully playable so quickly.

Sic Bo Alpha released

The alpha version has been posted. At this point, the game is playable but no tracking of player bets is available. The lighting up of winning bets works quite nice, however.

Sic Bo pre-alpha

The pre-alpha release of Sic Bo has been posted. This is simply the layout of the game. The next step, the apha version, is going to be the hard part so don't expect that update until this afternoon. I'm aiming for 15:00, though that could be optimistic.

And the game being developed is Sic Bo

For those of you who have stumbled on this blog accidentally and don't know what I am talking about, click on the Blazing Games link to go to the Blazing Games site which is the site this blog is about. On January 19, 2008 (now for me) I am developing a game live on the site. By live I mean posted as it is being developed and the game is suppose to be finished on the same day it is started. I am in B.C. Canada so I go by PST. As I post updates, I will blog here so if you want to follow the development of the game as it happens, simply add this blog to your rss reader.

Thursday, January 17, 2008

Game in a Day on January 19th, 2008

It sure seems strange writing this. Thursday evenings are the time I post the latest installment to the Blazing Games site. However, today I am not posting anything, because the next release on Blazing Games is going to happen on Saturday! While I have done a number of Game in a Day challenges (episodes 2-4 of Dozen Days of Dice), the game I release on Saturday will actually be developed on Saturday. By Saturday, I am referring to Pacific Standard Time, most of the world wont see the final post (assuming I manage to finish the game on time) until Sunday. The first post will probably be made around 9AM PST, and will be an announcement of what game I am going to develop that day. I have a good idea of which game I will be attempting to write, but as I am a fickle person will not officially say so until development has started. I am going to break posting into 7 segments. Overview, Planning, Pre-alpha, Alpha, Beta, Release Candidate, and Final. I might rough out the pages on Friday night. Some people might consider that cheating, but the challenge is about creating the game, not posting pages so having blank pages ready to be filled shouldn't have that big of an impact. I'll decide for sure tomorrow.

The This Week at Blazing Games feed will announce the final release of the game. This blog will be used to let people who are interested in seeing the game as it develops know when a page has been filled. Each entry will be a very short summary of the page that was posted. As this is going to be live, no specific times for anything can exist, just when it is posted. Failure is possible, but in that case work on the game would continue on Sunday.

Wednesday, January 16, 2008

A Quick Review of Boolean Math

My dots game core makes heavy use of boolean arithmetic so I am writing a very quick overview of boolean arithmetic. It is fairly technical, and more of a summary than anything. If there is interest (someone emails me or comments) I might go into a more detailed explanation of how boolean math works.

I come from an assembly language background (okay, technically I learned BASIC before learning 6510 assembly language) so dealing with boolean math, while rusty, is fairly simple for me. Java and ActionScript programmers probably are familiar with the boolean type which can be true or false but internally, computers see a single bit as being 0 or 1. Actually, boolean types tend to take up a lot more than a single bit as internally they are stored as bytes or integers. All data in computers is stored as bits with bits being grouped together into bytes. A byte is simply 8 bits. Having additional bits is like having more digits in a decimal number, except each additional digit is only a multiple of 2 instead of 10. Combinations of different bits give you different numbers. Eight bits means that there are 256 combinations, though one bit is used to determine the sign. The simplest way of working out binary is by assigning a value to each bit and simply adding the values together. Here is a power of two table:
Bit Value
0 1
1 2
2 4
3 8
4 16
5 32
6 64
7 128
When working with the bits in a byte, you use 5 basic operations. AND, OR, XOR, Left Shift, and Right Shift. The first three of these operations take two different groups of bits, perform the operation on pairs in the equivalent bit position, and result in a new result. The AND operation returns a 1 if both the bits are 1 (true) otherwise returns a 0. The OR operation returns a 1 if either or both the bits are one and a 0 only if both bits are 0. XOR, which stands for eXclusive OR,is a special type of or in which it returns 1 if one of the two bits are 1, but it returns false if both the bits are the same. The XOR results seem strange but are extremely useful as it essentially acts like a toggle. The left shift and right shift shift the bits to the left or the right respectively. The easiest way of thinking about this is that you are multiplying or diving the number by 2 for each position you shift the number.

Tuesday, January 15, 2008

Old habits die hard

What can I say? I spent a small amount of time over the weekend getting the core game code for the Ultimate Retro Project's Dots game core finished. I never, however, put the changes in the repository. I am use to finishing off my work before depositing it, which is a habit that I am going to have to work hard at breaking. That is why I posted the latest code to the repository today.

As the Ultimate Retro Project is already open source, it is not going to have a making of document created for the open source release, so what I am going to start doing is explaining what the code I am posting does as I post it. Don't worry. This is not going to be code dumps, but instead will focus on the theory and reasoning behind the code that I wrote. Of course I will also try and point out my kludges and the "temporary code just to get things running but will be replaced when I have time" code that will never get replaced.

Dots, of course, has a lot of existing code, which I will try and explain in future entries. Today's post was simply the code to determine if the game has been won and the code to find the score. It was fairly simple code to write as for dots, you simply need to take a look at every block within the bounds and see if it has been completed. If all the possible blocks have been completed then the game is finished. Getting the player's score is simply a matter of adding up all the blocks that belong to that player. This code is not that efficient, but for the games needs is more than fast enough. If I have time I will rework this code so that it is faster, but it has been a while since I touched the dots code so my goal was simply to get something done. The existing code is dependent on a knowledge of boolean math so I will be writing a boolean math nutshell column shortly then take a look at how I assembled the dots core.

Monday, January 14, 2008

Gerstmann-gate continues?

I just found out that Alex Navarro has left gamespot. This was mentioned on Penny Arcade, though they link to the Joystiq article that provides the details. I have been avoiding cnet properties so don't know if they have any information about this. My personal opinion is that while the low review score was not the sole reason that Gerstmann was fired, it was probably a factor. I believe that the cnet management wanted wanted to make a more advertiser friendly site and firing Gerstmann was done simply to make other gamespot staffers afraid to go against the wishes of their management. That is just my opinion, though.

Friday, January 11, 2008

Blu-ray the winner? PS3 Fanboys finally get to rejoice about something!

The Blu-ray vs HD DVD format war may be in it's final stages, with Blu-ray being the winner. While my parents have a HD television, I do not which is the primary reason I went with the Wii as my console choice. PS3 fanboys, on the other hand, are all for Blu-ray as it is the format the PS3 uses. Microsoft has previously announced that if Blu-ray managed to win the format war that they would make an ad-on available for the 360 so the XBox fanboys don't really care (they bought their consoles to play games on anyway). Until I do get an HD television (as is the case with 80% of the population) I don't really care. So the only people really happy about this are PS3 fanboys as they can justify their overpriced video players and continue to claim that one day you will actually be able to play games on them. Once the price of Blu-ray players come down to reasonable levels, then it might matter to the general public, but up-converted DVDs do look really good already so their is no real pressure to go to a HD format.

Thursday, January 10, 2008

One of those Weeks Episode 34 posted

Even though Episode 34 of One of those Weeks was delayed a couple of weeks, I never got around to adding a score to the episode. Even though the episode doesn't look that different from other episodes with conversations, a lot of work has been happening on the underlying conversation system. This work will continue throughout day 6 episodes, and the result will be a system that will allow much more elaborate conversations without all of the coding work. While the system is Action Script 3 code, it should be trivial to port the system to other languages. This means that if I ever switch to another language, the conversation system will be ported to that language. Considering how much M$ is pushing Silverlight, it is certainly possible that I will be developing Moonlight applets in the future. Moonlight, for those who don't follow open source, is the Mono-project's open source version of silverlight, with the mono project being the open source version of M$'s .net.

Tuesday, January 8, 2008

Why does Sony hate honest people?

Well, one week of the year has passed, and if the past seven days are any indication, then this is not going to be that good of a year. While nothing bad has happened to me so far, my parents are not having that great of a time. I am going to wait until the events that are bothering them have been resolved before going into the details, though will say that far too often the people who try to be fair and upstanding citizens are the ones that get cheated and abused. This of course leads to DRM, which does nothing to stop pirates but is a huge burden to the people who want to be legitimate. While I had thought that Sony's announcement to have DRM free music was a step towards finally getting rid of punishing only honest people DRM, it appears that I was wrong. Sony is limiting the DRM-free downloads to only a small subset (37) of their CDs and requires that people use the Sony music store. Here I was hoping that soon the only DRM music would be subscription services, but I was wrong. It's bad enough that Amazon MP3 is not available in Canada yet, but at least I know if it continues to be the success it appears to be that it will eventually become available to me.

Monday, January 7, 2008

CES 2008

While CES may not exactly be game related, this year's CES is interesting because it is the last one before Bill Gates retires, which probably means that it will be the last Bill Gate Keynote. I have yet to decide if I want to risk the little that is left of my sanity and watch the keynote. I watched a Bill Gates keynote years ago so know how torturous they can be to watch. Not that all keynotes are boring, as Steve Jobs somehow manages to be very entertaining as long as you lock your credit cards away so you don't fall victim to his magical ability to make you buy products.

The weird thing is that CES actually has a lot of game coverage this year, including a game that makes me wish I had an XBox 360. What possible game could do this? Lode Runner! Sure, there were other game announcements but I still remember playing the game on my C64. The problem is that unless it is just a graphical overhaul of the 150 level original, the new mechanics will probably ruin the game, as is often the case with revamped classics. While it brings back nostalgic memories of the good old days of gaming, I think I will read the reviews – especially the ones by the younger generation of gamers who never heard of Lode Runner – before even thinking about this game. After all, I was quite disappointed with Battle Lode Runner on the Wii Virtual Console.

Thursday, January 3, 2008

First Blazing Games update for 2008

Just The new Home Page for Blazing Games is up as are the plans for 2008. Finer details are missing, but then that is what this blog is for. Feedback on the change are of course welcome.

Wednesday, January 2, 2008

Blog 2008

While I still haven't worked out all my plans for Blazing Games, this year for the blog I am going to continue my new (December 2007) policy of trying to keep the articles that are going to appear on Blazing Games off of this blog. When I have news related to Blazing Games projects I will post that as my entry. If there is game related industry news that day that I hold a strong opinion, that will be the topic for the blog. When neither of those things are present, I will spend half an hour or so continuing the development of my B8VGC. This sub-side project may never get done, though the new perspective it has given me on console design is probably more than worth the slim amount of time that I have spent on it.