TeDiGe-2

Started by PetitPrince, November 11, 2012, 03:24:33 PM

Previous topic - Next topic

PetitPrince

Hi.

I made another Tetris visualizer.

Project page (Github) | Example | Editor



So, this is a complete rewrite of TeDiGe (actually, I did two, this is the second), because the first version was too slow, nobody used it and didn't offer as much as fumen. And this version still doesn't. It lacks collision & wallkick support, proper keyboard control and an UI that isn't confusing as hell (I'm bad at this).

What it *can* do, however, should hopefully at least raise some eyebrows. See the example.

I've implemented a frame-based animation system (press play on the third example to see it in all its glory). It uses a little bit too much CPU to my taste but it's still usable on my config (Lenovo X220t laptop). There's also a slight memory leak with Firefox if you let the animation loop ad eternam, but it shouldn't crash your browser. Speaking of browser compatibilities, it was developed on Firefox and the examples page works fine in the latest stable Chrome and Opera (I'd even say it runs better in Chrome than in Firefox). Not surprisingly, it fails spectacularly on IE9. You shouldn't use Internet Explorer anyway. I'm too busy to install Win8 at the moment, so trying it on IE10 is not in my agenda. I'm curious about the result nonetheless (I think it *should* work).

On the backend, Myndzi told my where to look to make a fumen converter. Thanks myndzi ! It semi-works: the inactive stack is flawless, but the active piece may be one or column or row off due to some difference in the coordinate of the active piece. Thread carefully.

There's that joystick/button visualization that's kinda neat (totally stolen from THE_TOOL, thanks Jago), but isn't currently linked to the action button, so it is a bit tedious to add it to each frame.

An other nifty-but-half-broken thing is the exportation to image. The exportation of a single frame is flawless (I extensively use the canvas element, and exporting an image from a canvas easy), but the exportation of the whole diagram to an animated gif produce poor colors due to the canvas-to-gif converter I use (everything is client and javascript based; no external server required).

I'm kinda tired working on this, and I consider it sufficient for my needs (needs = writing silly stuff for an upcoming french tetris blog, probably another stillborn project). I may maintain, fix critical bugs and add features (and I am in no shortage of ideas) it if feel like it, but consider this release "as is".
If you want to contribute, learn javascript and fork it. There's plenty of documentation about how I coded it; I hope it is sufficient (ask me questions if you like).

I'd be happy to pull any modifications.
[div align=\\\"center\\\"]
Neon TGM Evangelist :: "Tetris the Grand Master is the best (single player) Tetris ever"
I wrote TeDiGe-2 (Github | Bug/suggestion tickets | [url=http:/

myndzi

Nice stuff! Look forward to seeing where this goes, and possibly contributing too

Paul676

               Tetris Belts!

toppingoutivan

I agree. It looks amazing especially with the high-speed animation.
I was really random, wanted to try simultaneous animation side-by-side - it works without a glitch :O

Maske

#4
Cool

P.S.
[!--ImageUrlBegin--][a href=\\\"http://i252.photobucket.com/albums/hh10/ringo4649/a11.jpg\\\" target=\\\"_new\\\"][!--ImageUrlEBegin--][img width=\\\"400\\\" class=\\\"attach\\\" src=\\\"http://i252.photobucket.com/albums/hh10/ringo4649/a11.jpg\\\" border=\\\'0\\\' alt=\\\"IPB Image\\\" /][!--ImageUrlEnd--][/a][!--ImageUrlEEnd--]


this hover text may interfere with user's work a little.

PetitPrince

True that.
I used the id attribute on the div thinking it was the only valid attribute I could use to store my own data and that I haven't had any other alternative , but then I just saw that you could set up your own data-* attribute in html5. Maybe I'll change that later; currently got to many thing to do for school.
[div align=\\\"center\\\"]
Neon TGM Evangelist :: "Tetris the Grand Master is the best (single player) Tetris ever"
I wrote TeDiGe-2 (Github | Bug/suggestion tickets | [url=http:/

Rosti_LFC

#6
Quote from: PetitPrince
joystick/button visualization ... totally stolen from THE_TOOL
Hehe, that was my first thought.

PPrince, on extra thing I think would be cool, and is currently something I think is lacking in these sorts of editors, is a line clear animation of some sort. It makes things far easier to follow imo.

Nice to see you're still around too. Has been a while, or at least feels like it.

PetitPrince

Quote from: Rosti_LFC
PPrince, on extra thing I think would be cool, and is currently something I think is lacking in these sorts of editors, is a line clear animation of some sort. It makes things far easier to follow imo.
Line clear animations (also totally stolen from jago's work  ) are already present; press play on the third diagram (the one with a death tetrion) in the example page. So actually it's a bit a pain in the arse to do it (you have to manually draw each animation frame), but it's in the backend. Also, it's illogical for someone to pause in the intermediate frames of the line clear animation... maybe for some future versions.

Quote from: Rosti_LFC
Nice to see you're still around too. Has been a while, or at least feels like it.
I have always been around  . It's just that I've got nothing to say and/or am not interested in debating about SRS stuff.
[div align=\\\"center\\\"]
Neon TGM Evangelist :: "Tetris the Grand Master is the best (single player) Tetris ever"
I wrote TeDiGe-2 (Github | Bug/suggestion tickets | [url=http:/

Rosti_LFC

Quote from: PetitPrince
Line clear animations (also totally stolen from jago's work  ) are already present; press play on the third diagram (the one with a death tetrion) in the example page
Sorry, my bad. I was speaking based off the fourth example and didn't notice it in the third one, I guess.

PetitPrince

I've changed to way tedige-2 website is managed; it now mirrors the master branch of the project. It changes absolutely nothing for the end user, but for the developers it means that the JSDoc documentation is now available online.

Note to the admins (Blink ?), I don't mind if you delete harddrom.com/tedige . Nobody uses it anyway.
[div align=\\\"center\\\"]
Neon TGM Evangelist :: "Tetris the Grand Master is the best (single player) Tetris ever"
I wrote TeDiGe-2 (Github | Bug/suggestion tickets | [url=http:/

Maske

Hmm, it appears that TeDiGe2 can't work properly when importing the Fumen code includes caption

PetitPrince

Quote from: Maske
Hmm, it appears that TeDiGe2 can't work properly when importing the Fumen code includes caption
Could you give me the steps to reproduce the bug ?
[div align=\\\"center\\\"]
Neon TGM Evangelist :: "Tetris the Grand Master is the best (single player) Tetris ever"
I wrote TeDiGe-2 (Github | Bug/suggestion tickets | [url=http:/

Maske


PetitPrince

So Maske told me that fumen import was in fact working.
[div align=\\\"center\\\"]
Neon TGM Evangelist :: "Tetris the Grand Master is the best (single player) Tetris ever"
I wrote TeDiGe-2 (Github | Bug/suggestion tickets | [url=http:/

Maske

#14
Uh-oh!
I want you to import the two into TeDiGe2.

[fumen]110@/dI3gbI3gbI3gbI3gbI3qbA4G7eB5eBAAA[/fumen]

[fumen]110@/dI3gbI3gbI3gbI3gbI3qbAAA7eB5eBAAA[/fumen]


. It's just that I've got nothing to say and/or am not interested in debating about SRS stuff.
[/quote]
Thouhg there is the word "Kakure Kirishitan", I was not aware until now that you are "Kakure SRS believer"

Edit: I've added the image and viewr's link.