View Game: PORT4K

PORT4K

By Erik Byström, submitted on Feb 21, 2012
Min JRE version: 1.6
5629 downloads.
This game was submitted in the Java4K 2012 Competition.
Source code available! Show source code

(Click on game for focus)


You need Java installed to play this game.
You may use the button below to get it.

Get Java


Description

You wake up and find yourself trapped in a maze of sinister tests. Fight your way out by jumping through portals to reach the green zone.

Portals only sticks on the light gray walls.

Instructions

CONTROLS
* a, d to steer left and right.
* w or space to jump.
* Left mouse button fire an orange portal.
* Right mouse button fire a blue portal.

NOT WORKING?
It might be because of conflicting sound sources.

ACKNOWLEDGEMENTS
Thanks to Druttis and Jocke for their help with the synth and music respectively.

User Comments

Total 9 comments:

#1 By Bearded Cow Feb 21, 2012 at 21:05:11
OMG THIS IS AMAZING!!!!
#2 By Birger Feb 21, 2012 at 23:15:18
Najs portal clone =)
#3 By tm80 Feb 22, 2012 at 00:21:23
SWEET!!! I like this ALOT =)
#4 By Joakim Troeng Feb 22, 2012 at 10:01:11
Once again, awesome. And the music, awesome!
#5 By aelg Feb 22, 2012 at 16:40:58
Real sweet. Good work with the music!
#6 By Ivaxlar Feb 24, 2012 at 08:52:06
This is ridiculously amazing
#7 By Quentin Feb 25, 2012 at 11:17:14
I got here from the randomize button, so I just had to play it through again xD It\'s amazingly fun!
#8 By dapy Mar 3, 2012 at 22:24:07
This is quite brilliant! I got stuck on the one with the ramp facing the wrong way - can\'t remember what level number...
#9 By Gavin Murrison Mar 10, 2012 at 15:16:40
Brilliant!

You need be logged in to write comments. If you need to register click here.

Source code

Note: We recommend you copy+paste this to a better editor. Some special character encoding may have been lost.

to continue", 320, 420); } // Draw the entire results on the screen. appletGraphics.drawImage(screen, 0, 0, null); Thread.sleep(10); } } catch (final Exception exc) { // exc.printStackTrace(); } } private static void project(final int[] faceX, final int[] faceY, final float[] level, final int index, final float px, final float py) { faceX[0] = (int) ((px * zNear - px + level[index + X]) / zNear); faceY[0] = (int) ((py * zNear - py + level[index + Y]) / zNear); faceX[1] = (int) ((px * zNear - px + level[index + X2]) / zNear); faceY[1] = (int) ((py * zNear - py + level[index + Y2]) / zNear); faceX[2] = (int) ((px * zFar - px + level[index + X2]) / zFar); faceY[2] = (int) ((py * zFar - py + level[index + Y2]) / zFar); faceX[3] = (int) ((px * zFar - px + level[index + X]) / zFar); faceY[3] = (int) ((py * zFar - py + level[index + Y]) / zFar); } @Override public boolean handleEvent(final Event e) { switch (e.id) { case Event.KEY_PRESS: // case Event.KEY_ACTION: // key pressed key[e.key & 0xff] = 1; break; case Event.KEY_RELEASE: // key released key[e.key & 0xff] = 0; break; case Event.MOUSE_DOWN: key[MOUSE_BUTTON] = 1 + (e.modifiers == 0 ? 0 : 1); break; case Event.MOUSE_UP: key[MOUSE_BUTTON] = 0; break; case Event.MOUSE_DRAG: case Event.MOUSE_MOVE: key[MOUSE_X] = e.x; key[MOUSE_Y] = e.y; break; } return false; } private static String str_colors = "u0080u8080" // COLOR_BACKGROUND + "u00d0ud0d0" // COLOR_FACE + "u00c0uc0c0" // COLOR_WALL + "u0070u7070" // +1 + "u00ffu7070" // +2 + "u00ffub030" // COLOR_P1 + "u0000ub0ff" // COLOR_P2 + "u0080uc070" // COLOR_EXIT + "u0040u4040" // COLOR_PLATE_BORDER + "u0020u2020" // COLOR_WALL_BORDER + "u0000u0000" // COLOR_FACE_BORDER + "u00ffuffff";// COLOR_WHITE private static final String frequencies = "u00c2u00cdu00dau00e7u00f4u0103u0112u0123u0134u0146u015au016e"; private static final String data = "u0010'u004cu0063u0088u00a5u00c4u00f7u0a01u0a03u03cdu034du393eu3935u36b5u391bub99bu3612u3903u3911u0111u0303u4d03u4d39u3e39u3e1eu279eu111eu9120u3920u3939u0339u032eu302eub02cu282cu0bacu032cu0a01u0a03u03cdu03cdu39beu39b5u36b5u391bub99bu3612u3903u3910u020cu0483u03cdu03cdu3928u3928u0fa6u0fa6u3903u3903u2388u2388u1e03u19a4u37a4u321eu3219u3700u0c02u0804u8303ucd03ucd39u3b39u3b1bu341bub439u0339uae35u2e25ua825u1535u000eu010eu8303ucd03ucd39u2839u280fu1e0fu9e11u2611ua639u0339u8323u8c1fu8c1du0319u1801u1883u03cdu034du1e37u9eb7u204du204du392bu392bu1240u12c0u0f17u0f97u12a8u12a8u2223u27a3u2a28u2f28u3903u3903u2288u1d88u1a03u1517u0213u0484u1403u0e83u089au081au03cdu034dub93eu393eu1938u9931ub927u3927u9e07u9e87u2124u2124u3903u3983u1587u2b07u3514u350au2b00"; // private static final String data = // "u0010'u004cu0063u0088u00a5u00c4u00f7u0a01u0a03u03cdu034du393eu3935u36b5u391bub99bu3612u3903u3911u0111u0303u4d03u4d39u3e39u3e1eu279eu111eu9120u3920u3939u0339u032eu302eub02cu282cu0bacu032cu0a01u0a03u03cdu03cdu39beu39b5u36b5u391bub99bu3612u3903u3910u020cu0483u03cdu03cdu3928u3928u0fa6u0fa6u3903u3903u2388u2388u1e03u19a4u37a4u321eu3219u3700u0c02u0804u8303ucd03ucd39u3b39u3b1bu341bub439u0339uae35u2e25ua825u1535u000eu010eu8303ucd03ucd39u2839u280fu1e0fu9e11u2611ua639u0339u8323u8c1fu8c1du0319u1801u1883u03cdu034du1e37u9eb7u204du204du392bu392bu1240u12c0u0f17u0f97u12a8u12a8u2223u27a3u2a28u2f28u3903u3903u2288u1d88u1a03u1516u0212u0483u1403u0e83u089au081au03cdu034dub93eu393eu1938u9931ub927u3927u9e07u9e87u2124u2124u3903u3987u2b07u3514u350au2b00"; private static final String song_data = "u0101u0101u0404u0404u0101u0101u0404u0404u0202u0202u0505u0505u0202u0202u0505u0505u0000u0303u0000u0404u0707u0303u0606u0000bu0808u0808u0202u0202u0808u0803u0808u0000u0000u0802u0000u0000u0000u0000u0000u0000u2000u0000u0000u0000u0000u0000u0000u0002u2828u6414u0000u0000u0000u0000u0000u0000u2800u0000u0000u0000u0000u0000u0000u2002u2828u6420u0000u0000u0000u0000u0000u0000u1401u0000u0000u0000u0000u0000u0000u0001u2828u7f7fu0000u0000u0000u0000u0000u0000u0a02u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0900u0000u0000u0000u0800u0000u0000u0000u0200u0000u0000u0000u0000u0000u0500u0000u0203u0203u1200u0002u0302u0002u0300u0000u0200u0300u1200u0002u0302u0002u0300u0000u1200u0000u0012ftu0000u0000u0007u0000u1200u0012u0000u0000u1500u0019u0000u0200u0200u0000u0000u0000u0003u0300u0000u0000u0500u0500u0000u0000u0003u0300u0000u0200u0000u1212u0000u0200u0013u0013u0000u0200u0000u1515u0000u0200u0000u1313u0000u0200u0012u2219u0000u0300u0013u0000u0000u0000u1500u1500u0000u0000u1213u0000u0000u0000u0900u0900u0000u0000u0800u0007u0000u0200u0012u0000u0000u0000u0000u0000u0000u1200u1200u0000u0012u1200u0000u0000u0000u1200u1200u0000u0012u1200u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000u0000"; }</=></=>