J4K

soundbank is a wavering issue… the point of the j4k is to make games that are compatible with a JRE that has no extensions (which unfortunately, LWJGL isn’t part of the JRE). Technically the soundbank DOES come with the JRE… just the “private” (SDK) JRE.

Either way I’m pretty sure soundbank or not, you can use some sounds. Someone correct me if I’m wrong… but I’ve noticed that the java.applet.AudioClip interface does not require the soundbank.gm file. So you could use that even if your game isn’t an applet because Applet has a static method for retreiving AudioClips


AudioClip boom = Applet.newAudioClip(getClass().getClassLoader().getResource("boom.au"));
boom.play();

of course, the downside to this is, ogg/mp3 or custom sound formats aren’t supported. You’d be stuck with wav (too big anyway), mid, and au.

[quote]Using the nice soundbank as standard is a bit close to breaking the 4k limit for my tastes.
[/quote]
Sorry, should of been clearer, I meant as an extra webstart option: Use this one for the 4k version, use this one if you only have the JRE inistalled, and want sound.

[quote]Either way I’m pretty sure soundbank or not, you can use some sounds. Someone correct me if I’m wrong… but I’ve noticed that the java.applet.AudioClip interface does not require the soundbank.gm file. So you could use that even if your game isn’t an applet because Applet has a static method for retreiving AudioClips


AudioClip boom = Applet.newAudioClip(getClass().getClassLoader().getResource("boom.au"));
boom.play();

of course, the downside to this is, ogg/mp3 or custom sound formats aren’t supported. You’d be stuck with wav (too big anyway), mid, and au.
[/quote]
There’s nothing saying you can’t just use JavaSound. JavaSound supports a whole bunch of common formats, including generating the sound algorithmically! That’s actually how I was able to pack sound effects into Defender 4000. All I did was open a sound channel, then pump the results of a few simple loops out to the sound card. The results weren’t anything to write home about, but they were on par with the traditional bleeps and bloops of arcade games. And a key point I stressed last year was that Defender 4000 was the only game with sound that didn’t use the soundbank. Actually, Abuse’s entry was the only other game with sound, so it really was two different implementations duking it out. :slight_smile:

Generating wave data seems to be pretty interesting, jbanes. I just took a look at your defender code and it seems to be even smaller than using midi… duh. Well, for simple sounds it’s smaller. In jm4k I’m also changing the volume accordingly to your speed when you bump into the walls or depending on the distance to the explosion. :slight_smile:

But I think I’ll try it for my current project (if there are enough left over bytes at the end ;)).

I have a submission in the works. It is called Swarm.

Try it out at http://24.103.107.96/swarm.html

Note: My official submission will not be webstarted of course, cause that takes up too much space. ;D

The Webstart does not count towards your 4K limit, as long as it does not include any args to the application, as it is no more than a launcher.

Swarm locks up every no and again. :-[

[quote]The Webstart does not count towards your 4K limit, as long as it does not include any args to the application, as it is no more than a launcher.
[/quote]
Oh… I use an argument in the webstart of dungeon4k for telling it not to try windowed mode (so the game works without me having to sign the jar). The game works fine without the argument if you run the game with full permissions.
Is that ok?

btw, I guess I should formally enter the game in here as well, so:
I hereby formally enter Dungeon4k into the j4k competition.
You can take out the sonicracer one as I’m not going to finish it. =/

[quote]You can take out the sonicracer one as I’m not going to finish it. =/
[/quote]
Darn. I guess I am in the minority, but I actually liked sonicracer better. With some minor tuning I think it should have a really good chance of winning. Even in it’s current state it is a good contender and a complete game, so don’t take it out!

CaptainJester: Swarm locks up for me as well, normally within 10 sec :-/

Yeah, as soon as the NullPointerException hits, it freezes. It has something to do with the bullets. If you don’t fire too fast, it doesn’t happen as often. Unfortunatly you have to fire fast. :wink:

Once I have found the problem, I will post the fix.

Thanks for trying it out.

Alright, it looks like it is working now. Please try again.

Thanks.

Just found a little thing… you can use an additional pack200/unpack200 (and then repack) step for peeling some bytes off. It basically does that what an obfuscator could also do - it removes modifiers which aren’t needed at runtime.

“Some bytes” are 21 in my case. Not much… but it can make or break the limit :wink:

Woogley, are you planning to update the games list at the end now?

Kev

Yes, Yes, Yes… I know, I said I wasn’t going to… but I’m addicted. I present to you Neb4k:

The Roundlings (read circles) have been invaded by the Evil Red Squares (so called because of their colour, shape and disposition) who have occupied the most sacred Roundling temple - the Tower of Ovals. As Ben a young Roundling adventurer you must climb the tower to free the magic within.

Webstart:
http://www.cokeancode.com/games/4k/neb4k/neb4k.jnlp
Jar:
http://www.cokeancode.com/games/4k/neb4k/neb4k.jar
Main-Class:
N

Level designer, screenshots and stuff available at: http://www.cokeandcode.com/games/4k/neb4k

Kev

[quote]Woogley, are you planning to update the games list at the end now?

Kev
[/quote]
I try to update the list on a weekend-basis. I’ve missed the past few weekends because of some school projects (still in highschool ya know :P). The list will be updated this weekend (probably Saturday morning)

If I use pack200, that is ok? You can’t run it directly, but you can extract it then run it. So as long as the delivery file is 4k or less?

I think Java 1.5 can read JARs that have been archived with pack200, and since 1.5 is the target JRE, I dont see a problem with it. As long as the target JRE can run it from the shell (i.e. double clicking or with java -jar), then it’s fine. There should be no unpacking on the user’s side

edit: the games list has been updated (with 21 games so far!). Let me know if I’ve missed a game!

I’ll go ahead and make Robotron 4096 an official entry. More info can be found here:

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=Announcements;action=display;num=1106594902

Download here:

http://java.dnsalias.com/4k/robotron/Robotron4096.jar

I’ll add IsOlation net to my entries too :slight_smile:

More info: http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=Announcements;action=display;num=1107636900

Jar is here: http://www.cokeandcode.com/games/4k/onet/onet.jar
Main-Class: O

Kev

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=Announcements;action=display;num=1107621967
http://forum.java.sun.com/thread.jspa?threadID=579342&start=75&tstart=0

For Fetrisk4k / Fifteen4k… just in order to make sure they’re officially posted.

EDIT:
FetRisk:
http://www.x2d.org/java/4k/FetRisk4k.jar
Fifteen:
http://www.x2d.org/java/4k/Fifteen4k.jar

EDIT 2:
Webstart:
Clickrisk: http://www.x2d.org/java/4k/clickrisk.jnlp
Fetrisk: http://www.x2d.org/java/4k/fetrisk.jnlp
Fifteen: http://www.x2d.org/java/4k/fifteen.jnlp