Possibly a better way to implement that is as follows: Scale the vaiable that defines the height of the falling block so that one cell is 256 in this variable, and orient it so that the number decreases when the block falls. Then each frame, decrement it by the current amount. Then, if you are using smooth gravity, then the value of this determines where the bottom edge of the falling piece is. If you're not using smooth gravity, then remove the lower 8 bits of the height (bit roll if Java supports it, otherwise divide by 256) and that gives you the height to draw the block at. Collision detection is done at the non-smooth position.
In other words, fixed point. That's what I explained in PMs. Lockjaw and Super Puzzle Fighter II round the Y coordinate down for collision detection. But TGM seems to round it up.
Lol. I still have an incomplete Puzzle Fighter II clone floating around here. I had started working on that about 6 years ago, before I came to Tetris. Nothing like writing a game rendering engine in Swing, baby. In my deepest dreams, one day after I complete tetris I will combine the two code bases and make Puzzle Fighter an option within Jester. Ha! It still works. Download (Incomplete) Puzzle Fighter Here. You can edit the Puzzlefighter.ini to make it so two players can play. There are no animations and it looks like it's a little buggy in refreshing the display when blocks combine, but nothing serious. You could probably play 2 players on the same computer if you edit the ini for key config.
Alright, a few random questions about TGM2 that aren't covered in the Wiki: How long does the Credit Roll last in Normal Mode? How long does the M-Roll last in Master Mode? Are both soft drop and firm drop enabled? Or just firm drop? Is there documentation anywhere of TGM2's Master and Normal Mode's grading systems? And one more, how much do you guys care about the items in Normal mode? Should I make that a higher priority than network based multi-player? It'll take a few hours of code reworking to fit items in, and I just don't really think it's worth the effort at this point. But if it's something that's actually important to people, I'll get it done now before moving on to TGM2+.
1. Doesn't matter, the player can speed it up himself just by holding start. 2. 1 minute, approx. 3. Both. 4. Normal doesn't have grading, and Master Mode's grading is on the wiki.
hrmm. I don't see it. The Wiki Entry for TGM2 doesn't have any grading listed. Does it use the same grading system as TAP? That's the only grading system I see associated with TGM2. edit: Also, I'm assuming gravity and all of the delays in the M-Roll are the same as in Level 900-999, is this right?
TGM2 has different M-roll conditions, but it uses the same grading. Personally, I would just implement all features as they are in TAP.
How does the Decay Rate work? For example, if the decay rate is 80 and the player just didn't clear a line, which happens? internalGradePoints = internalGradePoints * (decayRate/100.0) internalGradePoints = internalGradePoints - decayRate; The wiki isn't too clear on this point. I've got TGM2 - Normal and Master and TAP - Death implemented now. I just need to do the grading systems and I'll put up a version for you guys to test out.
Every decayRate frames of active time, the grade points decrement by 1, to a minimum of 0. ARE and line clear time does not count towards this, and neither does active time aftedr line clears.
For each frame that the player has control of a tetromino and doesn't have a combo going, a counter increases by one. When the counter reaches whatever the decay rate is set to, the counter is reset and the player's grade points decrease by one.
But mushroom wrote, "For each frame that the player has control of a tetromino and doesn't have a combo going, a counter increases by one."
You increase the number of grade points by clearing lines. For example, if you get a tetris, you might gain 60 points, and then it takes 1 point away for every 40 active frames.