Platform game (not finished)

Virum: Thanks ;D I’m the level designer (most of the levels anyway).

Menus and passwords are coming, but at the moment I’m focusing more on removing bugs related to collision detection (the whole thing is a great hack… nearly impossible to find the bugs :’()
I’ve implemented projectiles into it though, the frog can now shoot if you click Space. Should make it easier. If that’s not enough, there are cheat codes… But I won’t reveal them ;D

mbishop78: thanks man! :smiley: I’m using the sleep timer now, and it seems to work pretty good. I haven’t learned about synchronization and that stuff yet… That’s why I didn’t understand how to use it.

SpongeBob: I’ll try to fix this when I get the time.


BTW;
I’m having problems using the applet with IE, it hangs when I close the applet window. I haven’t got any trouble with the applet viewer, so I think the code is OK. Anyone else having the same problem ???

This game runs pathetically slow for me. Less than one frame per second.
(Using a Mac with a JRE that I can’t talk about… darn Apple NDA)
I would make sure you are using images types that have pixel formats that match the display… convert them at runtime by blitting the loaded images to compatible images. You don’t want to rely on the JRE to convert indexed colour model GIFs or other colour models to the hardware colour model for you. This happens with “automatic images” but they are not really a documented part of the JRE… I think it is best not to rely on them for performance.

the game runs fine here (k7 500/128mb/gf2mx/win98se/1.4.1_01 jre/640x480)

level 4 isnt a real level right? :>

well i found a small glitch… if u get spit out of a upside-down tube and fall then… u can jump in the air whenever u want to. nothing serious… but it’s not intended to be this way usually =)

just one ot-ish question… where do u have the mario titles from? since i would like to make a tile based 2d game sooner or later it would be nice to have some test graphics :wink:

I didn’t know you could just blit the images to compatible ones? Wouldn’t the alpha channel be left out then? Or is it really possible to have it just copy the image data (that is, all channels - RGBA), without any alpha processing? I’ve tried this before, but then the alpha got lost.

???

Level 4 is the first level that was made… But it is a real level, I don’t really understand what you mean… Didn’t you find the goal?
There are 10 levels total now (although the last one shouldn’t count, it’s not very finished). There is no real ending though.

As for the Mario graphics, I used ZSNES to grab screenshots (press F1 during emulation, use menu to grab shots/advance one frame at a time), then photoshop 5 to cut out the parts I needed + creating the alpha mask for them.
BTW, I don’t know how to create png alpha channels in photoshop 6 & 7… When I save the images with those apps, the alpha channel gets lost, I don’t know why…
Anyone who knows??

The glitch you found was supposed to be a feature, although it’s a little weird. The player was supposed to be able to jump a couple of loop cycles after falling, so it wouldn’t be as difficult jumping from downhills.

There are more glitches, though:

  • You can sometimes jump out of a hole after falling in, without touching the contents (the lava, spikes, etc.), because the player stops 1 pixel above the ground when you also steer him towards the wall (he’s stopped because the collision logic in the player object is bad…).

  • Try standing on the pipe in the little pond (in the first level), without jumping on the enemys. Now, let them hit the player. Sometimes, if you move the player the same moment they hit, he’ll fall through the pipe object. This is because the collision detection doesn’t handle objects that intersect at the starting point of their movements very well… I’ll have to fix that some time.

  • There is a platform object that moves up and down, found in the Castle level (#8, I think). If you jump into the bottom of it when it’s moving down, you’ll get stuck in the vertical direction, but you can move away from it horizontally.

[quote]BTW, I don’t know how to create png alpha channels in photoshop 6 & 7… When I save the images with those apps, the alpha channel gets lost, I don’t know why…
Anyone who knows??
[/quote]
Yes. In Photoshop7 use the “Save For Web” menue item. Choose the file type has Png -24 (full alpha) or Png 8 (only full transparency)

DON"T FORGET TO CHECK THE TRANSPARENCY OPTION. :slight_smile:

Cheers, and have a jolly one. :slight_smile:

Put it in a jar file, for pity’s sake!

After the first time, the process takes approximately 1 second.

First time, it takes ooh, about 10 seconds:

“jar -cf frogma.jar com/frogma/*”

Then, unzip the jar file, and find the file “manifest.mf”.
Edit this file, and add the line at the end:
“Main-Class: com.frogma.MainClass”
Make sure there is a BLANK line at the very end of the file (yeah, it sucks, blame sun’s programmers; maybe that “feature” is fixed by now, but I wouldn’t count on it!)
Place a copy of this manifest.mf in the base directory (i.e. which has the package(s) as sub-directories).

Then, every time you want to make the JAR file from your compiled class files, just go to the base directory and type:

“jar -cmf manifest.mf com/frogma/*.class”

or whatever.

(this assumes your whole game is in a package “com.frogma” and that the class containing your public-static-void-main(…) method is “MainClass.java”)

Or, you could just go and read the java documentation…all the details are in there.

I know how to JAR it… I’m just too lazy ;D
The next version will be in a jar file :-/