Matt Hughson (NES & Game Boy Developer) Profile picture
Dec 20, 2022 β€’ 5 tweets β€’ 3 min read β€’ Read on X
Did you know: πŸ€”

The infamous "sprite flicker" you see on the NES, is not actually a built-in hardware feature.

This flicker needed to be hand-coded into every game!

But why!? πŸ§΅πŸ‘‡
The flicker is an attempt to avoid a limitation of the NES:

The NES can only display 8 sprites per horizontal line of the screen.

Source: nesrocks.com/blog/nes-graph…
The NES's default behavior is to *stop drawing sprites* once that 8 sprite limit it reached. This is what *that* looks like.

Notice that the purple character on the left just completely vanishes. You can imagine why games avoided this.

(The 4 skeletons use 8 sprites total)
Here's a basic version of the flicker. In an emulator you can see that the sprite memory on the right (highlighted with a red circle) is changing the order of sprite data every frame, which means that *which* sprites come *after* the 8-sprite-limit changes every frame aka flicker
And the final results running on a real NES + a CRT TV where I find it looks a lot better than in an emulator + LCD. #nesdev

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Matt Hughson (NES & Game Boy Developer)

Matt Hughson (NES & Game Boy Developer) Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @matthughson

Sep 7
The NES game library is full of technical wonders!

One of my favorite effects has to be the spotlights πŸ”¦ in "Rescue: The Embassy Mission."

What’s even cooler is how SIMPLE it is to achieve if you know the tricks!

Let me break it down for you! 🧡 #nesdev #screenshotsaturday
Observe how the spotlight moves smoothly while the light naturally fades into deep shadows, just as it would in a real-world setting.

This method is so efficient that you can easily have multiple spotlights on screen during gameplay, without experiencing any slowdown. Image
Before we see how "Rescue" does this, lets look at a more obvious *brute force* approach: Snakes Revenge!
Read 9 tweets
Aug 31
Ever wonder how these cutscenes in Ninja Gaiden work? How do they do a letter box while having moving objects in side the letter box?

I'll tell you! And it actually relies on a LIMIT of the NES! 🧡
It might not be obvious why this is interesting, but ask yourself: how does this shot have Ryu clipped at the top of the frame? Why doesn't he pop out? Image
Knowing the limits of the NES, shouldn't it look more like mock screenshot? How does the top of Ryu go *under* the black bars?

The way this is accomplished is pretty clever and actually exploits a limit of the NES! Image
Read 7 tweets
Jun 8
Here's how I do some really basic perf testing on my NES game, Super Sunny World 🌞

I can enable a "Frame Line" which draws a line of "white" at the end of the Game Loop. If that line goes past the bottom of the screen, that would result in a lag frame! #nesdev
This works because while FRAME 1 is drawing, line by line from the top of the screen downward, FRAME 2 is being calculated. So the longer FRAME 2 takes to update, the lower on screen the line will be.
But you may be wondering: I didn't think the NES could draw arbitrary lines like that! You're right. The "line" isn't actually a "line". Instead I change to color of the rendering (using something called an "emphasis bit") for a set time creating the illusion of the line.
Read 6 tweets
Jan 15, 2023
Implementing scrolling on the NES is difficult. Because of that, I've been thinking about what different platformer games have done, and which battles I want to fight with my #nesdev game.

I'll document all the different *types* of scrolling I can think of in this thread.
::Full 8-Way Scrolling (Blaster Master)::

Levels extend in all directions with a maze-like layout, not favoring any one direction in particular. Levels are much larger than can fit in nametable, and employ level streaming.
::Limited 8-Way Scrolling (Mario 3)::

SMB 3 has some levels with 8 way scrolling, but are still designed with a bias towards horizontal movement. Up/Down is reserved for "hidden objects" and "secrets".

Camera is designed to only scroll up if player is doing a highjump/flying.
Read 11 tweets
Dec 20, 2022
Here's a fun problem to solve when making NES games, that you might not even realize is a problem! #nesdev

Sprites on the NES are actually drawn in "screen space" and wrap around at the edges. But obviously in many games, this makes no sense! Here's how to solve it 🧡
The sprites are drawn in a range of 0-255 on the x-axis (0-239 on the y-axis), and have no concept of a "camera", or the level. It is up to the dev to draw them in a location on screen that makes sense, relative to the game's camera.
It is also up to the dev to make sure that objects that are "off camera" do not get drawn.

But this can be tricky because "objects" are actually multiple 8x8 sprites drawn together to form a larger object.
Read 9 tweets
Dec 2, 2022
Here's a quick look at the TOP 5 games from this year's #nesdevcompo!

All games are free to play, and there are many more great games beyond these 5! πŸ§΅πŸ‘‡
5th Place πŸ† @miau6502
miau6502.itch.io/crowborg

From the one of the developers behind Micro Mages, BΓΆbl, Space Gulls and more!

A really original take on rogue-like where you can only move using a grappling hook. Clever enemy designs make this one stand out for me.
4th Place πŸ† Fiskbit
fiskbit.itch.io/irritating-ship

Pilot a ship through a zero-G obstacle course. A mix of Asteroids & Irritating Stick. Probably the most complete "game experience" in the competition!
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(