tetr.js development thread

Started by simonlc, March 17, 2013, 10:49:15 AM

Previous topic - Next topic

FelipeMayrink

I am now re-excited about this.

Intendant

This has really alot of potential! I think adding more modes and maybe sometimes mulitplayer, this game might get better known then tetris!  thanks and keep up the good work!
Intendant, you have a voice that makes me wanna play tetris!
- yotipo, approved by Mucho

InkofDeath

This is just great. Good job on all of the work.

yotipo91

#153
When I tried to CW L-spin in the middle, it popped out of the hole.
[!--ImageUrlBegin--][a href=\\\"http://i.imgur.com/EAESoMA.png\\\" target=\\\"_new\\\"][!--ImageUrlEBegin--][img width=\\\"400\\\" class=\\\"attach\\\" src=\\\"http://i.imgur.com/EAESoMA.png\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]







Tried to 180 this J and it popped out too
[!--ImageUrlBegin--][a href=\\\"http://i.imgur.com/DubaE7y.png\\\" target=\\\"_new\\\"][!--ImageUrlEBegin--][img width=\\\"400\\\" class=\\\"attach\\\" src=\\\"http://i.imgur.com/DubaE7y.png\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]



I can spin indefinitely avoiding the piece to lock

I like playing with the ghost piece off, it's good practice to go back and forth without resetting the game
[div align=\\\"center\\\"]

Sprints: Nullpo-26.78 (4/0),  TF-35.97, TOPW-29.461 (065-15), C2-36.58 (4.5/0)
[url=http://tetrison

simonlc

The spins follow SRS. The first spin would've had to be done with a CCW rotate. The way 180 spins work is they are rotated twice, so if you can't do the spin normally without 180 spin, you can't do it with it.

The infinite spinning was taken from the guideline rules, but I think new games don't have that anymore.

InkofDeath

I can't wait until you get to the multiplayer features. I know a lot of the basics, and single player features still need to be developed, but still, it will be epic. When you get to that point, I'm sure there will be tons of ideas and designs floating around for you, but I'll definitely try to suggest some very clever things.

I've been playing a lot, and have enjoyed every minute of it. It is so much more enjoyable than TetrisFriends, or Nullp. Great job sir.

yotipo91

#156
I imagine that since this is in JS it would be more easily exploitable than other games. Other than that great job on the dig race update. Looking forward to more
[div align=\\\"center\\\"]

Sprints: Nullpo-26.78 (4/0),  TF-35.97, TOPW-29.461 (065-15), C2-36.58 (4.5/0)
[url=http://tetrison

FelipeMayrink

#157
Two suggestions and a bug report...

- First, is to have some more stats at the side of the playfield. Just the lines, pieces and time is a bit too little. Something like PPS/PPM or Finesse would be nice.

- Second, being able to set how many lines to clear in Dig Race. I guess the same applies to Sprint.

- As for the bug, it seems that (for me at least) it doesn't show the lines in Dig Race until I harddrop a piece:


I don't know if it helps with debugging, but when I change anything in the Settings menu or resize the screen the lines appear. Basically just updating the game in some way. But when I try to restart, the lines go back to not being visible. I'm using Chrome, by the way.

simonlc

#158
Thanks for the comments guys, makes me really happy.

@InkofDeath If you have any ideas now, I'd love to hear them, personally the only multiplayer I've tried is Cultris 2, and TGM's Doubles.

@yotipo91 This is true, and why I will do a lot of research to try and prevent any sort of cheating. Not because I want to prevent rampant hacking, but because I think it would be a fun thing to learn about.

@FelipeMayrink Thanks, I actually forgot to push that last commit. Dig race is just something I coded during a lunch break at work. There's no internet there, so I have to wait till I get home to push the commits.

I haven't decided if I want to have configurable amount of lines yet for either game mode. I've been wanted to simplify the game more, and it would also mean keeping the leaderboards simpler as well.

Same thing goes for the stats, I'm thinking of just displaying detailed stats at the end, unless you guys thing it should always be shown.


EDIT: Forgot to say, I haven't 'announced' the digrace update because I think there's a problem in how it chooses where to make holes, and sometimes it's not very random looking.

EDIT2: Fixed it, should be nice and random, and also uses the seed so it works in the crappy replay I have there.

farter

bug:
hold the "hold" key during the countdown until the game starts

orz

InkofDeath

#160
Quote from: simonlcI haven't decided if I want to have configurable amount of lines yet for either game mode. I've been wanted to simplify the game more, and it would also mean keeping the leaderboards simpler as well.

Same thing goes for the stats, I'm thinking of just displaying detailed stats at the end, unless you guys thing it should always be shown.
Hmm. I would say to make it an option in the settings/menu to show 'Advanced Stats' as an option. This would then show such stats as PPS/PPM..etc, above the Time/Line stats. I think this is a good middle ground. :)

http://www.reddit.com/r/tetris
You may also get some more users, and feedback here too.

simonlc

Quote from: farter
bug:
hold the "hold" key during the countdown until the game starts

orz
Thanks for the bug report, I'll try to get that fixed soon.

Quote from: InkofDeath
Hmm. I would say to make it an option in the settings/menu to show 'Advanced Stats' as an option. This would then show such stats as PPS/PPM..etc, above the Time/Line stats. I think this is a good middle ground.

http://www.reddit.com/r/tetris
You may also get some more users, and feedback here too.
That's a good idea, I might do this. I'm not really looking for users that much. One thing I don't like about reddit is that threads aren't really persistent. I might post there once I have multiplayer, and want to build up stats for it.

Right now I'm working on a finesse counter, not sure when I'll be done.

InkofDeath

#162
I'm not a 'pro' Tetris player, but I'm Rank 20 on TF, and Rank101 on TB on FB. Here are my thoughts regarding multiplayer.

'1vs1 Battle' Basic Outline
- Garbage is sent to TF Arena's Standards (quote below)*
- Garbage is sent in exact sequence (no randomized garbage, a hole at column 4 will send garbage with a hole at column 4)

- Different sounds play at varying amounts of garbage received (low ding for low amount lines, high ding for high amount of lines...etc)
- Visual indication of garbage received
- Garbage that is incoming is 'stored/accumulated' until the current generated piece is locked down/placed AND no lines were cleared
- A line being cleared stalls the garbage from being received, and keeps it stored
- For each line sent while having stored garbage, a line of garbage is removed (bottom to top, or top to bottom, not sure what the standard is here), aka blocking
- Garbage stored is received all at once

- Garbage received is placed under the current 'stack' of pieces, and raises the stack upwards in the matrix
- Piece generation, and movement should not be impaired while garbage is being received in the matrix
- Garbage blocking should occur even while the garbage is being put into the matrix (I clear 3 lines, 2 lines of garbage should be removed, even if they have yet to generate onto the matrix and are not stored - ensure there's no 'ghosting' of pieces which would max out the matrix!)
- Garbage from here on, clears as normal, and acts the same as regular pieces (sends the same amount of garbage as regular pieces)

- Solid Garbage (unclearable, no holes) should appear after X time
- Solid Garbage increases at 1 line per Y seconds
- X and Y need to be discussed among feedback from users
- Solid Garbage may not be a feature people want, as it limits a game, and doesn't allow 2 individuals to play out their skill

- Enemy's player screen is updated frequently enough that it's fluid. Not laggy, or 1-2 seconds behind.
- Enemy Screen should have Lines Cleared, and Garbage Sent, Maybe more depending on other input
- Options to customize enemy's screen should include size of preview, piece colours (real, blank, full white), PPS/PPM, Advanced Stats Option (TSpins Done, Tetris's Done, Max Combo, Combo's Done...etc)

- User screen should have the same as above

- A timer in a visible location during game time to provide the user with the length of the match
- A countdown timer to show when solid garbage will start, if solid garbage is used

- Idk what else, there's obviously a lot more, but this is quite a bit to toy around with already, plus what else I'm going to list below. I'm sure this is a good starting point though!


Organizing Stats:

Three main stats:

- ELO
- Rank
- Speed

ELO
- You gain ELO by conducting matchmaking
- Matchmaking is a pre-determined ruleset (Harddrop should come up with the rules) that automatically pairs you with others of similar skill level (ELO)
- Matches can only be found through the automated system, and follow the ELO system
- Giving up/leaving, counts as a loss
- Winning against lower ELO's gives lower ELO, higher ELO opponent gives more
- May only be paired against ELO's of certain ranges (+/- ~100/200/300 after every 2 mins of not finding a proper opponent from the pool)
- ELO Stats/Matchmaking Stats remain separate and different from the other game modes, and game areas
- ELO can be viewed on the leaderboards in order of ELO -> W/L ratio -> Games Played


Lobby/Rank
- Lobby is free to join
- A list of all players in the lobby is provided
--> Maybe provide 'channels', to break up the amount of players in each channel
- A chat is provided for communication
- Right-clicking on usernames/accounts provides a menu of actions (more on this later)
- Buttons at the top to Create Room, Auto-Join Room, Filter Rooms
- A 'room' could have options such as Gravity Speed, Maps, Items, No Hold/Hold, Piece Preview Limit, Invisible, No Soft Drop, Number of Players, Team/Single, No Solid Garbage/Solid Garbage, Half Garbage/Full Garbage, Handicaps (based on the average ELO/Rank of the room, and then given by the different of the user's ELO/Rank, which would be solid garbage), Ranked/Unranked, Presets such as Classic, Modern, Normal, TF Arena, TB, FOR EASY conversion/adaptation...etc.

- Similar to Arena, you gain points/EXP when you lose/win in the Lobby
- Points/EXP gained or lost, depend on the Rank of your opponents & where you placed
- IMO, points gained/lost should be curved, beyond the normal tiers like in Arena, and be factored against each Rank. This way its harder to stay higher up in the ranks, but easier to climb up.
- Ranks can be viewed on the leaderboards in order of (Rank (EXP) -> W/L Ratio -> Speed...etc)

Speed
- Automated preset system
- Used to determine your fastest clear time of 40L
- Stores an AVG SPEED for the past Day, Week, Month, Year, All Time
- Stores a FASTEST TIME for Week, Month, Year, All Time
- All Time FASTEST TIME is used to rank users on the leaderboards, should be to the centisecond

Individual User Stats/Profile
- Account Name
- Avatar/Image
- Account Date Creation
- Status/Small Description...etc

- ELO
- Max ELO
- ELO W/L
- ELO Games Played (Week, Month, Year, All Time)
- ELO Hours Played All Time
-> Link to Last 10-20 Games & their replays
-> Link to a saved replay archive of 10-20 ELO games

- Rank
- Rank W/L
- Rank Games Played (Week, Month, Year, All Time)
- Rank Hours Played All Time

- Speed Best Time
- Speed AVG Time (Week, Month, Year, All Time)
- Speed Games Played
-> Speed Best Time Replay

- Contact Info
- PM
- Add Friend
- Settings (could be a lot of settings once you develop things further, might need a dedicated page)




*Tetris Friend's Handbook
http://harddrop.com/forums/index.php?showtopic=3033
[!--quoteo--][div class=\\\'quotetop\\\']QUOTE[/div][div class=\\\'quotemain\\\'][!--quotec--]0 Single
1 Double
2 Triple
4 Tetris

2 T-Spin Single
4 T-Spin Double
6 T-Spin Triple

0 T-Spin Mini Single

10 Perfect Clear

5 B2B Tetris

3 B2B T-Spin Single
5 B2B T-Spin Double
7 B2B T-Spin Triple

0 B2B T-Spin Mini Single

10? B2B Perfect Clear Tetris

0 Combo 1
1 Combo 2
1 Combo 3
1 Combo 4
2 Combo 5
2 Combo 6
3 Combo 7
3 Combo 8
4 Combo 9
4 Combo 10
4 Combo 11
5 Combo 12 or more[/quote]

I put 3 types of rankings for several reasons. ELO shows raw skill, and is not limited to time. Rank is more time oriented. Speed is just a separate skill in Tetris, that heavily influences overall play, and is unique enough to be its own category.

simonlc

Wow, that's a great post, thanks so much. Something like that would require much more than just some js app. Would require me to make a backend, and keep the js client separate. My original idea for multilayer was just to keep it mostly js and have some small server software for communication. What you want is definitely not out of the question, I have worked on similar projects before, like qlranks.com. Having a server would also minimize on a lot of the restrictions of having a mostly js client side game, like infinite replay storage, persistent settings across computers, etc. If I go this route, it will probably delay having any sort of mp for a long time, as I'd want to concentrate more on the client first, and coding a backend like that is an entire project on it's own. If anyone wants to lend a hand...  I'd probably write it with django, unless anyone wants to hop on board and prefers something else.

Dmitri

Quote from: Dmitri
This client is golden, very nice job! All it needs now is a live highscore list with rankings

I noticed one major issue with the replay function. If you play a couple of games in a row it will not save the replay correctly. Also, if you actually play a game and replay it several times, the time recorded on the replay will be different each time (depends on the CPU I guess).
The worst part in this is that I actually set a new personal record under 40 seconds in this client and then noticed the replay wasn't there and that replays are inaccurate, therefore the whole tetris client is quite inaccurate, I still love the feel it has though. [spoiler]If only NullPoMino had a full-screen version with pretty colours. [/spoiler]