Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Oh Mummy!, a classic game  (Read 12042 times)
0 Members and 1 Guest are viewing this topic.
Offline hano

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Posted 2007-02-13 17:08:29 »

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

Offline g666

Junior Member





« Reply #1 - Posted 2007-02-13 17:36:52 »

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.

desperately seeking sanity
Offline hano

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Reply #2 - Posted 2007-02-13 17:53:49 »

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

Does anybody know a host that accepts jnlp?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #3 - Posted 2007-02-13 18:29:04 »

You've just brought back many memories of playing this on the CPC 464.  Smiley

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?
Offline woogley
« Reply #4 - Posted 2007-02-13 19:25:37 »

Does anybody know a host that accepts jnlp?

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

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Reply #5 - Posted 2007-02-13 19:35:51 »

Yes, there were trap blocks.

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

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

Offline hano

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Reply #6 - Posted 2007-02-13 19:36:14 »

Thanks

Offline Guarmigue

Junior Member


Projects: 2



« Reply #7 - Posted 2007-02-16 00:06:05 »

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?
Offline hano

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Reply #8 - Posted 2007-02-18 01:28:41 »

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:
1  
2  
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:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
<?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>


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

Thank you.

Offline moogie

JGO Knight


Medals: 12
Projects: 6
Exp: 10 years


Java games rock!


« Reply #9 - Posted 2007-02-18 02:48:51 »

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();
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline hano

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Reply #10 - Posted 2007-02-18 20:25:16 »

ClassLoader.getSystemClassLoader().getResource("FILENAME").openStream();

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

1  
(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,  Sad. 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, Tongue

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

Enjoy the game, Smiley

Offline Daniel_F

Junior Member


Projects: 2


Java games rock!


« Reply #11 - Posted 2007-02-18 22:45:39 »

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:
1  
(new ObjectInputStream(ClassLoader.getSystemResourceAsStream("o"))).read(bytesRead);


maybe try this:
1  
(new ObjectInputStream(O.class.getResourceAsStream("o"))).read(bytesRead);
Offline hano

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Reply #12 - Posted 2007-02-18 22:56:15 »

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

Perfect. Thanks a lot. Grin

Offline hano

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Reply #13 - Posted 2007-03-25 22:21:46 »

 Sad
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.

Offline woogley
« Reply #14 - Posted 2007-03-25 22:50:20 »

this is the exact error..

Quote
java.lang.NullPointerException
   at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)
   at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
   at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
   at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
   at java.io.ObjectInputStream.<init>(Unknown Source)
   at O.b(Unknown Source)
   at O.<init>(Unknown Source)
   at O.main(Unknown Source)
   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.continueLaunch(Unknown Source)
   at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
   at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

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

your JAR works fine, though.
Offline hano

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Reply #15 - Posted 2007-03-26 00:58:25 »

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.

Offline hano

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Reply #16 - Posted 2007-03-26 01:07:09 »

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

Offline woogley
« Reply #17 - Posted 2007-03-26 01:33:17 »

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.
Offline hano

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Reply #18 - Posted 2007-03-27 00:05:36 »

It works fine now.
Thank you very much.

Cheesy

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

Offline Mr_Light

Senior Member




shiny.


« Reply #19 - Posted 2007-03-30 12:35:55 »

works here?

It's harder to read code than to write it. - it's even harder to write readable code.

The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
Offline hano

Senior Newbie


Projects: 1


http://es.geocities.com/luisja80


« Reply #20 - Posted 2007-07-22 16:50:15 »

Hi all:

FYI.
My Google gadget version for this game: http://hardprogrammer.blogspot.com/2007/06/oh-mummy-gadget.html

If you have any of your games in a gadget, share it, and I'll add it to my startup Google page.

Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (25 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (43 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!