Demo of the RLE video mode

Use this forum to share and discuss Uzebox games and demos.
Post Reply
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Demo of the RLE video mode

Post by CunningFellow »

The rotations are "canned" data.

I did all the maths on the PC and just cut and pasted the lines into the Uzebox C code.

This is not because the Uzebox does not have the horses to do the calculations, but because I am lazy and gave up on trying to debug the problems I was having doing it all on the Uzebox. I want to just push the demo and get on with other stuff.

Hopefully you will all think it is amazing :)

FilledPoly.gif
FilledPoly.gif (5.29 KiB) Viewed 3680 times
Attachments
RLE_Demo.uze
(33.03 KiB) Downloaded 749 times
User avatar
Jubatian
Posts: 1561
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Demo of the RLE video mode

Post by Jubatian »

Huh, now this is starting to look super-wild! :)

Looking at the memory activity this looks even more wild as it is rather clear that the whole object is never represented at once as an RLE image. It is some 200 pixels tall, and the necessary ~600-800 bytes of RAM consumption isn't showing anywhere, which is awesome.

Wonder how a more final approach would look like on terms of mechanics, which would be the stage, data representation what could be hurled at the race ahead the beam solution to produce the RLE input on the fly.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Demo of the RLE video mode

Post by Artcfox »

Woah! This looks awesome! I can't wait to see the kind of games you come up with.
User avatar
nicksen782
Posts: 714
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Demo of the RLE video mode

Post by nicksen782 »

... stuff just got REAL!

Does this use SPIRAM?
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Demo of the RLE video mode

Post by CunningFellow »

nicksen782 wrote: Mon Dec 31, 2018 8:22 pm Does this use SPIRAM?
No - I am not enthusiastic about the SPI RAM. It is too slow to be used for frantic fast moving stuff which is kinda my gig.
Artcfox wrote: Mon Dec 31, 2018 7:34 pm Woah! This looks awesome! I can't wait to see the kind of games you come up with.
Thanks. The plan is still SuperHexagon. This demo was just to show off the underlying RLE mode. I had too many bugs in my 3D code to make even a simple game with it so I cheated with the canned data. The problems are not insurmountable if someone else wants to make Elite. I was just getting bored and I want to move onto the new "super sprite" video mode. That one is going to make you say "Woah!" in all capital letters with several exclamation marks :)
Jubatian wrote: Mon Dec 31, 2018 2:22 pm Huh, now this is starting to look super-wild! :)

Looking at the memory activity this looks even more wild as it is rather clear that the whole object is never represented at once as an RLE image. It is some 200 pixels tall, and the necessary ~600-800 bytes of RAM consumption isn't showing anywhere, which is awesome.

Wonder how a more final approach would look like on terms of mechanics, which would be the stage, data representation what could be hurled at the race ahead the beam solution to produce the RLE input on the fly.
The RLE RAM is a fixed 256 byte circular buffer. It starts the screen empty and then stays 100% full till the end.

Most of the RAM is reserved for the lines linked list. This is 2 Kilobytes or 256 x 8 byte lines that can be drawn on the screen. So the maximum number of lines on the screen is 256. You can see the lines linked list grows and shrinks depending on what is shown on the screen. When the bottom of the ship is visible (only 3 polygons) the linked list is almost empty. When the ship is viewed from the top with the back showing a bit (as in below picture) the linked list takes almost a whole 256 byte block.
RamUsage.gif
RamUsage.gif (25.13 KiB) Viewed 11513 times
If you look this (dot)UZE file that has 3 static ships on the screen you can see that the RAM usage is still very low.
ThreeShips.gif
ThreeShips.gif (26.81 KiB) Viewed 11513 times
Attachments
RLE_Demo.uze
(33.28 KiB) Downloaded 441 times
User avatar
D3thAdd3r
Posts: 3221
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Demo of the RLE video mode

Post by D3thAdd3r »

Resurrecting an old thread, but apparently I was away from Uzebox when this came out and never expressed my appreciation.

Really incredible looking, surely this would drive someone to put it towards a game? I know CF is not crazy about SPI RAM, but I wonder if this were possible at a possibly lower resolution, could a full SPI RAM bitmap bet feasible behind such RLE stuff? The main issue which I could be wrong about, is getting the BG necessary for many games is going to drastically increase RAM usage.
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Demo of the RLE video mode

Post by CunningFellow »

There are two distinct parts of this video mode than enable the spinny around ship. They both happen in active-video-time leaving 100% of the user-time CPU free.

One part takes lines (Y=MX+C) and turns them into RLE data.

The other part takes that RLE data and spits it to the screen.

If the Y=MX+C part was replaced with SPI Reads (SPI_RAM or SD_Card) to fill the RLE buffer then it could show kind of bit map

HOWEVER it would only work for pictures with large runs of colours. Like line art or cartoons. There needs to be long enough runs to read the SPI bytes.

The kind of games I think this would work for are Super-Hexagon, Elite, Driller/Total-Eclipse, Stunt-Car-Racer, Stun-Runner, i-robot, Trailblazer, Startstrike-II.

If someone was really talented they might be able to stretch it to something almost like X-Wing/Tie-Fighter.

The biggest problem with doing any game in this mode is that each line on the screen takes 8 bytes of RAM. There is 2K of RAM used for the lines. So you have a maximum of 256 lines you can have on the screen.

The still picture a few posts back that shows the 3 static Cobra MKIII on the screen - takes 64 lines to draw. So one quarter of the total available.

If anyone WANTS to use this video mode for a game I will help in any way I can.
User avatar
danboid
Posts: 1936
Joined: Sun Jun 14, 2020 12:14 am

Re: Demo of the RLE video mode

Post by danboid »

Dyatink the Uzebox might be able to handle a stripped down foobillard(plus) with your RLE mode?

https://foobillardplus.sourceforge.net/
Post Reply