PDA

View Full Version : Tetris-like game for NES


johnberhenry
04-22-2008, 05:50 AM
http://www.pineight.com/nes/#t


By tepples.


Yet another clone of the popular Russian block game. This one allows two players and has tighter play control than most Tetris® brand games. Version 0.30 introduces true lock delay, wall kick, and 4-state rotation.


Screenshot:

http://www.pineight.com/nes/tetramino.png

cdsboy
04-22-2008, 06:03 AM
I don't understand the purpose of this post.

johnberhenry
04-22-2008, 06:08 AM
Basically, you download a NES emulator such as Nintendulator, Nestopia (http://sourceforge.net/projects/nestopia/default.htm), or FCE Ultra; then you download the game and load it in the emulator.


EDIT: t.nes

muf
04-22-2008, 06:41 AM
I believe we already know about this.

johnberhenry
04-22-2008, 09:43 AM
tepples? (http://www.tetrisconcept.com/forum/viewtopic.php?t=887)

tepples
12-20-2008, 09:35 AM
No hold. No ghost. Therefore, my cousin doesn't find testing it with me enjoyable; he always wants to go back to the Wii and Tetris Party, or perhaps turn on my PS2 and play In the Groove or Amplitude or We ? Katamari. Heck, he actually likes the so-called steaming pile of tech demo (http://www.tetrisconcept.com/forum/viewtopic.php?p=8105#p8105) known as FantaVision.

No hold for two reasons: There aren't enough background colors. There are four palettes of three background colors and four palettes of three sprite colors. We already have one background palette for gray stuff (the fields and score displays), one for player 1's frame, and one for player 2's frame. The sprite palettes are already taken for player 1 and player 2's falling piece and next piece. This leaves exactly one palette of three colors for everything else. There aren't enough buttons on the NES controller. B and A are already taken for rotation, Start is taken for pause, and Select is quite a reach. Or should I map hold to B+A like I did in TOD for GBA and then just disable IRS from hold?
No ghost for two reasons: Video memory bandwidth on the NES is limited. The game already pushes the limit of that to fully update both players' fields at 30 fps after line clears. There can only be 8 sprites on a scanline before they start dropping out, which is why some NES games flickered like hell. Each sprite is 8x8 pixels, the size of one block. Imagine what would happen if player 1 and player 2 are trying to lay I pieces at the same height. I already had to make changes to the previews to get them to flicker less when the falling piece overlapped them in 2-player mode.
And there's a third, mysterious problem: flicker in the next piece that only shows up when I run it on an NES, not even the most accurate emulators. It also only shows up if pieces are falling, not landed.

But then the average person on nesdev.com thinks floor kick is a bug (http://nesdev.parodius.com/bbs/viewtopic.php?p=40786#40786).


(My other cousin only likes Bombliss and Puzzle League, not Tetris.)

muf
12-20-2008, 12:55 PM
But then the average person on nesdev.com thinks floor kick is a bug (http://nesdev.parodius.com/bbs/viewtopic.php?p=40786#40786).
From what I can tell, he's describing not just the floorkick, but infinite spin as being a bug, and I agree.

jujube
12-20-2008, 10:57 PM
it seems like the existence of infinite spin in some games was intentional. it exists in TDS marathon but not in TDS multiplayer.

muf
12-21-2008, 12:39 AM
it seems like the existence of infinite spin in some games was intentional. it exists in TDS marathon but not in TDS multiplayer.
Ah, so they noticed the bug in multiplayer but forgot to fix it in marathon http://www.tetrisconcept.net/forum/images/smilies/icon_exclaim.gif

Kitaru
12-21-2008, 12:55 AM
it seems like the existence of infinite spin in some games was intentional. it exists in TDS marathon but not in TDS multiplayer.
Ah, so they noticed the bug in multiplayer but forgot to fix it in marathon :awe:
That's exceedingly silly, muf. :p

caffeine
12-21-2008, 02:43 AM
Muf just forgot there's no time element in TDS marathon. In pentominoes, being able to move a piece here and there indefinitely is not a bug. =]

Zaphod77
12-21-2008, 04:25 AM
but i DID find a real bug.

BUG: after a hard drop, you can still rotate or move for a very small amount of time. Hard drop shoudl lock instantly, and it doesn't.

jujube
12-21-2008, 04:33 AM
but i DID find a real bug.

BUG: after a hard drop, you can still rotate or move for a very small amount of time. Hard drop shoudl lock instantly, and it doesn't.
interesting. is there manual locking of any kind?

Zaphod77
12-21-2008, 09:40 AM
it's clearly INTENDED to lock. but for maybe 1/8th of a second or so, you can still do stuff with it.

tepples
12-21-2008, 04:37 PM
BUG: after a hard drop, you can still rotate or move for a very small amount of time. Hard drop shoudl lock instantly, and it doesn't.
It's a firm drop with reduced lock delay. It's supposed to be a compromise between firm drop and hard drop, allowing quick Zangi-moves without slowing the player down too much (The New Tetris) or requiring Up-Down presses that are difficult with the controller packed in with the NES console (TGM, TAP, Ti Classic). If the behavior is too annoying, I can change it.

is there manual locking of any kind?
Down or Up when a piece has already landed will lock it, as in TDS and Lockjaw.

Zaphod77
12-21-2008, 08:48 PM
Oh. so it's intentional.

Well it caused quite a few misdrops until i figured out what was going on.

Anyway, i understand what you are getting at. Perhaps if I actually had a power pack to play it on a real nes with...

jujube
12-22-2008, 01:06 AM
It's a firm drop with reduced lock delay. It's supposed to be a compromise between firm drop and hard drop, allowing quick Zangi-moves without slowing the player down too much (The New Tetris) or requiring Up-Down presses that are difficult with the controller packed in with the NES console (TGM, TAP, Ti Classic). If the behavior is too annoying, I can change it.
it still sounds faster than soft-drop-only, as seen in NES tetris and most older games.

tepples
12-22-2008, 08:08 AM
Uploaded Tetramino 0.32 (http://www.pineight.com/nes/#t)

important changes: IRS if you hold B or A during line clear. Blocks of the falling piece that are entirely above the field aren't drawn, to reduce sprite dropout in the preview. Falling piece is drawn behind the background and preview. Together with the previous change, this should fully eliminate dropout glitches, though it increases flicker on the PowerPak. Plays the "thud" after line clears only once for each run of consecutive cleared lines. A 4-line clear gives one thud (not four), and only a hurdle clear gives two. New combo-based scoring system for line clears: 100 * lines * lines so far with consecutive pieces Rotation system allows only one floor kick per piece. Infinite spin is no longer possible.
Here are some twists that I've found useful in the TOD M4 rotation system:
|           |    |           |
|    #  ####|    |    #  ####|
|##### T ###| => |#####  T###|
|#####TTT###|    |##### TT###|
|####### ###|    |#######T###|

|           |    |           |
|######LL###| => |######  ###|
|###### L  #|    |###### LLL#|
|#######L###|    |#######L###|

|           |    |           |
|#######    |    |#######    |
|######     | => |######LL   |
|#######LLL |    |#######L   |
|#######L###|    |#######L###|

I wait to see how you can exploit this scoring system. (Hint: try double-tetris combos.)

tepples
12-30-2008, 12:41 AM
Tetramino 0.33 is on my NES page (http://www.pineight.com/nes/default.htm) now.
Works around a defect in the NES PPU's memory controller that was causing flicker. Thanks to blargg for characterizing this newly discovered quirk of the NES hardware. Sped up background map decompression by about 3 cycles per compressed byte (thanks blargg). Corrected shape of red piece in how to play and mentioned what Up on the Control Pad does. Randomizer doesn't make the same piece twice in a row. Processes rotation before sideways movement, not after. Draws a faded "ghost" piece where the falling piece would land if allowed to drop, to help the player line up the piece. New sound effects system similar to that of Lockjaw for DS. Speed curve approximates "Exponential" from Lockjaw, all the way up to 20G. Now play after 200 lines is a challenge again. Build uses fewer loose files; more of them are in folders (http://www.youtube.com/watch?v=2d0wsR47Zcw). Forgive me for not working on Lockjaw more, but when I bought a PowerPak, I suddenly felt a lot more motivated to code for the NES than I was when emulators were my only way of testing.

rednefed
12-30-2008, 01:55 AM
The "no duplicate pieces" thing made the game a lot easier.
I think the t.pal file is corrupt; NESten complained about it, and FCEUX gave the game some very... interesting colors upon using it. Or, am I not supposed to use that pallete for Tetramino?

tepples
12-30-2008, 09:16 AM
The "no duplicate pieces" thing made the game a lot easier.
Arika deserves half the credit; the new randomizer behaves very close to TGM's.

I think the t.pal file is corrupt; NESten complained about it, and FCEUX gave the game some very... interesting colors upon using it. Or, am I not supposed to use that pallete for Tetramino?
It's a palette for editing the screen layouts using NSA or 8name, not a palette for displaying the game itself. Tetramino uses the standard NTSC NES palette.

Pineapple
12-30-2008, 12:51 PM
Randomizer doesn't make the same piece twice in a row.
After a brief look at the code (randomizer.s), it appears that the "possession arrow" randomizer of previous versions has been dropped completely, in favour of a "strict history" randomizer. This only ever needs to generate a random number between 0 and 3, meaning that you no longer have any extra states in an n-bit random number.

tepples
02-06-2009, 08:00 PM
I'm trying to polish this for a 1.0 release, as I explained on nesdev.com/bbs (http://nesdev.parodius.com/bbs/viewtopic.php?t=4754). I've just added "Animated instruction/attract screen", so the next thing is some sort of music. The NES has only four tone generators (two square, one triangle, one noise) that have to serve for both music and sound effects. Most games use them all for music and then just disable a music channel when they want to play a sound effect, but with two players going >= 80 tpm, it might be hard for the music not to get completely covered by sound effects. What kind of music do you think would work in such a case?

Oh, and I'm thinking about replacing the current hard drop behavior (firm drop with reduced lock delay) with Guideline-style hard drop to be less confusing, with IRS applying only after line clears due to the lack of ARE. Would this cause severe tetlag for any of you?

Kasumi
02-07-2009, 12:34 AM
Which channels are used for the sound effects?

1. Unless you're using both squares, I see no reason why you couldn't design a song that does not use the channels you use for sound effects.

2. If both squares are being used, I'd make a song with a good triangle triangle and noise backbeat that's more memorable than whatever the squares are doing if they're going to constantly be muted. Use the parts that are least likely to be muted to set the pace for the competition. I don't think you need to worry so much about something catchy and memorable for two player mode. Just something that will get the blood pumping that doesn't have a short enough loop to be annoying.

(After writing all that I looked through the source): It looks like both squares and the noise channel are being used, though I don't know so much about the APU. I'd try to change how you handle sound effects, since at least one square would be a very, very good thing if you want music. How different does the game sound when you don't pass sound effects to the square channel that has a shorter length left to play and just pass all sound effects to one channel? Instead of checking the remaining lengths on both channels could you compare the remaining length on the one channel to the length of the sound effect about to play, and the let the longer length of these two choices be played? It already seems like the sound effect lengths you've got would work well with this. The shift sound would get overwritten by turn, turn by land, etc. and you'd only be using one square channel. The most important one would always seems to win. If you don't want to change your sound effects engine, 2. might still work. I'd check myself how all this sounds myself, but I'm a pesky nesasm user.

Regarding the current hard drop behavior, I'd definitely get rid the firm drop with reduced lock delay if only because it hurts me a lot more often than it helps me. My ideal case would be a hard drop with slight ARE for IRS since I like IRS, but a hard drop without ARE would suit me just as well. The firm drop thing just kills me in fast speeds that aren't 20G.

Also something I just noticed which may or may not be intentional: You can't pause during line clear delay.

tepples
02-07-2009, 02:27 AM
How different does the game sound when you don't pass sound effects to the square channel that has a shorter length left to play and just pass all sound effects to one channel? Instead of checking the remaining lengths on both channels could you compare the remaining length on the one channel to the length of the sound effect about to play, and the let the longer length of these two choices be played?
I put in a compile-time option to reduce the square allocation pool from two channels to one. With only one player, it sounded OK until I tried turning off firm drop. Then I heard that line clear overrides land, and I could hear only a tiny bit of land when I cleared a line with a hard drop. I haven't had a chance to try it with two players, but I can imagine it'd be a mess, much like pre-0.33 when almost all sound effects for both players were played on the noise channel.

Also something I just noticed which may or may not be intentional: You can't pause during line clear delay.
Thanks for finding it. The old behavior was that only a player with an active piece could pause; the new behavior in 0.35 is that if either player has an active field, either player can pause.

tepples
02-07-2009, 03:13 PM
Bump for the release of Tetramino 0.35 (http://www.pineight.com/nes/#t)

0.35 (2009-02-07)
Replaced static how to play screen with an animated tutorial. More detailed comments in pads.s (requested by Fx3). The manual, which used to be GFDL, has been relicensed under zlib's license. This cut a lot of license text from the zipfile. Renamed the palette files to clarify that they're for nametable editors, not emulators (requested by rednefed). Hard drop locks immediately, as in Tetris DS and Tetris Party. No more "zangi-moves" or "jiznickery" as in The New Tetris or TGM series. Pausing works whenever either player's field is active, not just while the player pressing Start has an active piece (requested by Kasumi). Can disable dynamic channel reallocation at compile time, which makes the landing sound nearly inaudible when clearing a line but might help with adding music (requested by Kasumi). Replaced missing mktables.c (0.33 regression; reported by Memblers). Intro screens advance by themselves after a few seconds.
Known defect: Start to exit the tutorial doesn't work as expected http://www.tetrisconcept.net/forum/images/smilies/icon_redface.gif This will be fixed in the next version.

tepples
04-13-2009, 05:00 AM
In case you haven't been following updates on my web site, 0.37 is out now.

0.37 (2009-04-12)
sound: Plays music on those channels that sound effects aren't using. sound: Sound effects are louder to be heard over the music. Line clearing code updated to match solidity change. Extends the status bar into the top row of the playfield to show how many lines are cleared in the current combo. More gray levels for locked pieces. Can hide ghost piece for both players by pressing B+Left at the title screen (requested by eleventhirtyfour, who wanted to stay on 0.32 because ghost gave him a headache). More direct trademark disclaimer on the copyright screen.
0.36 (2009-03-07)
Collision takes advantage of 0.34's change to solidity. Spiffy new logo. attract: Interrupting doesn't freeze (0.35 regression; reported by Fx3). attract: Doesn't erase player 2's last score. sound: Sound effects can run slower than 1 frame per opcode, saving space. sound: Some minor fixes to (unused) triangle wave channel. Estimated music code+data budget: 5 KiB currently free without having to resort to NROM-256.

Ray Ayanami
04-13-2009, 11:24 AM
Just played a few rounds of 0.37.

It's pretty good, I like the step reset, initial rotation (though a little ARE would make it work better), and the scoring that encourages combos but doesn't shove them down your throat like Ti's Easy / Heboris's Tamaya.

I'm still getting used to TOD Rotation though, and the DAS feels a little too fast for my liking.

Now if only I had the skills or tools to put the ROM on an NES cart; it would be the definitive 8-bit tetromino game.

tepples
04-18-2009, 03:38 PM
Look at what Dwedit and Drag helped me figure out on the NESdev board: orange-green-blue dithering.
http://pinocchio.jk0.org/lj/3_color_Nestopia.png
Does it look any better than grayscale?

Xkeeper
04-18-2009, 04:13 PM
Now if only I had the skills or tools to put the ROM on an NES cart; it would be the definitive 8-bit tetromino game.
Get a PowerPak; that's about as simple as it gets (but it'll cost you $130)

lee n
04-18-2009, 11:18 PM
Look at what Dwedit and Drag helped me figure out on the NESdev board: orange-green-blue dithering.
http://pinocchio.jk0.org/lj/3_color_Nestopia.png
Does it look any better than grayscale?
Why not give us a direct feed screenshot instead of a video capture with composite creep? I understand the principle behind dithering, I just wanna see it without any artifacts.

Zaphod77
04-19-2009, 12:00 AM
He probably wanted to show how it would really look on a television set.

most likely it owuld look worse on an emulator.

tepples
04-23-2009, 01:40 AM
He probably wanted to show how it would really look on a television set.

most likely it owuld look worse on an emulator.
Close; that's actually Nestopia. And the "0.37" at the top is wrong; it's actually Tetramino 0.38 (http://www.pineight.com/nes/#t).

0.38 (2009-04-22) Draws blocks in the well in color using dithered combinations of blue, orange, and green (requested by Dwedit; based on palette mock-up by Drag). Changes the attribute (color scheme) inside the well to color at game start and to gray at game over. Adds a short delay (up to 1/4 second) before pieces come out starting after 1G (requested by Xkeeper). Start pauses music too. Player can turn off music (requested by Yaz). Player can place pieces partly out of bounds, in three hidden rows at the top of the well called the "vanish zone", without topping out. Instead, the player loses when a piece spawns overlapping a block inside the vanish zone or when a piece locks entirely in the vanish zone. Clearing a line brings blocks out of the vanish zone (requested by Xkeeper).

muf
04-23-2009, 02:00 AM
Close; that's actually Nestopia.
Then there's no good reason to be using a composite capture; the colours from an emulator's RGB palette converted to a composite YUV signal and back to RGB with a capture card are bound to be different from that of a real NES which has a hardcoded YUV palette in the PPU which handles composite output. Either use an emulator screenshot (and save us the eye cancer) or use a capture from a real NES.

tepples
04-23-2009, 02:06 AM
But it is an emulator screenshot, with the NTSC filter (http://slack.net/~ant/libs/ntsc.html) turned on.

muf
04-23-2009, 02:13 AM
But it is an emulator screenshot. Nestopia's "NTSC filter" is emulating the NES and the capture card.
http://img98.imageshack.us/img98/681/notagainpicard2.jpg

tepples
04-23-2009, 02:32 AM
I've shown you the emulator screenshot, so here's the capture from the NES (http://pinocchio.jk0.org/lj/3_color_real_thing.jpg).

Oh, you meant a digital video capture card. A lot of those don't handle 240p signals[1] well.

[1] "240p" is what you get when the 8-bit, 16-bit, or 32-bit console outputs all even fields or all odd fields in order to trick SDTVs into not interlacing.

muf
04-23-2009, 02:45 AM
I've shown you the emulator screenshot, so here's the capture from the NES (http://pinocchio.jk0.org/lj/3_color_real_thing.jpg).
Much better. Now might I suggest instead of using blue and pink for the T piece, using blue and red, which would enable you to change the Z piece from orange and black to solid red (just like the J piece is solid blue). I think that would look a lot better.

tepples
04-23-2009, 04:59 AM
If I made red one of the three primaries, then I'd have to mix red and green somehow to get both yellow (O) and orange (L). Should I try it for poops and grins?

lgb
04-24-2009, 05:11 PM
Maybe make it a code, like those alternate colors in fighting games.

Requesting an option to disable music playback. Personally, I find such an option to be "front page material", but it's your call. I say this because such an option is selected before you start a game in nearly all other NES falling block games.

tepples
04-24-2009, 05:35 PM
Maybe make it a code, like those alternate colors in fighting games.
The NES PPU has a backdrop color and eight 3-color palettes, four for background tiles and four for sprites. Currently, they're used as follows: BG0: Grayscale, for the status bar at the top and for menus in the playfield areas BG1: Player 1's border BG2: Player 2's border BG3: Blocks in field OBJ0: Player 1's falling piece and ghost OBJ1: Player 2's falling piece and ghost OBJ2: Player 1's next piece OBJ3: Player 2's next piece
Fighting games usually run on hardware significantly more powerful than the NES, one with more palettes (except maybe the Genesis), a lot more colors per palette, and a larger addressable memory for sprite textures. For each different palette, I have to include a corresponding set of 8 tiles in the CHR ROM, one for each of seven colors and one for garbage. That's why it'd be hard to make a code even for going back to grayscale blocks. And it would probably be impossible to give the two players different palettes unless either one of them is the grayscale set or I abandon separate palettes for the players' borders. But that doesn't affect my plan to implement Ti-ARS because the way I plan to implement Sega colors just reshuffles some indices before things get drawn.

Requesting an option to disable music playback.
0.38 (2009-04-22)
Player can turn off music (requested by Yaz).

lgb
04-24-2009, 07:43 PM
I keep forgetting about NES limitations.

Ah, missed that. I had just downloaded 0.37.

Ray Ayanami
04-24-2009, 08:49 PM
If you're going to have colored locked pieces, I suggest making the ghost piece more distinct, like say, making it an LJ-style outline or monochrome. It gets a little confusing having colored locked pieces and colored ghost piece.

tepples
04-26-2009, 02:39 AM
If you're going to have colored locked pieces, I suggest making the ghost piece more distinct, like say, making it an LJ-style outline or monochrome.
I can't do monochrome because I'm out of palettes, but the "outline" style looks like pretty good in Nestopia (and the same on my NES):
http://pinocchio.jk0.org/lj/tetramino_in_the_ars.png
Take a wild guess what other feature I'm getting ready for 0.39.

Kasumi
04-26-2009, 06:23 AM
Is it ARS? HURRAY! I love this game Tepples. I really do.

muf
04-26-2009, 06:54 AM
Take a wild guess what other feature I'm getting ready for 0.39.
Hey, finally the pieces are the right colour!

tepples
04-28-2009, 02:20 AM
It's fitting that ARS keeps JLSTZ touching the bottom of their bounding box, and ARS is also the first three letters of a word that means bottom (http://en.wikipedia.org/wiki/Arse). That said, Tetramino 0.39 is out (http://www.pineight.com/nes/#t).

0.39 (2009-04-27)
Moved rotation system code to a separate file. Added a menu item to switch between "CENTER" (the current rotation system) and "BOTTOM" (Ti-ARS) (requested by gs68, Xkeeper, Kasumi, and others). Made the ghost piece an outline, so that the dithering used for a locked Z piece doesn't get confused with the dithering used for the ghost (requested by gs68). Draws the falling piece in white for one frame after lockdown. Cosmetic fix: Blocks from the vanish zone no longer cover up the word "LINES" after a player receives garbage (0.38 regression). Music engine and menu support more than one song. Added song "Leck mich im Arsch (http://en.wikipedia.org/wiki/Leck_mich_im_Arsch)" by Wolfgang Mozart (catalogue no. K.231). Now roughly 3.4 KiB of empty space remains in PRG.

muf
04-28-2009, 02:52 AM
Wow, this is actually quite playable! I wish TOD would play like this, I've been playing that on my DS and the FRS (Frankenstein Rotation System) along with the weird ass lockdown behaviour is throwing me off. Yes, you may consider that an official feature request for TOD.

Ray Ayanami
04-28-2009, 06:04 AM
Awesome update, Tepples! Thanks!

(though I kinda wish nesDS had a way to map [NES]Up to [DS]L since firm-dropping on a D-pad is kinda arse.)

rednefed
04-28-2009, 09:38 PM
Yeah, ARS in Tetramino made it very fun, but also as you noted nearly indefnitely sustainable.
Edit: A couple of 20G gotchas: firstly, there seems to be an initial shift of sorts, and secondly, though this is not TGM, synchros are hit or miss.

TWF
04-29-2009, 05:24 AM
Yeah, ARS in Tetramino made it very fun, but also as you noted nearly indefnitely sustainable.
Edit: A couple of 20G gotchas: firstly, there seems to be an initial shift of sorts, and secondly, though this is not TGM, synchros are hit or miss.
Synchros should be fixable by changing the order of logic processing, should they not?

Also, tepples, this is really pretty nice. I'm impressed that you've implemented a nearly correct ARS to an NES game.

hiroshi
05-06-2009, 02:08 AM
I enjoy the single player game, but the multiplayer is not very fun/competitive. There's no line sending going on. Do you have plans for any of that?
Also, the music gets annoying fast (I do realize you can turn it off). Other than that, it's one of the most solid homebrews I've seen. I look forward to your updates!

Ray Ayanami
05-06-2009, 02:34 AM
I enjoy the single player game, but the multiplayer is not very fun/competitive. There's no line sending going on. Do you have plans for any of that?
Turn the "GARBAGE" feature on.

tepples
05-06-2009, 06:11 AM
The description of garbage was missing from the manual. It will be fixed in 0.40.

"But why does GARBAGE OFF even exist?"
Tengen's Tet?is had it. Tengen's Klax for NES had it. Tetris Attack had it in time trial mode. The New Tetris had it in 40 lines and 150 points modes. Both Carbon Engine games for PC (freepuzzlearena Tetanus and TOD) had it. This game was originally developed in 2003, at the tail end of the Carbon Engine era.
Yeah, ARS in Tetramino made it very fun, but also as you noted nearly indefnitely sustainable.
Edit: A couple of 20G gotchas: firstly, there seems to be an initial shift of sorts
How critical is it that the initial frame behave just like TGM's?
In TGM, the initial frame has no shifting. In TGM, wall kick is not applied in the initial frame. In TGM, you can IRS out of top out. This means collision detection isn't applied until the end of the initial frame.
and secondly, though this is not TGM, synchros are hit or miss.
The issue here is that currently, all rotations and all shifts check for transitions from landed to falling. I've changed 0.40 to check after rotation and shifting before gravity if piece_was_moved is true, at the same time the ghost piece gets moved.

hiroshi
05-07-2009, 05:23 PM
I tried out the multiplayer and ran into a lot of glitches.

First, there were pieces landing above the left player's play area:
http://yfrog.com/0d0001myvp
This happened in a couple of games.

Then the right player in an earlier game attempted an L spin (or t-spin? I don't know the terminology well) through an area two bricks wide... at the bottom was something that looked like it could be spun into. It might not have been possible to spin into it, but spinning early caused the piece to move halfway between the bricks and continue falling (now the L piece was three bricks wide, falling through an area 2 bricks wide!). This was with bottom rotation with everything we played, version .40

Also, the game seems to forget what speed you had it on last if you have a Game Over, then it forgets the rotation setting if it cycles back into the demonstration/title screen.

Starting new games after a player dies was a bit awkward, because there are no strict vs rounds... it's like the old arcade tetris (atari? tengen?), which IMHO wasn't fun for competing. I think it would make more sense if you had a main title screen that had three choices: 1 player, 2 player, option. Then in options you could choose for Vs. mode rounds or continuous play, along with rotation system, garbage, speed, etc.

And one last thing... is it possible you could have the option to start 20g at a slower rate? http://www.tetrisconcept.net/forum/images/smilies/icon_redface.gif

tepples
05-07-2009, 06:11 PM
I guess the change to synchro behavior introduced even more bugs, some of them caused by trying to push out releases faster than the 2-week cycle.

First, there were pieces landing above the left player's play area:
http://yfrog.com/0d0001myvp
This happened in a couple of games.
Possibly a vanish zone bug. Can you give me a reliable technique to reproduce this?

Then the right player in an earlier game attempted an L spin (or t-spin? I don't know the terminology well) through an area two bricks wide... at the bottom was something that looked like it could be spun into.
Only the bottom pixel of each block in the falling piece is checked for collision. This means that the top of each block in the falling piece can slightly overlap the bottom of a block in the well. This behavior is on purpose and matches that of Super Puzzle Fighter II.

It might not have been possible to spin into it, but spinning early caused the piece to move halfway between the bricks and continue falling (now the L piece was three bricks wide, falling through an area 2 bricks wide!). This was with bottom rotation with everything we played, version .40
Can you show a diagram of what you're talking about?

Also, the game seems to forget what speed you had it on last if you have a Game Over
Erred on the side of safety, so that if you accidentally choose a setting that's much too fast for you, you don't feel cheated the next time you start a game. Or worse yet, if someone else walks up to the machine and starts a game, he doesn't feel cheated.

then it forgets the rotation setting if it cycles back into the demonstration/title screen.
Attract mode needs CENTER and SLOW on player 2. Did you mean save player 2's options before entering attract mode and restore them afterward?

And one last thing... is it possible you could have the option to start 20g at a slower rate? http://www.tetrisconcept.net/forum/images/smilies/icon_redface.gif
Do you mean like the difference between Master with 20G code and Death?

hiroshi
05-07-2009, 06:38 PM
Possibly a vanish zone bug. Can you give me a reliable technique to reproduce this?
Unfortunately, I couldn't get the person to explain what they did.
Only the bottom pixel of each block in the falling piece is checked for collision. This means that the top of each block in the falling piece can slightly overlap the bottom of a block in the well. This behavior is on purpose and matches that of Super Puzzle Fighter II. Can you show a diagram of what you're talking about?
Sure, here's an MSPaint of what happened:
http://img140.imageshack.us/img140/3650/tglitch.png
As you can see, it wasn't the brightest move in the world... but I'm pretty sure that behaviour isn't supposed to happen, as it was pretty glitchy falling down. I think I tried to rotate again, and it kinda stopped midair. But, I was able to get the piece to fit perfectly when it landed http://www.tetrisconcept.net/forum/images/smilies/icon_razz.gif
Erred on the side of safety, so that if you accidentally choose a setting that's much too fast for you, you don't feel cheated the next time you start a game. Or worse yet, if someone else walks up to the machine and starts a game, he doesn't feel cheated.
Makes sense.
Attract mode needs CENTER and SLOW on player 2. Did you mean save player 2's options before entering attract mode and restore them afterward?
I think it happens for both players. But yeah, that's what I meant.
Do you mean like the difference between Master with 20G code and Death?
Well, what I'm asking for isn't really canon with any TGM game... A Master-like mode with 20g would be nice (I assumed the normal game would reach 20g, but I guess not), but I was thinking more on the lines for someone who sucks at Death mode, have the pieces fall (er, appear?) slower as a "training" mode. I'm mainly excited that there's now an NES tetris with 20g, so I should be thankful it exists at all http://www.tetrisconcept.net/forum/images/smilies/icon_smile.gif I just need practice.

tepples
05-08-2009, 12:08 AM
I've confirmed that BOTTOM is broken on player 2's side.

Kasumi
05-08-2009, 02:24 AM
Huh. I just posted something similar to this on nesdev. I should have checked here first. Good to know it's not just me though.

Edit: Hiroshi: The normal game does reach 20G eventually.

tepples
05-09-2009, 11:53 PM
Tetramino is dead...



...long live LJ65.

I've analyzed the problem a bit more. As far as I can tell, here's what happens in 0.39-0.40:
Player 2's field uses the lockdown rule corresponding to the rotation system chosen by player 2, but it uses the rotation rule corresponding to the rotation system chosen by player 1. If player 2 is using BOTTOM rotation, the "unrotate" step at the end of JLSTZ kick processing restores the previous orientation to player 1, not player 2, even though it correctly restores the previous height to player 2. I can see how this might cause both errors that the reporter saw. This is one of the perils of working on a CPU architecture (MOS Technology 6502) that strongly prefers structure-of-arrays over the array-of-structures that Carbon Engine and Lockjaw Engine use. (What's the difference? See this page (http://hectorgon.blogspot.com/2006/08/array-of-structures-vs-structure-of.html) and this page (http://en.wikipedia.org/wiki/Stream_processing).) I've added rules to the corresponding records topic (http://www.tetrisconcept.com/forum/viewtopic.php?t=1312) to clarify how I will handle affected scores.

tepples
06-03-2009, 01:55 AM
And as of right now, LJ65 0.41 (http://www.pineight.com/nes/#t) is out with a couple bug fixes for you to bang on.

0.41 (2009-06-02)
Renamed to LJ65 so that it can have its own domain. Reviewed which files to put under a permissive license and which to make GPLv3. BOTTOM isn't broken for player 2 anymore (reported by Kasumi). Scores ending in 00 aren't displayed as ending in 09. Hard drop gives one additional point so that it isn't weaker than soft drop (requested by Kasumi). Fixed strange interactions between one player's shifting and the other player's rotation, caused by sound code trashing X register (0.40 regression; reported by Matthew).

Kasumi
06-03-2009, 09:09 AM
I actually meant to report these "bugs" on the last version but forgot... sorry. They're mostly ignorable ones anyway.

If player one ( this happens with either player, but for the sake of example, I'm using player one) is holding left or right on the Music or garbage option and the autorepeat has kicked in, if player two presses A+B to make the options appear, part of the game over screen remains drawn to the screen until player one lets go of left or right.

Having player one (once again for the sake of example, though it works with either player) hold left or right also delays the game over screen from appearing if player two has topped out until the first player has let go of the button. While this certainly seems like intentional behavior, I find it unusual that letting go of the button for a single frame (tested on Nintendulator) and then immediately holding it again allows the game over screen to appear without any strange side effects. (That I could see)

I really need to look through this game's source again. I have guesses about why these might occur, and would like to see if I'm right.

As well, I don't have a good way to mess around with two player bottom rotation at the moment, but I am VERY happy that you fixed it.

jujube
06-03-2009, 11:41 AM
i wonder if anyone has played this on a cell phone. if your phone runs Java apps you can try NesCube (http://java-phones.com/games/nescube-22-nes-emulator-for-java-phones) or vNes (http://www.vampent.com/vnes.htm). if you can get the emulator to run smoothly, this would be one of your better mobile tetris options. my phone only runs BREW (http://brew.qualcomm.com/brew/en/default.htm), which means no homebrew.

tepples
06-03-2009, 03:21 PM
If player one ( this happens with either player, but for the sake of example, I'm using player one) is holding left or right on the Music or garbage option and the autorepeat has kicked in, if player two presses A+B to make the options appear, part of the game over screen remains drawn to the screen until player one lets go of left or right.
What you're seeing is a limitation on the NTSC NES's video memory bandwidth. Even with my unrolled loop, there's only enough bandwidth to the PPU to draw 22 rows to the screen each frame, and each playfield is 20 rows tall. (The authentic Tetris game for NES, on the other hand, manages to draw about 4 rows each frame, which is enough for everything but falling after line clears.) When DAS was 30 Hz, this wasn't a problem: either you'd get one player's field updating each frame and the other updating the next frame, or you'd get both bottom halves updating and then both top halves updating.

Having player one (once again for the sake of example, though it works with either player) hold left or right also delays the game over screen from appearing if player two has topped out until the first player has let go of the button.
That's similar: it only updates the playfield's color scheme (blue-orange-green vs. grayscale) on a frame when there aren't any rows to update.

But is this any worse than the glitches on the far right side of the screen in Super Mario Bros. 3?

Kasumi
06-03-2009, 11:31 PM
No, it's not any worse than the wrong paletted metatiles to the right of SMB3 which is why I put bugs in quotation marks. I simply found how those cases were handled interesting and I figured I'd report them to be on the side of safety. I also learned some things since updating many rows of tiles to the nametable is something I'm not too familiar with. In the future I suppose I'll try only report things that truly affect the end user's experience.

tepples
06-04-2009, 12:18 AM
In the future I suppose I'll try only report things that truly affect the end user's experience.
It's fine; I'll just put it as a release note. Manual bugs are bugs too http://www.tetrisconcept.net/forum/images/smilies/icon_razz.gif