Multitris, cooperative multiplayer game

[UPDATE, Oct 28, 2008] This game has been updated several times since we first posted it. Mostly bug fixes, but also lots of UI changes, a minimap for better overview, a new observer mode (for joining active servers), a new powerup, and some additional improvements. We have a few games per day on average, so if you’re lucky you might also find a server up :slight_smile:

Me, Laundon and three others (dicander, bozis, bartac) have been working for a while on a cooperative multiplayer version of Tetris.

Without further ado:
Multitris website (with webstart)

Multitris currently supports up to 99 players, but I’d hazard it might lag with that many. Never tried, to be honest :slight_smile:
You’re welcome to try the single-player mode, but it’s in multiplayer it really comes to life, so I recommend you find somebody to play with!

The game has a central server running that keeps track of all the game servers currently running - let me know if there’s any trouble with it, please! :slight_smile:
Also, there are known sound issues on OSX and perhaps also some versions of Linux - we’d still appreciate any input we could get there, so please share any exceptions you encounter :slight_smile:
Instructions are available in-game, and there’s also some stuff in the multitris help (not up to date).

LWJGL and Slick are both used.

Screenshots

The first two screens below are from a two-player game. The third screen is shows the score screen for a five player game. If enough players play at once, the board will scroll along with your piece.

As always, any input, comments and critique are warmly welcome!

You should have taken that screenshot where 9 of us played…that was awesome! Pure, unadulterated, fun…

Have to say, i might get addicted to this game if enough people keep playing…

DP :slight_smile:

I think this is a great idea, but no servers! :frowning:
How about some AI players?

Hm, no servers. There are servers up now and then but I agree it might not be all that often :confused:

I have to think about that. AI players is nice in theory but it might be tricky…

It seems interesting. I will add it into the Java™ Game Tome. Good job! ;D

But I got this under Linux:

org.lwjgl.LWJGLException: Could not locate OpenAL library.
at org.lwjgl.openal.AL.create(AL.java:153)
at org.lwjgl.openal.AL.create(AL.java:104)
at org.lwjgl.openal.AL.create(AL.java:191)
at org.newdawn.slick.openal.SoundStore$1.run(SoundStore.java:279)
at java.security.AccessController.doPrivileged(Native Method)
at org.newdawn.slick.openal.SoundStore.init(SoundStore.java:276)
at org.newdawn.slick.Music.(Music.java:109)
at Multitris.init(Multitris.java:197)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:345)
at Multitris.main(Multitris.java:182)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.javaws.Launcher.executeApplication(Launcher.java:1272)
at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1218)
at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1065)
at com.sun.javaws.Launcher.run(Launcher.java:105)
at java.lang.Thread.run(Thread.java:619)
java.lang.UnsatisfiedLinkError: org.lwjgl.openal.AL10.nalGenBuffers(ILjava/nio/IntBuffer;I)V
at org.lwjgl.openal.AL10.nalGenBuffers(Native Method)
at org.lwjgl.openal.AL10.alGenBuffers(AL10.java:990)
at org.newdawn.slick.openal.OpenALStreamPlayer.(OpenALStreamPlayer.java:60)
at org.newdawn.slick.openal.SoundStore.getOggStream(SoundStore.java:759)
at org.newdawn.slick.Music.(Music.java:114)
at Multitris.init(Multitris.java:197)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:345)
at Multitris.main(Multitris.java:182)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.javaws.Launcher.executeApplication(Launcher.java:1272)
at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1218)
at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1065)
at com.sun.javaws.Launcher.run(Launcher.java:105)
at java.lang.Thread.run(Thread.java:619)

Java Web Start Error:

null

Now it works under Mandriva Linux 2007!!! Yeah! Thank you!

Huh, that’s odd. We didn’t change anything about the sound I think. We have done changes here and there, though, so perhaps we did and I just forgot :>
Fix for OSX sound problem upcoming soon, I think we’ve solved it but it’s not updated yet.

Ok, when it is fixed, I will add it into the tome but it is very important that your game works under Linux, Macintosh and Windows at least (under Unix, it would be even better :slight_smile: ).

Fix uploaded, and reports so far say sound works fine on OSX too.

Updated - now has the new website instead of the webstart link. The website shows all currently running games, and they can be joined directly via an auto-generated JNLP by clicking the server’s name. Also a few changes to the game. :slight_smile:

On Mac OS X 10.5, Intel


java.lang.Exception
	at com.sun.javaws.Launcher.continueLaunch(Launcher.java:915)
	at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:522)
	at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:218)
	at com.sun.javaws.Launcher.run(Launcher.java:165)
	at java.lang.Thread.run(Thread.java:613)

Looking forward to getting a working version.

Huh, that’s odd. An exception with no additional information, and it works perfectly for some on XP, OSX, Ubuntu. I have, though, seen that error twice now, once on XP, once on OSX - doesn’t make any sense to me. Will try to figure it out, sorry!

Yeah, it’s weird. Thought maybe you would have a clue what it was trying to say because it’s your game. ;D

I understand from another user who had this same problem that it was fixed by updating or reinstalling Java. It doesn’t make much sense to me why it shouldn’t work on some java installations, but you might try it and see what happens if you like :slight_smile:

Sorry for necroing - just wanted to inform you that there have been at least 7 version changes and several improvements to this game, and I’d love to hear your comments on the current version.

The applet runs but doesn’t respond to keyboard input. If I try reloading the applet within the same browser instance then subsequently it doesn’t respond to mouse input either. The first instance might be a bug in the browser or plugin assigning focus as I’ve seen it elsewhere. Curiously, the problem goes away if the Java console is enabled. In the second instance (when reloading), an exception is printed to the console:-

Tue Oct 28 22:14:30 GMT 2008 ERROR:Sound initialisation failure. Tue Oct 28 22:14:30 GMT 2008 ERROR:Only one OpenAL context may be instantiated at any one time. java.lang.IllegalStateException: Only one OpenAL context may be instantiated at any one time. at org.lwjgl.openal.AL.create(AL.java:115) at org.lwjgl.openal.AL.create(AL.java:104) at org.lwjgl.openal.AL.create(AL.java:191) at org.newdawn.slick.openal.SoundStore$1.run(SoundStore.java:294) at java.security.AccessController.doPrivileged(Native Method) at org.newdawn.slick.openal.SoundStore.init(SoundStore.java:291) at org.newdawn.slick.Music.<init>(Music.java:109) at Multitris.init(Multitris.java:267) at org.newdawn.slick.AppletGameContainer$Container.initApplet(AppletGameContainer.java:207) at org.newdawn.slick.AppletGameContainer$ContainerPanel.initGL(AppletGameContainer.java:164) at org.newdawn.slick.AppletGameContainer$ContainerPanel.start(AppletGameContainer.java:148) at org.newdawn.slick.AppletGameContainer$1.run(AppletGameContainer.java:68) Tue Oct 28 22:14:31 GMT 2008 WARN:class org.newdawn.slick.opengl.PNGImageData failed to read the data

The JNLP is missing the Solaris natives, so I haven’t tested that.

Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8.1.14) Gecko/20080620 Firefox/2.0.0.14

$ uname -srv SunOS 5.11 snv_93 $ java -version java version "1.6.0_06" Java(TM) Platform, Standard Edition for Business (build 1.6.0_06-b02) Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)

Thanks a bunch! I have no idea why it wouldn’t listen to keyboard input, sadly. The OpenAL reload issue is known, though - I will make sure to look into that again.

The JNLP starts a version which uses LWJGL1.x, but now that LWJGL 2.0 is released (not only as RC), I suppose we should upgrade to that for the webstart version as well. :slight_smile: