A Lasting Impression - JGO Comp 2008

Here is my entry for the JGO Comp 2008. It was submitted to the Tome on time, although this post won’t be.

The concept is that you’re an American during the Cold War who is living in lovely suburbia. Naturally, the most important thing to you is how your home looks, with the trimmed state of the lawn coming in a close second. The Russkies have decided to bomb the United States - in fact, they are dropping a bomb very near by. You heard about how the outlines of people were forever etched on buildings in Hiroshima and Nagasaki - this gives you an idea. In order to keep your house safe, you must pile up as much junk on the side of the house as possible. The blast will therefore incinerate all the piled junk (including possible children), rather than leaving a mark on your home.

Your tools are your ingenuity, and your extraordinary ability to act like a disembodied hand. Left click to pick up objects and drop them, or put them into your inventory. Right click to pick up and then throw an item (or left-click). While holding an object, press < or > to rotate it.

You can also break certain items apart and combine others. To break something, fill only the first inventory slot, then press the hammer button. If it’s breakable, its pieces will fill up the two slots. If it’s not, nothing will happen. To combine something, fill the two slots with the items you want to combine, then click the glue button. If successful, the items will combine into the left slot.

Some items can be stuck onto the side of the house (nails and bubblegum, for example) in order to help position and stabilize things. There is a certain very nice object that keeps objects stuck fast on the wall with no budging, but most will have a little bit of sway. To put these objects onto the side of the house, left click them to pick them up and then let go where you want them. You won’t be able to move them again. To attach other objects to them, left click those objects and let them go on top of what you stuck on the wall.

At the end of the game (when the Russians bomb you), you will be told what percentage of the house you covered, and an image showing the outlines on your house will be saved in home/.ALastingImpression/house.png. It would be cool if people would take this image and show everyone how well you did online.

And I think that’s it. I didn’t have time for a tutorial, but I recorded it all in a timelapse that I will compile together shortly. I still had a lot of features I wanted to add, but that’s life, right?

Please find my game on the Tome and vote on it as part of the contest. Also, you can play it here:

PLAY HERE WITH WEBSTART

I played on easy for 5 mins, the explosion went off, and instead of a score I got

java.lang.NullPointerException
	at com.otcsw.alp.Model.draw(Model.java:150)
	at com.otcsw.alp.Model.start(Model.java:112)
	at com.otcsw.alp.Main.<init>(Main.java:60)
	at com.otcsw.alp.Main.main(Main.java:65)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Cheers

Endolf

Launch game, click in the windows to get the focus :

java.lang.NullPointerException
	at com.otcsw.alp.Model$MouseHandler.mousePressed(Model.java:418)
	at com.otcsw.alp.Model$MouseHandler.factorMouse(Model.java:355)
	at com.otcsw.alp.Model.factorMouse(Model.java:323)
	at com.otcsw.alp.Model.start(Model.java:110)
	at com.otcsw.alp.Main.<init>(Main.java:60)
	at com.otcsw.alp.Main.main(Main.java:65)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

I got exactly the same exception as endolf, also easy 5 min.

The game idea is very interesting. ;D

Oops, I was having trouble getting ImageIO to recognize things in my classpath, so I switched everything over to File’s. Naturally, when I had 20 minutes left to submit it and switched everything back to classpath access I forgot the loading of the house image at the very end. I also added in the entire menu in the last hour, which caused some of those null pointers. Also if you check the console it’s likely you will see “Late Preloading” a bunch of times. This is because I used an ImageManager I made before that allows you to preload, but I didn’t bother for this game.

Here is a clear on Easy-Short, I got something like 30%.

The webstart has been fixed and updated, please try again.

Find it on the Tome (and vote for it) here:
http://www.javagametome.com/game.html?id=54

The idea is wonderfully macabre! What I wanted was more live creatures to stick onto my house (dogs, sleeping old people… Would an elephant be too much to ask?).

I can’t imagine many people playing for the full 30 minutes, which is a shame because that’s probably the time it takes to build a really impressive barrier. Perhaps the upper limit could be 5 minutes, and if the play area is made smaller (no scrolling!) then it would feel like plenty of time.

It’s pretty amazing how much you can get done in three days!

Simon

P.S. I spotted the bomb-guy from the sprite sheet!

Thanks for the good comments. :slight_smile:

Yeah, 3 days was maybe too short a time for this game, because a lot of that stuff you mentioned was already on my mind as an improvement. I didn’t think of elephants, but I definitely wanted a ton more things you can shove onto the walls. :stuck_out_tongue:

For example I wanted drunken end-of-the-world revelers to run in and throw beer bottles all over the place, and perhaps I will make the playing field smaller. I got a similar comment from someone else. I think I’m going to make most of the items (especially crates) a lot bigger, too.

And you’re right that 30 minutes is too long… especially because the game starts to lag after 5 because there are too many objects.

And I forgot to mention…
This uses LWJGL and Phys2D.