Oh Mummy!, a classic game

Hi all:

This is my second entry for the contest, after 4k - Billard.

OH MUMMY!

I think that this was the first game I played in my old Amstrad. It was loaded from a cassette and it lasted a lot of time.

The concept is easy. You control the man with the direction arrows. You have to find the two green blocks to pass to the next level. When you had found the two green blocks, come back to home to pass to the next level.To know the color of the block, you have to walk all around it. Be careful with the mummies, each level has more of them and they are cleverer and cleverer.

It has been a very hard job. I’m collecting all the useful tricks I have done to reduce the final size of the jar, such as my own format for images, three nested loops in a single one,…

The game is in “Beta” version because I’m waiting for comments about it, the mummy intelligence level, suggestions… All opinions are welcome.

I hope you have fun with this 4k version of the game, as I did playing it and programming it.

Luis Javier López Arredondo

It has a nice retro style and feel to it, but i think it could do with being faster paced. Also the webstart link points to a jar not a jnlp.

Thank you for your opinion. The pace is increased in each level. I can adjust it.

Does anybody know a host that accepts jnlp?

You’ve just brought back many memories of playing this on the CPC 464. :slight_smile:

I agree with g666, it feels a bit ponderous, definitely slower than I remember from the original. Didn’t play far enough to see any speedups though…
I also remember some booby-trapped blocks that would unleash an additional mummy when they were circled. Is there space left to implement these?

http://www.java-gaming.org/forums/index.php?topic=15495.0

Yes, there were trap blocks.

My initial idea was to implement it, but I had tu reduce a lot of features, :(, like looking for the original objects instead of the green blocks, :P.

I also wanted to include the original song, but was completely impossible, :frowning:
I found it here. Sure it brings you some memories, :slight_smile:

Thanks

The game is quite fun, good job mate, I love that old-school style :wink:

Perhaps it could be a bit faster, couldn’t it?

Hi all:

I increased the speed, but I have a problem with the jnlp file.

I have a resource called ‘o’ with the sprites. I try to load it in the following way:


byte[] bytesRead = new byte[8*144*3]; // 16*144*3 / 2
(new ObjectInputStream(ClassLoader.getSystemResourceAsStream("o"))).read(bytesRead);

As you can see if you have played the game, it works perfectly downloading the jar file, but launching from the jnlp file I get a null exception because it can’t find the resource. This is my jnlp file:

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" codebase="http://es.geocities.com/luisja80/rep">
 <information>
    <title>Oh Mummy!</title>
    <vendor>Luis Javier Lopez Arredondo</vendor>
    <description>Run away from the mummies.</description>
    <description kind="short">Oh Mummy!</description>
    <icon href="http://es.geocities.com/luisja80/img/ohmummy.jpg"/>
  </information> 
<resources>
	<j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+"/>
	<jar href="mmod.jar" downloaded="eager"/>
</resources>
<application-desc main-class="O"/>
</jnlp>

??? Do I have to include anything in the jnlp file to make the resource recheable?
??? Do I load wrongly the resource?

Thank you.

i load my resources like this:

this.getClass().getResource(“FILENAME”).openStream();

in you situation as you are in a static block i would use:

ClassLoader.getSystemClassLoader().getResource(“FILENAME”).openStream();

Thank you for your help. This code returned me the same exception. It finally worked with:

(new ObjectInputStream(URLClassLoader.newInstance(new URL[]{new URL("http://es.geocities.com/luisja80/rep/mmod.jar")}).getResourceAsStream("o"))).read(bytesRead);

I couldn’t use it due to the size, 100+ bytes more, and also I didn’t like to use an absolute URL reference, :(. So, I’m sorry for not using a jnlp file.

Now, I have improved the game:

  • Improved the frame rate handler.
  • Speed has been increased. Each 3 levels, it is faster and faster, until level 9; faster was uncontrollable.
  • Now, the game can be continued. You can continue playing in the same level, but the score will be reset, :stuck_out_tongue:

As soon as I can comment a bit mre the code, I’ll share it.

Enjoy the game, :slight_smile:

maybe try this:


(new ObjectInputStream(O.class.getResourceAsStream("o"))).read(bytesRead);

Perfect. Thanks a lot. ;D

:frowning:
Why my webstart link is broken?

The real link should be: http://javaunlimited.net/hosted/ljlopez/ohmummy.jnlp (it works)

I’ve been trying to edit the submission, but the system doesn’t allow me.

Please, could the administrator solve this problem?
Thank you.

this is the exact error…

what is the game trying to load? it should be self contained…

your JAR works fine, though.

It is self-contained. It worked, but it doesn’t now.
Just try the link: http://javaunlimited.net/hosted/ljlopez/ohmummy.jnlp

On February 18th, it worked perfectly, as a post in this thread shows. I haven’t change anything in the JAR file since then. So, please, change the link to the real location or update your local copy of the JAR file to this last version, previous to the ending of the contest.

Thank you.

A few details:

JAR file: http://es.geocities.com/luisja80/rep/m.jar
Last modification date: 02/18/2007
It is aute-executable, and it works by webstart http://javaunlimited.net/hosted/ljlopez/ohmummy.jnlp

Thank you

i wont be using the the jar on your site directly, the archived version is already the latest version (it was downloaded on march 18).

for whatever reason, the error was occuring because your archive folder had exclamation points in them. (it used to be http://javaunlimited.net/games/archive/4K07/0HMUMMY!!!/ )

since you were using ObjectInputStream to load a resource inside the JAR, and since JARs use exclamation points in their URLs, this is probably why webstart had errored.

you can see what i mean by putting the jar in a local folder on your computer with a ! in the folder name. try to execute it, you’ll see.

It works fine now.
Thank you very much.

:smiley:

http://javaunlimited.net/games/launch.php?type=jnlp&id=142

Sorry for not testing the link before. I didn’t know it was going to change.

Regards.

Luis Javier López Arredondo

works here?