tetr.js development thread

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

Previous topic - Next topic

simonlc

Triple post (hat trick):

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

UJS3

Cool, I like the transparency. I see what you mean about making it feel more like a "real game". More polished.

Cleaning up the interface makes sense, but why did you choose to go with the large piece count? The number of lines left is much more important to me.

FelipeMayrink

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

Looks pretty f*cking awesome. Not gonna lie.

Paradox

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

FelipeMayrink

I think it he should implement Replays first. Also, of course, there's still a need to make the Singleplayer the best it can be, before moving to multiplayer.

But seriously: replays. I'm afraid that I'll get a super duper awesome game and it will be lost forever.

simonlc

Thanks for the feedback guys. The piece count is just there cause I was putting stats on there. That part is still unfinished. Right now I'm working on the menu system so it shouldn't be long before these new changes are public.

Multiplayer will be one of the last things I do, and like Felipe said, I will finish single player games, then add replays, and then finally have multiplayer.

DJ_TJ

Quote from: simonlc
Thanks for the feedback guys. The piece count is just there cause I was putting stats on there. That part is still unfinished. Right now I'm working on the menu system so it shouldn't be long before these new changes are public.

Multiplayer will be one of the last things I do, and like Felipe said, I will finish single player games, then add replays, and then finally have multiplayer.
Multiplayer tetr.js...   And this is really fun to sprint on. I played it alot when it came out. And the pic looks as good as nullpo.  
I'm sorry Dave, I'm afraid I can't do that.

simonlc

So the new design is live. There's still a few things not working, like pause, and some settings aren't completed. There is also no background.

I've had some performance issues when using the glossy block type in firefox. It may be related to a potential memory leak, or it could be due to firefox just being slow at drawing gradients. We'll see what turns up.

FieryLight

Looking great!  However, pause doesn't pause and (as I'm sure you already know) every mode is Marathon but Sprint.

XaeL

Its very smooth.


Though i don't like how it stretches to fill the window...

Also, nice work on the vector graphics!



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

simonlc

Quote from: XaeL
Its very smooth.
Though i don't like how it stretches to fill the window...

Also, nice work on the vector graphics!
You can select a fixed size in the settings.

UJS3

I like the new look! It runs fine in chromium (with any skin), but I did get the old bug with cycling settings values.

simonlc

Quote from: UJS3
I like the new look! It runs fine in chromium (with any skin), but I did get the old bug with cycling settings values.
Looks like my implementation doesn't work in chrome, thanks for the heads up.

Integration

Looks really nice now. But I wish there would be an option to show the grid. And I hope, it will be possible to decrease number of previews in future versions.

Your DAS = 5 feels like DAS = 6 in other games. Usually, DAS = 6 means that a key begins to autorepeat in the 6th frame that it was pressed down. Your framerate is 60, isn't it?


simonlc

#89
Quote from: Integration
Looks really nice now. But I wish there would be an option to show the grid. And I hope, it will be possible to decrease number of previews in future versions.

Your DAS = 5 feels like DAS = 6 in other games. Usually, DAS = 6 means that a key begins to autorepeat in the 6th frame that it was pressed down. Your framerate is 60, isn't it?
I will add the grid back, it's there, there's just no option yet. I'm probably going to remove the hide cursor thing cause it seems kind of useless to have. I have an idea for the previews, but I wont share it yet.

The framerate tries to be 60. I will investigate the DAS setting, it is a possibility that it adds an extra frame somewhere.

Added a grid option in the settings.

I'm now going to work on fixing some of the long standing bugs, like the soft drop one, DAS, the potential memory leak, and the menu thing in chrome.

I've been thinking of how to refactor the codebase since it's getting quite big for a single file. While I do this I'll hopefully also fix some of the sketchy code I wrote while trying to add stuff or fix things.

Second, I want to do is work on the input handling more. This could be where the DAS problem is coming from, but I've yet to look at it. Right now an input will only be 'fired' if the key is being held while the frame is being processed. I'm pretty sure if you where able to press a key fast enough in between a frame (very unlikely) you could actually have it not register. Even though this seems very unlikely, I want to make sure actions are always fired. I also want to improve the handling of multiple keys being pressed at the same time. I've fixed this for the left and right, but not any other action.

Another thing on the plate is the game graphics. As I've stated some of the blocks don't work well with firefox. I have some more ideas on how to try and fix this, like render it out as an image, and just move that image around. This would also potentially have the benefit of me being able to change the opacity on the ghost piece. The falling piece and ghost are redrawn at 60fps, though I want to make it only redraw if there was any actual movement.

And lastly, there's been talks about possibly making a web front end in 3D for the fan game Grand Master Online. So I've been reading up on WebGL, and it's very possible that this game will turn into 3D, much like TGM3 is 3D.