Super Mario Programming Contest

Bored this summer? Tired of waiting for the 4K to roll around again? Me too. So now, I present to you:

The Super Mario Programming Contest is the contest where you create the best game possible using only retro-style mario graphics!. That’s the only thing that’s enforced, everything else is up to you! Come on, you know you’ve wanted to see the Mario Bros. duke it out in a huge fireball fight. Or play a Yoshi watermelon-seed-spitting battle. Or what about that game where Luigi saves the princess?

Do what you want. Use any sounds you want. Present it with the mario graphics provided on the spritesheets we give you!

Oh, and by the way, THERE ARE PRIZES!!

The Prizes are:

[]The top 5 entries get a free copy of Tribal Trouble courtesy of Oddlabs!
[
]One month SIX months FREE of Wurm Online play time!
[]Oh, and I’m throwing in a 1-up hat, too.
[
]And we’re still sniffing around for more :slight_smile:

So what are you waiting for? Let’s make some mario games!

http://javaunlimited.net/mario/index.html

Right, saw this flick by - got excited - got confused when it went and now…

HAPPY DAYS!

I’m so in - however, whens the official start date?

One question - I note we can rehue, do minor edits etc on the sprite sheets. Is it ok to rescale the whole sheet using something like Scale2X? I love the sprites but they may be a bit small on today’s resolutions.

Kev

Wohohoohoooo :wink:

I will enter this if i can think of something, :stuck_out_tongue:

:slight_smile:

Wheee!!!

http://www.mojang.com/notch/mario/super_mario_test.gif

Clicky to play the game feel test -> http://www.mojang.com/notch/mario/
(Click applet to focus, arrow keys and space to move and jump)

0FPS on Firefox 1.5 and Konqueror, Mandriva Linux, Java 1.5. A background image is shown (the tall hills), nothing in the foreground.

mh, ok

A little bug :slight_smile:

I jumped like indicated - and got stuck

I’m also running Linux here(Ubuntu 6.06) with Java 1.5.0_06. When I try to run the applet, the following exceptions come up:


javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
        at com.sun.media.sound.HeadspaceMixer.nResume(Native Method)
        at com.sun.media.sound.HeadspaceMixer.implOpen(HeadspaceMixer.java:346)
        at com.sun.media.sound.AbstractMixer.open(AbstractMixer.java:286)
        at com.sun.media.sound.AbstractMixer.open(AbstractMixer.java:323)
        at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:103)
        at class.k.<init>(Unknown Source)
        at class.s.<init>(Unknown Source)
        at com.mojang.mario.AppletLauncher.init(Unknown Source)
        at sun.applet.AppletPanel.run(AppletPanel.java:378)
        at java.lang.Thread.run(Thread.java:595)
javax.sound.midi.MidiUnavailableException: Audio Device Unavailable
        at com.sun.media.sound.MixerSynth.implOpen(MixerSynth.java:154)
        at com.sun.media.sound.AbstractMidiDevice.doOpen(AbstractMidiDevice.java:144)
        at com.sun.media.sound.AbstractMidiDevice.openInternal(AbstractMidiDevice.java:134)
        at com.sun.media.sound.AbstractMidiDevice.getReceiverReferenceCounting(AbstractMidiDevice.java:339)
        at javax.sound.midi.MidiSystem.getReceiver(MidiSystem.java:243)
        at javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:442)
        at javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:348)
        at class.t.a(Unknown Source)
        at class.s.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)

The background, and title come up, and the fps is at 0, nothing else happens

I also tried running it with JDK 1.6.0-rc-b90. In that case, almost the same exceptions are also thrown. However, the game runs (80 or so fps) and the sprites move, but no keyboard input is registered. The 1.6 exceptions are as follows:


javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
        at com.sun.media.sound.HeadspaceMixer.nResume(Native Method)
        at com.sun.media.sound.HeadspaceMixer.implOpen(HeadspaceMixer.java:346)
        at com.sun.media.sound.AbstractMixer.open(AbstractMixer.java:286)
        at com.sun.media.sound.AbstractMixer.open(AbstractMixer.java:323)
        at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:103)
        at com.sun.media.sound.MixerSourceLine.open(MixerSourceLine.java:39)
        at class.k.<init>(Unknown Source)
        at class.s.<init>(Unknown Source)
        at com.mojang.mario.AppletLauncher.init(Unknown Source)
        at sun.applet.AppletPanel.run(AppletPanel.java:417)
        at java.lang.Thread.run(Thread.java:619)
javax.sound.midi.MidiUnavailableException: Audio Device Unavailable
        at com.sun.media.sound.MixerSynth.implOpen(MixerSynth.java:165)
        at com.sun.media.sound.AbstractMidiDevice.doOpen(AbstractMidiDevice.java:144)
        at com.sun.media.sound.AbstractMidiDevice.openInternal(AbstractMidiDevice.java:134)
        at com.sun.media.sound.AbstractMidiDevice.getReceiverReferenceCounting(AbstractMidiDevice.java:339)
        at javax.sound.midi.MidiSystem.getReceiver(MidiSystem.java:243)
        at javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:442)
        at javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:348)
        at class.t.a(Unknown Source)
        at class.s.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:619)

Hmm. I just checked the J4K game I wrote a while back (which incidently has sound), and it no longer works on this machine either. I don’t have time to install the latest versions of the JDKs at the moment, but I’ll post back as soon as I have time to try again.

Nice job Markus, two things:

  1. ummm, you can’t die

  2. STOP THE MUSIC!!! Ahem, when clicked the link for the larger view, the new applet started, and the old music kept playing mixed with the music from the larger view applet. Then I had to close all instances of my browser to make it stop (latest mozilla with jre 1.5)

Yeah, I noticed the midi keeps playing when you leave the page. I’ll fix. :wink:

Awesome applet! So smooth and mario-ish (can I use that as a term? :))

Brilliant already!

Kev

start date is NOW. :stuck_out_tongue:

Scale2X is fine… when I say it’s illegal to manipulate pixels, I mean like drawing a frownie face on yoshi or something like that :wink:

good stuff already guys, I think I’ve seen 4 mario demos/screenshots total. can’t wait to see where this goes! :smiley:

I implemented Scale2x for my mario game:

Source code (public domain):
http://www.mojang.com/notch/mario/Scale2x.java

Scale2x scaling:

http://www.mojang.com/notch/mario/scale2x.gif

Normal java2d scaling:

http://www.mojang.com/notch/mario/2x.gif

Here is my observation after seeing Markus’s applet. This just demonstrates that, not only is Java an awesome language for developing games in, but draws the critical point of just how important good art is. Here are characters with very few frames of animation but, due to the brilliance of their design, they look amazing. You know, we should hook up with one of the art institutes and see if we can get assets made available for the developers here at JGO…

-Chris

javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
	at com.sun.media.sound.HeadspaceMixer.nResume(Native Method)
	at com.sun.media.sound.HeadspaceMixer.implOpen(Unknown Source)
	at com.sun.media.sound.AbstractMixer.open(Unknown Source)
	at com.sun.media.sound.AbstractMixer.open(Unknown Source)
	at com.sun.media.sound.AbstractDataLine.open(Unknown Source)
	at class.k.<init>(Unknown Source)
	at class.s.<init>(Unknown Source)
	at com.mojang.mario.AppletLauncher.init(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Using Ubuntu Linux (Dapper Drake), fully updated… Linux + Sound + Java is a total mess. Something that should “just work” - but it’s Linux… so it will require days of hunting and configuration… sigh… when will I learn that it just isn’t worth even trying to use Linux.

On another note… I may enter this contest - time permitting. I wanted to play around with OpenGL for 2D games as I’m an OpenGL newbie… So I grabbed Kev’s Space invaders tutorial that has both a Java2D and an OpenGL (JOGL) renderer. It’s helped very much to get started, but one comment…

DON’T start game loops from a constructor in sample code!!!

I started refactoring the Space Invaders code to form a customized game engine for this contest… I made a game base class and separated out the specific game logic into a subclass and then noticed that the Java2D version stopped working properly. It was all because of the game loop being started from the constructor of my new ‘Game’ base class . When you start threads or trigger things from a constructor it makes the class too dangerous to subclass. The threads or game loops start running before the subclass constructor runs, and if your constructr never returns, well than the subclass constructor never runs either. And that, of course, buggers everything up.

I only mention this because the Space Invaders code is offered as a tutorial for Newbies and it should therefore avoid questionable practices that would be more at home in the wacky world of a 4k contest. Overall I have high praise for the tutorial, thanks Kev. I hope you don’t mind that I intend to steal bits of it for this contest :). I’ll give you credit of course.

Another question regarding the contest. The rules say that we can only use the supplied bitmaps for sprites and such, as well as out own particle effects. Are we allowed to use any procedurally generate graphics, such as filled polygons, for background elements, text, or whatever? Extending the idea that scale2x is allowed, I assume that I am allowed to rotate and scale the bitmaps in any way so long as I’m not actually drawing on them to make a new picture?

Fair comment on the tutorials - I would say it was a mistake but I still quite often find myself doing things like that today in quick coded stuff - mostly because I’m just sloppy I’m afraid when writing stuff I don’t see as being reused. As soon as I get time (maybe today) I’ll look at updating the tutorials a bit - haven’t touched them in a couple of years.

To be clear for other readers of the tutorials - this appears in the intro of all of them:

Kev

EDIT: Consider Spaceinvaders 101,102,103,104 and the Asteroids tutorial updated in reflection of this comment.

yes, generic shapes, including filled polygons, or even terrain generated with textures from the spritesheets, is all fine. except you cannot use filled polygons to make the appearance of an image that is not in the spritesheets [you know, a bunch of filled squares ordered in a matrix-like form with different colors mosaically resembling a brand new sprite ;)].

yes, as the Getting Started Guide says, you can change the hue, the brightness, the contrast, etc, as well as the width, the height, the rotation, anything except you cannot actually manipulate the pixels to make a new picture :slight_smile:

Alright guys well time to show off what ive been working on so far. Now this is not polished off or complete but its on its way. Anways heres some screen shots and im wondering if my join screen is legit to the extent of allowed or will i need to rework it into real mario gfx. Anways Gunbound/Worms style mario game complete with multiplayer.

DEMO!?!?!? PLEASE!?!? :smiley:

looks really good! cant wait to try it out! and your graphics seem fine to me. all I see are sprites from the legit sheets and primitive shapes… which are all fine.

good stuff!