tetr.js development thread

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

Previous topic - Next topic

XaeL

Quote from: simonlc
Getting a little side tracked...
[!--ImageUrlBegin--][a href=\\\"http://i.imgur.com/p282S9x.jpg\\\" target=\\\"_new\\\"][!--ImageUrlEBegin--][img width=\\\"400\\\" class=\\\"attach\\\" src=\\\"http://i.imgur.com/p282S9x.jpg\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]

So beautiful.



QuoteLike many setups here, it is useful if your opponent doesn't move and you get 4 Ts in a row.

FelipeMayrink

Quote from: simonlc
[!--ImageUrlBegin--][a href=\\\"http://i.imgur.com/p282S9x.jpg\\\" target=\\\"_new\\\"][!--ImageUrlEBegin--][img width=\\\"400\\\" class=\\\"attach\\\" src=\\\"http://i.imgur.com/p282S9x.jpg\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]

Beautiful indeed.

Could you make that texture but with the new standard colours? (Z as red, I as cyan and T as purple)

UJS3

Looking good! As for sound, couldn't you get effects and music from an opensource library like freesound.org?

simonlc

#108
Quote from: FelipeMayrink
Beautiful indeed.

Could you make that texture but with the new standard colours? (Z as red, I as cyan and T as purple)
Ok, added it. I still kind of want to tweak the colors for those though. I've also added the stack outline option in the settings. Eventually I'll make it so settings aren't overwritten when a new one is added... lol. Maybe I'll do that today after I change the origin.

Quote from: UJS3
Looking good! As for sound, couldn't you get effects and music from an opensource library like freesound.org?
I've looked at that site quite a lot. There's a ton of sounds, and filtering though them takes forever. Also the sounds need to match, which is also even more work. I thinking finding someone to do sounds would be much nicer.

FelipeMayrink

Quote from: simonlc
Ok, added it. I still kind of want to tweak the colors for those though. I've also added the stack outline option in the settings.
Thanks! Also, the outline looks pretty good, I haven't even thought about that detail...
The "World" skin + Outline is an awesome combination.

simonlc

So I've finally got fully working replays, after much procrastination. They aren't live yet since there's still a few things to be done. One major thing right now is the framerate isn't a perfect 60fps, and having a frame based replay system means that the time isn't being calculated accurately. I'm going to research measures to fix this and also maybe fix some other input things I've been wanting to do.

I've also implemented a quick seed/prng system, though I might research what NullPo uses and put that in instead.

FelipeMayrink

Quick question:
The game statistics (PPM, lines per minute, etc.), are they coming back?

Is just that the first post says they are a feature in the game but there's only time, pieces and a line counter.

Btw, you should really update the first post, since a few things have changed. Like the image, for example.

simonlc

Yeah that's all coming back, I but they'll likely only show at the end. And yeah.. I should probably update that lol.

simonlc

Decided to push the replay thing. You can only watch the game you just played, and it uses your current settings, so if you change them during the game or replay it will fuck up.

It's also not super accurate, your replay might show an end time that is a little slower or faster. This is due to everything being based on frames and the browser not getting exactly the same frame rate all the time. I'm going to try and find a good system that uses time based stuff, while still being able to do frame based maneuvers.

UJS3

Cool, but the replay is inconsistent for me. I can keep running the replay for a single game and sometimes it displays correctly, sometimes it messes up. In this game, the first I piece is placed incorrectly, so the whole stack is shifted (correct replay on the left).

[!--ImageUrlBegin--][a href=\\\"http://i42.tinypic.com/358qhib.jpg\\\" target=\\\"_new\\\"][!--ImageUrlEBegin--][img width=\\\"400\\\" class=\\\"attach\\\" src=\\\"http://i42.tinypic.com/358qhib.jpg\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]

simonlc

Quote from: UJS3
Cool, but the replay is inconsistent for me. I can keep running the replay for a single game and sometimes it displays correctly, sometimes it messes up. In this game, the first I piece is placed incorrectly, so the whole stack is shifted (correct replay on the left).

[!--ImageUrlBegin--][a href=\\\"http://i42.tinypic.com/358qhib.jpg\\\" target=\\\"_new\\\"][!--ImageUrlEBegin--][img width=\\\"400\\\" class=\\\"attach\\\" src=\\\"http://i42.tinypic.com/358qhib.jpg\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]

Weird, it shouldn't do anything like that, I'll have to look at it closer. Has it only been the first dropped piece?


Also I've just added a piece lock animation, the piece darkens when the lock delay is active.

UJS3

I haven't been able to reproduce it since that one game, but there it was only the very piece which was dropped incorrectly (and if dropped incorrectly, always in the same way).

simonlc

Are you holding any keys before pressing start or hitting reset (when you played that game)? Because right now it doesn't seem to be resetting the keys properly if they're held during a restart.

UJS3

Oh, I see you can still input commands during the replay, is that intentional? I don't think I was pressing anything, but I guess it's possible..

simonlc

Oh I didn't even realize it was doing that, fixed that. There's still the keys not resetting on a game start though.