multiple power bars

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
Guest

multiple power bars

Post by Guest » Mon Jan 03, 2005 12:47 am

Hi all,

If i want to have multiple power bars (representing
power of different characters in the game) on the same screen,
what should I do to achieve this?

I would like to have smooth change of the power bar.
Anyone could help?

Brian

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

Post by Memblers » Mon Jan 03, 2005 6:25 am

The solid part of the bar is obvious enough (update the nametable). If you want one energy unit per pixel, it'd be: energy / 8 = number of solid blocks. The remainder would be the number of pixels filled in the partial block.

Either sprites or background could be used for the partial blocks. The sprite version would be a solid block partially hidden beneath the 'previous' solid BG block (this is like the trick I used for the blood lines in my old Halloween demo), and the all-background version would require background tiles for all 8 partial stages.

Guest

Post by Guest » Mon Jan 03, 2005 6:22 pm

Hi ...
where can i get the "halloween Demo"?

Brian

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

Post by Memblers » Tue Jan 04, 2005 2:44 am

It's here.
http://nesdev.com/haloween.zip

It's not much to see, though. I think it doesn't work right on a real NES (and probably some of the better emus too).

Post Reply