PDA

View Full Version : A simple, soon to be multi-player tetris clone.


JoshuaD
09-16-2007, 12:37 AM
Game v0.7.1 (http://67.83.11.160_3A81/Game_v0.7.1.zip)


As some of you may know, I've been working on a tetris clone. I hope emulate the configurability of lockjaw, and also have network based multi-player.


This version is a single player with most of the configuration framework in place. Most of the game is configurable via the menu items, but if you're feeling adventurous, the rule-sets are user-editable XML files, and have a further level of configuration available. Any setting is changeable for any level, so go at it. They're located in Game/gameRules/.


Please post any comments/advice/bugs/criticism here. Thanks. I hope you enjoy it!


-Josh

Caithness
09-16-2007, 05:18 AM
The Java version doesn't seem to work for me. I remember kotetsu213's java game wouldn't work on OSX because it was written for Java 1.6, and Mac OS is stuck on 1.5, but I didn't get the same error message, so I'm not sure that's the problem.

JoshuaD
09-16-2007, 05:44 AM
What error message did you get?


try this:

java -jar -Djava.library.path="lib" Game.jar


I intend to create a dmg wrapped jar just like I did for the .exe, I just don't have a mac, so I haven't gotten around to it.

Caithness
09-16-2007, 09:39 AM
The original error message was this:Sun Sep 16 00:36:49 EDT 2007 INFO:Initialising sounds..
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1682)
   at java.lang.Runtime.loadLibrary0(Runtime.java:822)
   at java.lang.System.loadLibrary(System.java:992)
   at org.lwjgl.Sys$1.run(Sys.java:75)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
   at org.lwjgl.Sys.loadLibrary(Sys.java:84)
   at org.lwjgl.Sys.<clinit>(Sys.java:101)
   at org.lwjgl.openal.AL.<clinit>(AL.java:59)
   at org.newdawn.slick.openal.SoundStore$1.run(SoundSto re.java:238)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.newdawn.slick.openal.SoundStore.init(SoundStor e.java:235)
   at org.newdawn.slick.Sound.<init>(Sound.java:54)
   at game.config.ConfigManager.loadSound(ConfigManager. java:229)
   at game.config.ConfigManager.loadAllSounds(ConfigMana ger.java:216)
   at game.config.ConfigManager.loadAllConfigsInternally (ConfigManager.java:62)
   at game.Game.main(Game.java:15)


Trying what you posted started the game, but none of the controls worked.

JoshuaD
09-16-2007, 09:55 AM
That seems to be a problem on Mac's, my friend encountered it as well.


A simple work around right now is to click inside the play box. Don't just focus the window, but actually click on the game itself.


I'll figure out a fix for that soon, I didn't discover it until a few people tried it on OSX.

caffeine
09-16-2007, 06:09 PM
sweet! i like it a lot so far.


a quick playtest showed:

CW and CCW are backwards.

SRSblocks show non SRS colors

hard drop is really firm drop. it just goes 20g and waits for lock delay to kick in. a hard drop should lock instantly.

the lock delay options aren't functional at all. should they be?


i don't have time to play more until later.


also, i would like to see heboris wall kicks for "flip" in SRS. that way it's still functional in 20g.

timc
09-16-2007, 09:06 PM
josh, this is really promising. could you add an additional ccw button (for tgm classic rotation at least) -- perhaps the rotation system selected should determine the possible buttons used. also, will you include game play (tap death) presets?

JoshuaD
09-17-2007, 01:40 AM
josh, this is really promising. could you add an additional ccw button (for tgm classic rotation at least) -- perhaps the rotation system selected should determine the possible buttons used. also, will you include game play (tap death) presets?


I'll look into making a second button for CCW. It's not a difficult thing to do, but it's difficult to make look nice in the GUI. Is it only the CCW button that people would want a second button for? If that's the case I can just add another entry to the key config. If it's potentially for every button, I'll probably modify it so every motion has both a primary and alternative button.


As far as the presets go, I've created a framework where it's easy for the user to create and then share different presets. The idea is like maps in Quake 3 or starcraft. Whoever hosts the game decides what rule-set to use, and everyone needs to adhere to that. The nice thing is that you don't necessarily need to enforce every rule. If you want to ban using the Flip you can, otherwise you can leave it up to the user. Ditto for any setting. So there's actually two settings files, the gameRules as defined by the xml file, and the user-preferences as defined by the preferences dialog.


Every setting is determined like this:

if( EnforceLockDelay ) useLockDelayInRules;
else useLockDelayInPreferences;


Take a look at the fullRulesSet.xml located in Game/rules/. That defines (almost) every setting possible to change.


The two most important ones are "framePerInc" and "increment". FramesPerInc is how many frames to wait between each increment. Increment is how many pixels to move per increment.


So, for example, if you wanted to do game-boy style tetris, you would set the increment to 16 (the height of the blocks) and then modify framesPerInc as the levels go higher. Every frame is 16.7MS (approximately) so if you wanted it to increment every second you would set the framesPerInc to 60.


20G would have an increment of 16*20, and an FPI of 1.


When I actually get the project up on a website I intend to write a better how-to.


The only restraint is this: If you're going to change a setting at a later level, you need to define it during the first level. So you couldn't use the user-prefrence for the lock delay, and then at a later level define it. The ruleset needs to either define it for the entire game, or not define it at all.


The idea is that friends can get together and make really funky rulesets to play on together, or you can decide not to enforce any rules and just battle it out on a completely uneven playing field.

JoshuaD
09-17-2007, 01:43 AM
sweet! i like it a lot so far.

a quick playtest showed:
CW and CCW are backwards.
SRSblocks show non SRS colors
hard drop is really firm drop. it just goes 20G and waits for lock delay to kick in. a hard drop should lock instantly.
the lock delay options aren't functional at all. should they be?

i don't have time to play more until later.

also, i would like to see heboris wall kicks for "flip" in SRS. that way it's still functional in 20G.


I'm not sure why CW and CCW are backwards in SRS, I'll fix it though.


SRSBlocks will show the wrong colors right now. All of that is choosable by the skin, which I haven't created a dialog for yet. If there's a big demand for it I'll allow the rules to enforce specific skins, but I figure it's better to just let the user decide.


I fixed the hard-drop and firm-drop problem.


All three of the delay options are working on my end. Try fiddling around with each of the delays, changing them from 0 to 1000. Do you see a difference?

caffeine
09-17-2007, 02:27 AM
what about floor kicks and infinity?

JoshuaD
09-17-2007, 03:48 AM
I'll be fixing that in the next release. It's a bit of a headache, so I just haven't gotten around to it yet.


Are the 3 delay timers working properly for you?

jujube
09-17-2007, 10:22 AM
great job, looks like you've made a lot of progress on it. looking forward to playing some multiplayer online. as caffeine mentioned, a true hard drop would be nice.


"Game v0.7.1"

have you come up with a name yet? what about Tetua http://www.tetrisconcept.net/forum/images/smilies/icon_razz.gif

mat
09-17-2007, 11:38 AM
how bout tettoo?

caffeine
09-17-2007, 06:47 PM
what about "super tetrafighter II turbo HD"?

PetitPrince
09-17-2007, 07:47 PM
I like accronyms:

TINT (TINT is not Tetris) YATTA ! (Yet Another Terrific Tetris Adaptation !)
I love the last one http://www.tetrisconcept.net/forum/images/smilies/icon_smile.gif .

tepples
09-17-2007, 08:21 PM
I like accronyms:
TINT (TINT is not Tetris)

How about TAKEN (http://oasis.frogfoot.net/code/tint/default.htm)?


Yatta isn't taken though, except perhaps by Super Yatta Bros. running on the Yatta Boy Advance (http://www.verylowsodium.com/fanimutation/exuberance).

JoshuaD
09-17-2007, 08:30 PM
I like accronyms:
TINT (TINT is not Tetris) YATTA ! (Yet Another Terrific Tetris Adaptation !)I love the last one http://www.tetrisconcept.net/forum/images/smilies/icon_smile.gif .


YATTA! (http://www.youtube.com/watch?v=u9rWFZesV8s)

caffeine
09-17-2007, 08:45 PM
Irrational Exuberance! (http://f0rked.com/core/flash/v=yatta%20%28economy%29)

JoshuaD
09-17-2007, 10:27 PM
Alright. I've fixed everything everyone brought up so far except Infinity (which is going to take a little time), the Mac focus problem, and Flip wall/floor kicks in SRS.


Can someone explain the need for the second CCW button to me? I don't mind implementing it; whatever the community wants is what I'll put in. I'm just not sure what purpose it serves, and whether I should count on putting a secondary button for every command or if it's just CCW that needs it.


Otherwise, thanks for the bugs and name suggestions. Keep 'em coming and support the ones you like! This project desperately needs a name.

kotetsu213
09-17-2007, 10:27 PM
Because TGM has it.

JoshuaD
09-17-2007, 10:28 PM
Because TGM has it.


So it's only the CCW button? None of the others have redundancies?

kotetsu213
09-17-2007, 10:31 PM
There are two CW buttons (and only one CCW) if TGM3 World is involved.

JoshuaD
09-17-2007, 10:41 PM
There are two CW buttons (and only one CCW) if TGM3 World is involved.


Alright. So would I be covering all the bases if I made alternative buttons for all three rotation keys? Or is there some demand for alternative keys for every action?


I'm glad to implement whichever, just let me know what's needed.

caffeine
09-17-2007, 10:58 PM
they like it cause when you need to rotate twice, you can just tap both cw, one after the other, real fast. can you add a modified guideline randomizer? guideline no OSZ start. could there be a button to start games so we don't need to use the mouse evar?


and oh wow, i can't believe i missed this. SRS starts all three-wide tetrominoes three from the left, not right. so in other words, you have them right-center instead of left-center.

mat
09-18-2007, 01:29 AM
the department of redundancy department requires every DRD-compliant game to have at least 2 CCW rotate buttons. (CCW and not CW because CCW has two 'C's.)


the DRD has a controlling interest in a number of popular arcade franchises and games in arcades, inluding and also not limited to dance dance revolution, the gundam series, street fighter, DDR, and other arcade games. beware.