Upcoming obscure video modes

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
User avatar
Janka
Posts: 214
Joined: Fri Sep 21, 2012 10:46 pm
Location: inside Out

Upcoming obscure video modes

Post by Janka »

Another rambling on the endless path of video modes. This one should be easy to implement and at the same time very useful for platformers. The idea is platformers have, well, platforms, and platforms are flat. 4 pixels in height. At the same time sprites are often 16x16 in platformers so the ladders and such are 16 pixels wide. So 16x4 tiles come more natural to platformers than 8x8 tiles. Such a video mode could save a lot of flash previously used for vertical combinations of tiles and at the same time allow a 4-pixel "smooth" falling of platforms and bigger objects without having to fall back to sprites. All the other things are the same as in video mode 3, video RAM is same size. Scrolling could require some tweaking.

Oh, of course a 4x16 "mode 3" for tilted games would be sure nice, too, but it's far more complicated if not impossible because of the tight timing in the horizontal direction.
Last edited by Janka on Wed Oct 17, 2012 11:01 pm, edited 1 time in total.
User avatar
Harty123
Posts: 467
Joined: Wed Jan 12, 2011 9:30 pm
Location: PM, Germany
Contact:

Re: Platformer Video Mode 3+: 16x4 pixels per tile

Post by Harty123 »

interesting idea!

A mode 3 with only 16 colors (4bit) and 8x8 tiles could also help to save RAM and increase the count of sprites - like this:

http://avga.prometheus4.com/

For many games 16 colors are enough!
User avatar
Janka
Posts: 214
Joined: Fri Sep 21, 2012 10:46 pm
Location: inside Out

Re: Platformer Video Mode 3+: 16x4 pixels per tile

Post by Janka »

Harty123 wrote:A mode 3 with only 16 colors (4bit) and 8x8 tiles
Not feasible because of the tight timing, see http://uzebox.org/forums/viewtopic.php?f=3&t=1165. :(

210x224 may be possible with tricky programming. AVGA only has 192x144, which is far away from what usebox can do. ;)
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Platformer Video Mode 3+: 16x4 pixels per tile

Post by uze6666 »

I don't want to hijack this thread, but while we are in exotic video modes discussions, I'd like to share a wicked idea I got the other day to save flash and ram. Right now, palette translation can be done for sprites but not for background tiles due to cycles restriction. I got that idea that would allow to halve memory footprints for both sprites and BG tiles while keeping the same 240x224 resolution. The trade off is that would reduce the available colors to only 8 or 1 bit per R,G and B. This would still allow quite a few older games to be implemented, like ms.pac-man, in which all colors can be reduced to 8. The trick is encode 2 pixels in a byte in the following manner
Image
where B0,G0 & R0 is the 1st pixel and B1,G1,R1 is the second pixel. Then set the DDRC (data direction register for port C) to set only bits 7,5 and 2 as outputs to allow a single shift left to display the 2nd pixel. This would work for both flash and ramtiles, though obviously, more cpu will be required to handle the bit masking required to blit the sprites in the ramtiles.
User avatar
Flecko
Posts: 158
Joined: Mon Jan 05, 2009 11:50 pm

Re: Platformer Video Mode 3+: 16x4 pixels per tile

Post by Flecko »

As the Uzebox hardware has stayed the same, and the software has progressed, I have really enjoyed watching the various improvements that are made. You are truly an inspiration to us all Uze for your ability to just keep churning out great stuff.

I would most certainly find a mode with reduced memory consumption useful, even if it means slightly lower CPU and colors. No biggy.

If you've got the time and patience, I say go for it!
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Platformer Video Mode 3+: 16x4 pixels per tile

Post by uze6666 »

As the Uzebox hardware has stayed the same, and the software has progressed, I have really enjoyed watching the various improvements that are made. You are truly an inspiration to use all Uze for your ability to just keep churning out great stuff.
Hehe thanks Flecko! :D Amazing that this little mega644 still hasn't given it all uh?!
User avatar
Janka
Posts: 214
Joined: Fri Sep 21, 2012 10:46 pm
Location: inside Out

Re: Platformer Video Mode 3+: 16x4 pixels per tile

Post by Janka »

That's a really nice idea. When I get really tight with flash I certainly will consider it.
User avatar
D3thAdd3r
Posts: 3221
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Platformer Video Mode 3+: 16x4 pixels per tile

Post by D3thAdd3r »

Very clever idea Alec :D
User avatar
martinsustek
Posts: 117
Joined: Sat Apr 30, 2011 11:34 am
Location: Ostrava, Czech Republic

Re: Platformer Video Mode 3+: 16x4 pixels per tile

Post by martinsustek »

Good idea. So there will be one palette lookup for two adjacent pixels? And how much colors per tile? And palette for whole screen or per tile (like on zx spectrum)?
8 colors can be enough for some games - it depends on what colors will DAC generate, I suppose W,RGB,CMY,K, but real colors can be different.
User avatar
Janka
Posts: 214
Joined: Fri Sep 21, 2012 10:46 pm
Location: inside Out

Re: Platformer Video Mode 3+: 16x4 pixels per tile

Post by Janka »

Okayyy, now this thread counts as hijacked. I change the subject to "upcoming obscure video modes". :P
Post Reply