tetr.js development thread

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

Previous topic - Next topic

simonlc

Quote from: Dmitri
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]

What do you mean they don't save correctly? When you're playing it records your actual time it took to finish. The replays are based on frames, and those vary in time, they can be for example from 16-18ms long. I'm working to fix this, and when I do, replays will be available for download.

Dmitri

#166
Quote from: simonlc
What do you mean they don't save correctly? When you're playing it records your actual time it took to finish. The replays are based on frames, and those vary in time, they can be for example from 16-18ms long. I'm working to fix this, and when I do, replays will be available for download.

By not saving correctly I mean it does not always show the last game played, when I finished a good game I wanted to see the replay, I got to watch the replay of a different game.

myndzi

#167
Simon, maybe you and me should chat. I'd love to help move this forward, and the back end is really where I'm most comfortable. (In before jokes)

I have a network structure half done anyway (server side) if you're looking for a room-based solution; it's modeled on IRC in structure. And it's written in node.js so it's JS, which you already know

Extruderx

Buttons "Play Sprint" and "Play Dig Race" don't work now ("Options" do).

+1 for multiplayer.

simonlc

Quote from: Extruderx
Buttons "Play Sprint" and "Play Dig Race" don't work now ("Options" do).

+1 for multiplayer.
I think I broke something last night before sleeping. oops

simonlc

Ok it should be fixed, sorry.

CaptainPaul

Yeah, I played a few games of sprint and "watched replay" after getting a 27.xx time or so. The piece placement in the replay wasn't the same at all and actually topped out:

simonlc

#172
I'll investigate, thanks for reporting.

Edit: Did you change any settings in between games? That breaks replays.

CaptainPaul

Interesting. I can see how that would mess it up. My controls reset for some reason, so I had to change them back after starting a game and realizing that something was amiss.

InkofDeath

Possible to add multiple control schemes/profiles? Hate having to switch each control between my siblings & gf. Like [1] [2] [3], and either of those could have any combination of controls/settings.

Keyboard keys + settings like gravity, DAS, or ARR in 1 profile would be nice.

simonlc

Quote from: InkofDeath
Possible to add multiple control schemes/profiles? Hate having to switch each control between my siblings & gf. Like [1] [2] [3], and either of those could have any combination of controls/settings.

Keyboard keys + settings like gravity, DAS, or ARR in 1 profile would be nice.
I don't think I could implement that before online stuff. Settings are saved in the browser, so for now you could try to play on separate browsers.

UJS3

#176
Nice to see some new additions!

I just had a similar problem to what CaptainPaul reported, the replay doesn't match the game I played. No changes to the settings. In game I harddropped the first piece, but in the replay it's held. After that, I think the second piece gets incorrectly harddropped and so on, but it's tough to tell.

Unrelated note: I can set ";" (semicolon) as one of the controls, but the box next to it says "undefined". I'm using a European keyboard, if that matters.

simonlc

Ok, that gives me an idea for what it could be. Right now the code is a bit of a mess, and in the main branch, so I don't want to push any update yet. Also the new pokemon came out so that's taking up all of my time right now. So any update might take a while.

Barneey

#178
Such a great game, absolutely delicious.
Forgive me if someone already asked. Are highscores and users, either globally or locally, a possible coming feature?

simonlc

Yes, but it might take a while as progress is very slow right now, and I'm re working the entire code to use an engine I'm making.