Capture your NES Classic Tetris gameplay

NestrisChamps is an online suite of tools to capture and track your NES Classic Tetris gameplay. It supports capturing from emulators as well as from the raw video feed from your NES.

"Capturing" means reading the video frames, and extracting game information from them, such as score, lines, level, blocks in board, and piece stats.

With game data captured, a world of possibilities opens up:

  • Re-draw game data in custom layouts with pixel perfect crispness
  • Compute statistics from the gameplay (Tetris Rate, Efficiency, Droughts)
  • Record scores and game files in a database
  • Pit multiple players against each other in competition layouts with stat differentials

Getting started: 1-2 Go!

NestrisChamps is a 2-steps system.

  1. Calibrate capture
  2. Render

Once calibration is done, streaming with NestrisChamps is easy as pie! You just need to add ONE Browser Source component to OBS / SLOBS, to have the captured gameplay re-rendered, and you are ready to stream right away!

There's no manual cutting of the source video stream to do, everything is ready in just a few clicks.

So, to get started, the first you need to do is to calibrate.

Before You do that however, it is strongly recommended that, you spend time on these 2 resources.

Once you've read the doc, go and calibrate your capture here.

And once you've calibrated, pick a renderer for your Browser Source in the renderers page.

Stats! So many stats!

The NES has very little real-estate, which severely limits the space available for stats beside gameplay itself. Once game data is acquired in NestrisChamps however, it can be renderered in a large HD canvas, offering much more space for stats. In NestrisChamps, all layouts are provided to run in 720p resolution (1280x720), but custom renderers could be made in 1080p resolution or even (gasp!) 4K!

Classic layout

Das trainer layout (capturing the Das Trainer rom)

Recording and Replays

Once you have calibrated NestrisChamps, and you play while capturing is on, all your games will be captured in NestrisChamps' database. The layouts themselves may show a small portion of your high scores and personal best scores (PBs), but all your scores and games are available for your review at your personal scores page.

Games can be replayed in layouts others than the one they were captured in. And any 2 games can be pitted against each other in competition layouts.

Replays can be sped up too (because who has the time to watch replay in real time?!). To speed up a replay, use the query string

?speed=X
where X represents the speed-up factor.

Layouts

With data, the sky is the limit when it comes to redrawing gameplay. Nestrischamps comes with a variety of pre-build renderers. Additionally, it is easy to make your own layouts! Either for your personal use, or to add to NestrisChamps for everyone's benefit. Below are some examples.

Stencil layout (compatible with CTM Stencil!)

Stencil Plus

Simple 1p

Tomello Soulman

Champions

Plain Text

Game Hosting and Tournaments

While you can use NestriChamps purely to capture and stream your own gameplay, one great thing about NestrisChamps is that you can connect your game stream to someone's else renderer, who acts as a game host. And of course, you can be a game host yourself!

Game hosting with NestriChamps is incredibly easy!

  1. Set a browser source in OBS to one of NestriChamps competition layouts, that you can find in the renderers page
  2. Control which player should be shown in the layout from the admin page
  3. Commentate on games and let your commentating flavour earn you fame and glory!

There are a variety of competition layouts to chose from, with some examples below.

CTM video

Garage 2

CTJC

Compact 2 to 4

Features and Tools

Native webcam support

In layouts that support it, webcam is automaticlaly captured from the game capture page and shown in the layout at the correct location and dimensions. This has several advantages.

  • Webcam feed is send directlly from the capture page to the renderer for very low latency rendering! This is unlike capture from player's twitch stream, where Twitch broadcasting adds a few seconds of delay (sometimes many seconds!).
  • Game hosting is even simpler: a game host doesn't have to worry about getting player cam via other means (e.g. capturing and cutting from player stream, or using other tools like discord video calls, or OBS.ninja)
  • Layouts can have multiple modes and handle the player cams with no interraction from the game host. For example, the layout CTM-2-Matches can automatically switch between a 2-match view or single-match view and webcams feed are automatically taken care of.

Twitch Chat Integration

For layouts that support it, Twitch chats is automatically renderered into the layout.

Additionally, the capture page can be loaded with a query string

?tts=1
to activate Text-To-Speech, and chat messages will be read to the player, with one random voice assigned to each participant of the chat.

Invisible Tetris Renderer

Classic NES Tetris, expert players can play in an invisible mode with the following Game Genie code.

OXYOUO
VNIPZN
VNTPYN

It is hard enough for expert players themselves to track the invisible field, and it is practically impossible for stream viewers to track. NestrisChamps comes to the rescue here with a Invisible Tetris renderer! While the player plays invisible Tetris and must keep track of the board in his/her head. The audience to the stream get to see the "phantom" pieces in the board.

Counting scores past maxout

NES Tetris stops counting score at 999,999. With a custom Game Genie code, it is possible to count past this (up to 1,600,000) with using a hexadecimal character as first letter (e.g. A is 1 million, B is 1.1 million, C, is 1.2 million, etc)

Folks do not necessarily have a Game Genie though. Well, Nestrischamps to the rescue for this case too! By inspecting the line clears in the game, NestrisChamps is able to add up score beyond maxout, and display it in the layouts.

As a bonus, levels in NES classic Tetris are not displayed correctly beyond level 30. NestrisChamps corrects the levels up to level 62, which is enough for most players.

Qualifier renderer

Many online events have a qualifier format, where players must qualify to determine in which bracket they will play.

Most qualifiers have the same sort of requirements: stream for a specific amount of time, track your qual score, as either the highest score you can achieve during your qual session, or average of top 2, or top 3.

NestrisChamps offers a qualifier layout. The layout is CTM-stencil-based, includes a built-in timer, and computes the qual score as the average of top X (3 by default). Native webcam is active in this layout, so players can show their webcam capture works, if that is a requirement of the tournament they are joining.

The layout tracks scores from the moment it is loaded, and the timer starts as soon as the layout loads.

The qualifier layout can be tuned with the following parameters, which can be added to the query string.

minutes=X
where X is the qualifier time (default to 120 minutes, i.e. 2 hours)
average_of=Y
where Y can be one of 1, 2, or 3 (defaults to 3)
?minutes=60&average_of=2

Backgrounds

Many of the layouts in NestrisChamps come with changeable backgrounds. It's of course possible to request NO background too, so a user may set whichever custom background they want in OBS. Still, there are some built-in backgrounds you can consider using.

Select a background by adding the following query string to the layout URL

?bg=NUM

where NUM is a number, as follows:

  1. (no background)
  2. Black background with randomly positioned tetris tiles
  3. Green NestrisChamps animated background
  4. Rainbow NestrisChamps animated background

Timer Tool

Some competitions might not allow NestrisChamps for qualifiers. For those, it is typically expected that players will stream their qualification run while being stencil-ready, and include some custom timer in their OBS stream.

It is surprisingly annoying to find a very light timer to use. Most players resort to finding a timer on the internet, and capture it with window capture in OBS. That is waaayyy heavier than it needs to be.

NestrisChamps provides a very simple timer that can be used in your OBS layout. Simply create a new Browser Source with canvas size 268x44 (you can scale its size in OBS later), and load the URL: https://nestrischamps.herokuapp.com/tools/timer/.

The timer can be customized with the following parameters:

minutes=X
where X is a integer representing the duration in minutes of the timer (defaults to 120, i.e. 2 hours)
type=Y
where Y can be one of 'up' or 'down' to indicate whether this is a count-up or count-down timer.
text_color=H
where H is the hex representation of a color for the text (defaults to black)
bg_color=H
where H is the hex representation of a color for the background (defaults to white)
?minutes=60&type=down&text_color=ffffff&bg_color=000000

Source code and documentation for the timer is available here

When running an official CTWC event, most tournaments use a common footer that cycles between multiple "slides" of information (e.g. event name, facebook page, etc.)

NestrisChamps makes available a simple footer that can be easily loaded in OBS. The footer has size 1280x32, and can thus be easily added as a standalone browser source, above many of the competition layouts, which specificaly leave a 32px strip at the bottom.

The footer can be customized with the following parameters:

event=X
where X is the name of the event (defaults to "SINGAPORE CHAMPIONSHIP 2021")
cycle_seconds=Y
where Y is an integer representing how many seconds each slide should stay before cycling (defaults to 10).
system=Z
Indicates whether this is a PAL or NTSC event (defaults to NTSC)
?cycle_seconds=15&event=Marq's%20garage%20party

Source code and documentation for the footer is available here

Native emulator support

Capture is the most critical part of NestrisChamps. Without good data in, NestrisChamps can't compute stats from gameplay accurately.

While we can't do without frame capture for a video feed from a NES, frame capture is unecessary in an emulator! Indeed game data can be read from the game itself and sent to NestrisChamps' server! This exactly what Maurice did when he created the NestrisChamps emulator connector!

If you play NES Tetris in one of FCEUX, Mesen, or BizHawk (basically emulators with support for lua scripting), then you can easily use the NestrisChamps Emulator Connector.

Because the connector runs straight in the emulator, features from the "normal" NestrisChamps capture page are obviously not available (e.g. native webcam sharing, and Twitch chat Text-To-Speech).

Free and Open Source!

NestrisChamps is Open Source Software, licenced under the MIT licence and available on github.

That means you can run your own version of NestrisChamps locally if you wish, and have your own database.

The online version of NestrisChamps is owned and operated by yobi9 (Find him on discord, twitch, github).