FROM BELOW (Tetris-like) [WIP NES Homebrew]

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

User avatar
Memblers
Site Admin
Posts: 3842
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by Memblers » Tue Jun 23, 2020 10:45 pm

Goose2k wrote:
Tue Jun 23, 2020 9:03 pm
My guess is the library queues up the mask calls for the end of the frame or something.
Yeah, it does that, but without any queue. It will use the last setting you gave it. And normally that's what we'd want, to not change the PPU registers mid-frame (unless you're doing precise cycle-timed stuff). What I did was this:

Code: Select all

    POKE(0x2001,(MASK_BG | MASK_SPR));
    ppu_wait_nmi();
    POKE(0x2001,(MASK_BG | MASK_SPR | MASK_MONO));
Using mono + color emphasis is helpful when you have black backgrounds. Though I often do mono by itself when I'm benchmarking just one thing at a time.

User avatar
DRW
Posts: 1968
Joined: Sat Sep 07, 2013 2:59 pm

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by DRW » Wed Jun 24, 2020 12:07 am

What Memblers said.
You need to do the change immediately. Library functions probably use it as it is usually intended, i.e. buffering it for NMI. (Although I can't give you any definite information about neslib since I don't use it.)

By the way, for stuff like this, you can also use the __asm__ command where you can enter inline Assembly. In case you ever need anything like that and where C functions aren't sufficient.

For example, I created a whole bunch of macros to read and write array values in pointers.
(Because since a pointer needs to be in zeropage for indirect access (i.e. when you want to do something like pointer[index] = value;), the compiler always copies your own pointer to ptr1, even if your pointer is already in zeropage itself.)
And since I don't want my code to be cluttered with __asm__ (and since this is error prone), I have macros similar to this:

Code: Select all

#define AsmSetVarFromPtrAtIdxVar(variable, pointer, indexVariable) \
{ \
    __asm__("LDY %v", indexVariable); \
    __asm__("LDA (%v), Y"); \
    __asm__("STA %v", variable); \
}
Available now: My game "City Trouble".
Sales website: https://megacatstudios.com/products/city-trouble
Gameplay: https://youtu.be/Eee0yurkIW4
Download website: http://www.denny-r-walter.de/city.htm

User avatar
Goose2k
Posts: 79
Joined: Wed Dec 11, 2019 9:38 pm
Contact:

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by Goose2k » Wed Jun 24, 2020 1:19 pm

Thanks! I got it working and can see different sections of code now represented as colors! This will help a lot, thanks!
Attachments
timings.png

User avatar
Goose2k
Posts: 79
Joined: Wed Dec 11, 2019 9:38 pm
Contact:

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by Goose2k » Thu Jun 25, 2020 3:32 pm

Sneak peak of the new (hopefully "honest") box art for the game! Can't wait to share the final piece!

@DRW: I hope I can win back you trust! :wink:
Attachments
sneak_peak.png

User avatar
Goose2k
Posts: 79
Joined: Wed Dec 11, 2019 9:38 pm
Contact:

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by Goose2k » Fri Jun 26, 2020 9:40 pm

Update Week 5!

The end is in sight!

As always, the latest version of the ROM is attached. Please check it out, and let me know if you have any feedback!!

Performance Improvements

Most of this week was really slow, digging deep into performance problems. The biggest issue being a small hitch at the moment a brick lands, which was significant enough to cause the frame to go long, and sprites would flicker.

Profiling and optimizing game code is something I actually do quite regularly in my day job, but things are quite a bit different on the NES :lol: .

Thanks to the people in this thread, and elsewhere, I was able to use PPU Mask for some rudimentary profiling. It resulted in these on screen colored lines representing the amount of time spent in a given chunk of code. Here is the break down of my sprite update routine.

timings.png

After many hours of moving calls to POKE(0x2001...) all over my code, I was able to eliminate most of my sprite flicker issues. There is still one more during "hard drops" where the block travels the entire height of the screen in a single frame (checking collision along the way) but I can live with that one.

The performance work made up the majority of my week, but I also made 2 more big advancements.

Box Art

I found an artist (@syrupneko) who was willing to create the box art for FROM BELOW! He has a really cool "comic strip" aesthetic which you don't see very often.

So without further adieu, here is the official box art for FROM BELOW!

from_below-Logo_and_Seal_small.jpg

And because I'm sure the web will massacre all the little details in his shading work, I will try to capture some zoomed in shots here:

from_below-Logo_and_Seal_details_small.jpg

New Gameplay

This most noticeable change to the game, is the new "real-time" Kraken gameplay I have added to the game. Previously, the Kraken would add garbage to the screen every time a block landed. With this new version, the Kraken adds garbage to the screen every 10 seconds.

This new real-time version challenges the player to get as much done as fast as possible; a race against the impending attack! It rewards fast, frantic play styles, and punishes overthinking. I think it feel much more distinct from traditional Tetris-like gameplay, and is much closer to what I originally envisioned.

Both this new "real time" mode, as well as the old "turn based" mode are available in the options menu. In addition there is also a "classic" mode with no garbage blocks.

Oh and I added movement to the tentacles so that they look more interesting but also have a tell right before their attack!

What's Next

As I said, the end is in sight! I think if I can get a solid week of dev in, next week will be the last major update, and then probably another week of bug fixes and odds and ends.

Here's my current TODO list:

Code: Select all

..::TODO::..

FEATURES:

//must have
* Non-Nintendo blocks.
* Option to return to main menu on game over.
* Pal swap based on time of day/night.

//should have
* Ability for player to "store" a block for later.
* Game over screen (polished).
* Fast music when tentacle is maxed out.
* Sound on hit tentacle.

//nice to have
* Screen shake on hit.
* Score for Classic mode.
* Option to turn of SFX.
* Hard drop trails

//investigate
* Multiple tentacles. - possibly if when reaching top they go into name table.
* Number of rows that hit the tentacle adds a delay to next attack.
* See if tentacles can be made to work with name tables.
Attachments
nes_tetris_gameplay_june_26_timed_small.gif
nes_tetris_gameplay_june_26_timed_small.gif (613.62 KiB) Viewed 537 times
from_below_2020_06_26.nes
(40.02 KiB) Downloaded 60 times

M_Tee
Posts: 421
Joined: Sat Mar 30, 2013 12:24 am
Contact:

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by M_Tee » Sat Jun 27, 2020 9:19 pm

Already praised the game via PM, but I love the visuals, both in-game and for the cover illustration.

Hate to see such a great name as What's Kraken? get dropped though. :)

(Also, when I hear a Tetris clone is called From Below, I immediately expect the blocks to drop upward, from below, like in certain stages of dushlan.)

dink
Posts: 41
Joined: Sun Jan 12, 2020 8:42 pm

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by dink » Sat Jun 27, 2020 9:34 pm

Your progress is incredible, keep up the awesome work! :)

User avatar
defkode
Posts: 8
Joined: Fri Dec 16, 2016 4:41 am
Location: Poland

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by defkode » Sun Jun 28, 2020 2:46 am

Played a bit. Game is really well done! My new favourite tetris game (previous was Tengen's tetris version)

Bananmos
Posts: 516
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by Bananmos » Sun Jun 28, 2020 4:31 am

Great game! Made it to level 7 and much enjoyed the Kraken mechanic, as frustrating as it was at times :)

Love the box art too!

But one great addition would be a 2-player co-op mode. This mode is my favorite feature that makes Tengen Tetris stand out for me and it's great fun to play a cooperative with a friend frantically shouting how to divide the playfield between each other.

It also makes a lot of sense for the theme, with multiple villagers trying to fight off the Kraken together, rather than going by it alone.

Or even better would be if this could be the very first NES Tetris version with 4-player support! Trying to cooperate over the small playfield could get chaotic, but also a lot of fun... :D

One possible idea for making 4-player work better would be to introduce some freedom over when a block starts falling, allowing one player to drop the next block only when convenient. Possibly with an expiration timer to not make it too easy.

User avatar
defkode
Posts: 8
Joined: Fri Dec 16, 2016 4:41 am
Location: Poland

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by defkode » Sun Jun 28, 2020 4:32 am

It's amazing that so colorful game is made of so few tiles
Attachments
CHR
CHR
bank_0.png (8.12 KiB) Viewed 391 times

User avatar
Goose2k
Posts: 79
Joined: Wed Dec 11, 2019 9:38 pm
Contact:

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by Goose2k » Sun Jun 28, 2020 8:44 am

Thanks for all the feedback, everyone! I really do appreciate it. This being my first NES game, it's really exciting (and a relief) for me to hear that people actually enjoy it.
defkode wrote:
Sun Jun 28, 2020 2:46 am
My new favourite tetris game (previous was Tengen's tetris version)
That's going on the back of the box! :lol:
Bananmos wrote:
Sun Jun 28, 2020 4:31 am
But one great addition would be a 2-player co-op mode.
I am kind of eager to get this project done, and move onto something more original. It was really just meant to be a quick learning project, prior to something more complicated, but has ballooned a little bit.

With that in mind, I will likely finish what is there and release that as a free ROM (without multiplayer).

When I have some free time, I will likely start tinkering with a multiplayer mode. If I can get that working (and I think I should be able to), I think that might warrant a physical release, and I will start looking into that process.

Your 4 player ideas are cool too! I have a lot less confidence that I can pull that off. :D
defkode wrote:
Sun Jun 28, 2020 4:32 am
It's amazing that so colorful game is made of so few tiles
All credit goes to Zolionline!

As you can see we used 99% of the first half of the Pattern Table for backgrounds, but have barely used the 2nd half for sprites. Not sure if that is normal, but it feels like there is probably a lot more to squeeze out if needed!

This game is NROM, so this is all we have to work with. :D

User avatar
DRW
Posts: 1968
Joined: Sat Sep 07, 2013 2:59 pm

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by DRW » Sun Jun 28, 2020 9:09 am

Goose2k wrote:
Sun Jun 28, 2020 8:44 am
Your 4 player ideas are cool too! I have a lot less confidence that I can pull that off. :D
Shouldn't four players basically be pretty much the same as two players in terms of complexity?

Goose2k wrote:
Sun Jun 28, 2020 8:44 am
As you can see we used 99% of the first half of the Pattern Table for backgrounds, but have barely used the 2nd half for sprites. Not sure if that is normal, but it feels like there is probably a lot more to squeeze out if needed!
In Nintendo's "Tetris", the sprite and the background graphics are simply copies of each other, so they also don't need much.

Goose2k wrote:
Sun Jun 28, 2020 8:44 am
I am kind of eager to get this project done, and move onto something more original.
What will be the next project?
Available now: My game "City Trouble".
Sales website: https://megacatstudios.com/products/city-trouble
Gameplay: https://youtu.be/Eee0yurkIW4
Download website: http://www.denny-r-walter.de/city.htm

User avatar
Goose2k
Posts: 79
Joined: Wed Dec 11, 2019 9:38 pm
Contact:

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by Goose2k » Sun Jun 28, 2020 9:42 am

DRW wrote:
Sun Jun 28, 2020 9:09 am
Goose2k wrote:
Sun Jun 28, 2020 8:44 am
Your 4 player ideas are cool too! I have a lot less confidence that I can pull that off. :D
Shouldn't four players basically be pretty much the same as two players in terms of complexity?
I haven't thought it through too much, but I'm concerned about performance (updating 4x sprites and 4x nametables). Not to mention 4 play areas wont fit on screen right now.

All solvable, but not as obviously possible with my skills right now.
Goose2k wrote:
Sun Jun 28, 2020 8:44 am
I am kind of eager to get this project done, and move onto something more original.
What will be the next project?
Going to clone this "City Trouble" game I found, and add a Kraken. Adding Nintendo Seal of Quality all over the cover too. 😁

For real, I will probably port my game Witch n Wiz from Pico 8. It's an action puzzler with minimal scrolling and fits in a 128x128 sprite sheet, so I think it might be a good "next step" in learning NES DEV.

Thinking I might take a crack at using UNROM at the same time. Not sure yet though.

Bananmos
Posts: 516
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by Bananmos » Sun Jun 28, 2020 11:36 am

Goose2k wrote:
Sun Jun 28, 2020 8:44 am
Thanks for all the feedback, everyone! I really do appreciate it. This being my first NES game, it's really exciting (and a relief) for me to hear that people actually enjoy it.
defkode wrote:
Sun Jun 28, 2020 2:46 am
My new favourite tetris game (previous was Tengen's tetris version)
That's going on the back of the box! :lol:
Bananmos wrote:
Sun Jun 28, 2020 4:31 am
But one great addition would be a 2-player co-op mode.
I am kind of eager to get this project done, and move onto something more original. It was really just meant to be a quick learning project, prior to something more complicated, but has ballooned a little bit.

With that in mind, I will likely finish what is there and release that as a free ROM (without multiplayer).
Yeah, can totally appreciate that. It's awesome what the team you've assembled managed to do in such a short amount of time. Even if the gameplay is simple, what makes this stand out is the high level of polish in terms of animation, graphics and music!
When I have some free time, I will likely start tinkering with a multiplayer mode. If I can get that working (and I think I should be able to), I think that might warrant a physical release, and I will start looking into that process.

Your 4 player ideas are cool too! I have a lot less confidence that I can pull that off. :D
As long as you've got the CPU time for 4x the gameplay logic, it should all be doable. Interfacing with the 4-score adapter is really simple. And I for one would instantly buy this homebrew if it had 4-player support! Like I said, the thing I love the most about Tengen's Tetris is the unique 2-player co-op mode. And it'd be great to see it extended to 4 players.

The fourscore is also sadly underused on the NES, probably due to the sprite flickering problem. I totally loved that Micro Mages finally created an enjoyable homebrew for 4 players, and would love to see more of those. :D
As you can see we used 99% of the first half of the Pattern Table for backgrounds, but have barely used the 2nd half for sprites. Not sure if that is normal, but it feels like there is probably a lot more to squeeze out if needed!

This game is NROM, so this is all we have to work with. :D
Just keep in mind you can easily make BG use the same pattern table as the sprites, in case you want to add some sort of cutscene to the ROM for a later version... :)

User avatar
DRW
Posts: 1968
Joined: Sat Sep 07, 2013 2:59 pm

Re: FROM BELOW (Tetris-like) [WIP NES Homebrew]

Post by DRW » Sun Jun 28, 2020 2:29 pm

Goose2k wrote:
Sun Jun 28, 2020 9:42 am
Going to clone this "City Trouble" game I found, and add a Kraken. Adding Nintendo Seal of Quality all over the cover too. 😁
You forgot the box art. I would suggest some aliens shooting lasers at the heroine in a sinister cyberpunk city.
Available now: My game "City Trouble".
Sales website: https://megacatstudios.com/products/city-trouble
Gameplay: https://youtu.be/Eee0yurkIW4
Download website: http://www.denny-r-walter.de/city.htm

Post Reply