Thursday, May 15, 2008

Minefields and Graveyards

Classic Minefield has been posted. I am still trying to figure out what to do next week. Do I leave the vague description for One of those Weeks 38 or do I put the correct picture and better description of the episode? When you think about it, the description of the episode probably won't spoil the previous episode for those people who only visit Blazing Games infrequently.

The funeral went fairly well, considering it was a funeral. I was a pallbearer so my biggest fear was that I would trip or drop the coffin. I know, I have silly fears. The funeral has me thinking about my future and I am wondering if it is really worth spending so my time on Blazing Games. If I was actually smart enough to have a successful company and was able to pay myself a salary or wage for my work it would make sense. I do enjoy programming and creating games but do tend to put way too many hours into Blazing Games. I will make my decision about the future of Blazing Games once I have finished the existing projects that I am working on.

Friday, May 9, 2008

Shining some light on Light Box

With my Grandmother's funeral on my mind I forgot to post this yesterday, though I did remember to update the Blazing Games site. I am finally going to post my guide to Light Box, but lets first take a look at what was posted on Blazing Games. The first of two episodes of One of those Weeks for this month was released. I plan on having another double release in July and one episode every other month so One of those Weeks will be ending this year. The making of One of those Weeks will take a little longer and I have another thing One of those Weeks related that I may be doing but won't go into any details until I know for sure I am going to release it.

Light Box is a black box style of game and as such reverse engineering of an object strictly by studying the inputs and the outputs. The goal is to recreate the original light box results, which may not necessarily result in the same layout but due to the simple nature of this game more often than not your clone box will be part for part identical. One of the nice things about this game is that there are many ways that one can use to solve the puzzles. The most entertainment comes from figuring out your own procedure for solving the game yourself, but today I am going to go over my procedure for solving the game.

The first step in my procedure is to simply to take a look at the test results and see if there are any correct entries which match up horizontally or vertically. The thought here is that these columns are statistically highly unlikely to contain any prisms. While it is certainly possible for there to be a multi-prism layout that fakes this result, this will happen fairly infrequently.

The next step is to take a look at the test results that are only halfway solved. The most common cause for this is a prism that has it's point towards the matching slot. While this may not always be the case, when it is, the placement of the prisms becomes abundantly clear. Some of these may be overly complex in which case I tend to just make note of them and continue on.

My next goal is to go through all the remaining non-matching slots and see if there are any obvious prisms. If there are only one or two outputs then it is simple to find the obvious placement of a prism that will give you the desired results. The nice thing about this is that often the solution to the more complex non-matching slots will become clear as you solve the simple slots.

Finally comes the assembling of the complex slots. Occasionally you will find a slot that simply will not work with the existing layout of prisms. In these cases, removal of some of the prisms is required and re-thinking of the prisms is required. While this is frustrating when it happens, actually solving these puzzles tends to be really rewarding.

Sunday, May 4, 2008

Spiking mxmlc

First, the ultimate retro project repository has just been updated and now contains a playable version of Classic Monster Hunt. I still haven't wrote the instructions and I still want to clean up the code a bit but it is fully playable at this point. That being said, I didn't spend that much time today working on it but instead spent my time playing with mxmlc.

For those of you who don't know what mxmlc is, it is the command line compiler that is included with the freely available Flex 3 SDK. While it is certainly much nicer to use Flash CS3 or FlexBuilder to create swf files, both those options cost money and since I want my open source releases to be usable without the requirement of expensive tools I wanted to see how much work it would be to create a game without the expensive tools. I have taken some baby steps by trying to keep my source code outside of my flash file. With 13 Spikes, however, I am creating the entire game using the command line compiler and a text editor. For those who are curious, I am using jEdit for my editor.

Using the command line compiler and debugger is not that difficult, so anybody who wants to create flash applications but don't have any money certainly could handle it. The thing that is not made as clear as it should be is the fact that you do not need to create a flex program to use mxmlc but can instead write your program entirely in ActionScript 3. In fact, if you do not need the flex library you might be better off without using mxml as there is a bit of an overhead for the flex libraries.

I can't say that my first few hours of only using a text editor and command line tools was not as productive as it should have been as I had a lot of problems getting my Spike sprite class to work properly. This was my first attempt at overriding the Sprite class as I normally use the MovieClip class but sprites are suppose to be much more efficient. My problem was that I was trying to set the width and height of the sprite. Why that would stop the sprite from drawing itself is beyond me, but once I removed the code that set the width and height of the sprite it started working fine. It appears that width and height are internally used, as once the sprite was drawing, printing out the sprites width and height came back with the size of the object that I was drawing.

Thursday, May 1, 2008

Open Screen Project

I am writing and posting this early so Blazing Games has not been updated yet though I will be doing that this evening. I am going to be delaying my Light Box strategy guide again as there has been a rather interesting announcement today from Adobe. The Open Screen Project ( http://www.adobe.com/openscreenproject/ ) is the continuation of Adobe's open sourcing of Flash. The biggest part of the announcement, at least to me, is the removal of restrictions on the use of the SWF specification. SWF is the binary format that Flash and Flex compile into. The specifications for this format have been available for a long time (since Flash 3 if my memory serves me correctly) but the licensing agreement in order to use this specification did not allow the licensor to create their own player. This meant that an open source player, such as Gnash, were not able to use the official specifications but instead had to create their players using reverse engineering techniques making the work take significantly longer and reducing compatibility.

The reason that I am using flash for a good number of my games, and once the Ultimate Retro project is finished will probably develop all of my client side games in Flash/Flex, is because it is currently the best solution for rich internet applications. My biggest concern with Flash has always been the fact that it was controlled by a single company. Now that the specifications no longer have restrictions, this is no longer a fear. I know that some people will argue that Microsoft Silverlight is technically superior, I really do not trust Microsoft with a cross-platform standard as they tend to want to force people to use their Windows operating system. Sure they are supporting Macs right now and not threatening the Moonlight project, but that could change if Silverlight no longer had viable competition.

By having the open specification for SWF, I no longer have to worry about Adobe abandoning Flash/Flex (not that it was that likely at this point) so can develop my games without having to worry too much about them suddenly not working in the future. My only complaint at this time is the lack of proper 3D hardware support in Flash. While projects like Papervision 3D are quite impressive with what they can do using software 3D, support for an open 3D standard like OpenGL ES would greatly increase the power of Flash. That, of course, is a different rant which I have made before.

I should also probably point out that in addition to removing the restrictions from the SWF format, the FLV format was also released as was the Flash Cast protocol and the AMF protocol. Finally, Adobe is going to be removing licensing fees in the next major release of Flash Player and Adobe AIR for devices meaning that Flash should be appearing on a lot more mobile platforms. From a Flash/Flex game developer's perspective, this is indeed great news today.

Sunday, April 27, 2008

Monster Hunter secret origins

The monster hunter game was a game that had to be included in my Ultimate Retro Project and was originally going to be placed into the first volume as it had a lot in common with the early style of seeking games that were common in the early seventies. While I never played these text games until the mid eighties and did so by typing in the BASIC game from a listing and running the game where finding all the inevitable bugs really helped me learn to program. Besides, I couldn't afford to buy that many games so typing in games from library books or magazines helped keep me entertained as a kid. I decided to place it into the adventure game collection when I realized that it essentially had a lot of the early elements that later text adventures would utilize and beating up monsters definitely has the ring of role-playing to me.

The Monster Hunter game was derived from a number of monster hunting games, though the biggest influence on this game was the classic game by Gregory Yob known as “Hunt the Wumpus.” This game was kind of unique as it's map was a squashed dodecahedron instead of a regular grid like most other monster hunting games of it's time. Considering that computers were quite limited in 1972, the year that the game came out, it was quite an impressive game for it's time not to mention the game that finally taught me how to take advantage of arrays and data structures.

My monster hunter game uses a flexible map file that allows for the creation of any type of map, though the initial map is a dreaded grid. Perhaps if there is interest in this game I will create a squashed dodecahedron map and a few other alternative maps. I, however, suspect that this game is going to be more of a curiosity than anything. The number of traps in the game is controlled by the map file, as is the number of arrows within the map. My game will start the player off without any arrows, though there will be a number of arrows (determined by the map configuration) that will be hidden through the map. All the monsters, traps, arrows, and the players starting position will be determined randomly.

What is really interesting about the code I am writing for this game is that a lot of the code that goes into this game is shared with the later adventure game that will be developed. The adventure game is obviously inspired by Colossal Caves, but that is a different story.

Thursday, April 24, 2008

Ubuntu 8.04 released.

Modern Light Box was just posted on Blazing Games. I was originally going to post a strategy guide for Light Box today but then I found out that Ubuntu 8.04 LTS was officially released today so I decided to change the topic for today. Actually, when I think about it, perhaps giving readers a chance to play the game and figure out their own strategies before giving them mine might be the best way of doing things anyway. I will probably post the strategy guide next week. Today I am going to talk about Ubuntu.

Ubuntu is a distribution of the Linux operating system. Linux is a free open source operating system that has become a major contender in the operating system space. Like OSX, Linux is a version of the Unix operating system but unlike OSX you can run the operating system on any computer you like. One arguable downside to Linux, however, is the fact that there are a number of different distributions, each with it's own advantages and disadvantages. Ubuntu is a distribution that is focused on making Linux usable by everyday people in addition to all the geeks that gravitate towards Linux. It has grown quite a bit in popularity which is good. Not only can you download the distribution for free, the disks can also be ordered and they even have a program where you can obtain the disks for free.

This is the part where I describe the latest version, except I can't. While I have tried a couple of times to upgrade from 7.10 to 8.04, the demand for the upgrade is so high that just like the Nine Inch Nails Ghost download (they have just released a new single that is freely downloadable from the nin.com website), I can't get it. I am sure that in a day or two all the situation will have calmed down and I will be able to upgrade my Linux machine. If you are interested, you can go to http://www.ubuntu.com/ to get your copy. It would probably be best to wait a few days before doing so.

Sunday, April 20, 2008

The Lorenz Attractor

As Professor Edward Lorenz died of Cancer on Wednesday, I thought it would only be fitting that today's article be about the Lorenz Attractor which is one of the earliest (if not the first) example of chaos theory. Chaotic systems are those in which a very small change can have a drastic impact on the outcome of the system over time. The butterfly effect is probably the best known example of this. Essentially, a butterfly flapping it's wings can as a result alter the weather weeks in the future. This happens because the extremely small change in the weather pattern can slowly be amplified over time. This is also the reason why we are so poor at predicting the weather.

Professor Lorenz discovered this fact in the early sixties when he was trying to develop a computer model of the weather. Back then computers were not that powerful so the professor simplified the model so that it consisted of three differential equations:

  • dx/dt = 10(y - x)
  • dy/dt = xz + 28x - y
  • dz/dt = xy - (8/3)z

When running these equations, Professor Lorenz found that if he tried to pick up the equations from where he left them in an earlier run that the outputs were not the same. After verifying that the computer was in fact working properly and that there were not any bugs in his program, he isolated the problem down to the precision in which he was entering the information. He was only entering the data to 3 decimal places where as the computer was keeping the data up to 6 decimal places. Did I mention that this was the sixties and that the computer was primitive?

The result of this is the discovery of Strange Attractors. Other forms of chaos, such as fractals and the Mandelbrot set, have since been discovered and have been used in the generation of some of the most incredible graphics and animations. There are a number of open source programs that can plot these equations for you and there are certainly many books on the subject. I personally feel that it is more fun to write your own generator, but then I like programming and find the programming aspects as much fun (if not more fun) as looking at the results.