Indiana Jones and the Game That Won’t Restart

The puzzle (Click to play game)

For now the title of my game is “Indiana Jones and the Game That Won’t Restart”. This title will all make sense soon enough if you read the post. All jokes aside now the title is “Indiana Jones Abridged”. I titled it this because it takes aspects from all three Indiana Jones Movies. If you play my game you will see why. (For the record, the fourth movie doesn’t exist in my mind.) I will insert pictures in the morning. My computer does not like the .swf file so I could not open up the game to take screenshots.

On to the visual aspects of the game. As I said in my previous post, I took the color scheme of the game from “Wolfenstein 3D”. The game had kind of an old-school graphics feel and good stuff for dungeons. I went with a gray dungeon in this one because it allowed my characters and objects to stand out. While most of the dungeons Indiana Jones is placed in in the films are a brownish color, I wanted the characters and objects to stand out and it is not entirely unheard of for Indy to be stuck in a stone dungeon. (See Indiana Jones and the Last Crusade.) My blocks I took directly from a screenshot from “Wolfenstein 3D.” I sampled the color of the text from the text on the cover/poster for the Indiana Jones movies. I even went and found an Indiana Jones based font, which I also talked about in my last post.

Level One

Level one was probably the easiest. All it involved was getting an object to open a door. The only real problem I ran into here, I actually ran into on all my levels. That problem was making the door disappear without blocking my player. At first I had the “removeChild” command but that freaked out Flash so I ended up just making it invisible and moving it way out of the way where the player could not run into it. I did this for all the levels that used a door.

For level two, I had an issue with getting my health meters to work properly. The first problem was they were registered in the wrong spot, so I changed the registration and that solved that problem quite easily. The second problem was that I could not get the player’s health to go down only if he did not have the weapon. I solved this by creating a boolean value called “hasWhip” and then used a series of “if statements” to decrease the health of the player only if hasWhip = false. If hasWhip = true, then the enemy’s health would decrease.

Level Two

Level three was also pretty easy. I did encounter the same problem as level one and two with the doors though, except this time it was with other objects. I used the same solution and just made them invisible and moved them way out of the way. Easy enough.

I did have two big problems though. One I solved, the other I did not. The first big problem was my program just started crashing. I have no idea why, but it did. I eventually ended up fixing it. Exactly how? I’m not entirely sure. If I had to venture a guess I would say it was because I moved away from using an “init” function with the “ADDED_TO_STAGE” event to just the “ADDED_TO_STAGE” event. The other big problem I had was in trying to get a restart button to work. There were one of two outcomes for this. Either the program wouldn’t load level one again OR the program would load it but you would not be able to move the player. I probably spent close to 2 1/2 hours on this problem alone and I have come up with nothing. I have tossed trace statements everywhere but to no avail. If anyone has had this problem and figured it out, your help would be greatly appreciated.


So now the game restarts and functions perfectly. All you have to do is focus the game on the levelOne stage. My level one was titled “levelOne”, but yours might be titled differently. For those of you using a button, in your event handler code add this line at the end (remember “levelOne” is my name, yours might be different): levelOne.stage.focus = levelOne.stage; Voila! It works.


About andrewtcoe

College student at Trinity University in San Antonio, TX majoring in Communications.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s