Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Iambian on June 14, 2014, 06:00:30 pm

Title: So I Was Told About This Thing...
Post by: Iambian on June 14, 2014, 06:00:30 pm
... and I just had to do it.

Geekboy wanted me to whip up some sort of grayscale lighting effect that darkens the further you move away from some point.

The end result isn't particularly efficient or speedy, but I do like the look of it.

Written in z80 assembler. Flood fill subroutine (to fill in the circle) provided by Xeda. Everything else written from scratch. Time: 2 days.
Title: Re: So I Was Told About This Thing...
Post by: Sorunome on June 14, 2014, 06:01:10 pm
Wow, this is looking pretty awesome O.O Nice demo! :D
Title: Re: So I Was Told About This Thing...
Post by: aeTIos on June 14, 2014, 06:01:41 pm
Looks nice! Been a long time since I last saw you publish something.
Actually, it's been a while since I last saw you post anything at all.
Title: Re: So I Was Told About This Thing...
Post by: DJ Omnimaga on June 14, 2014, 10:30:59 pm
Maybe a TI-84+ remake of Blinded by the Dark 86 with enhanced fog of war? :P
Title: Re: So I Was Told About This Thing...
Post by: Matrefeytontias on June 15, 2014, 04:24:46 am
Wow that's some badass effect O.O
Title: Re: So I Was Told About This Thing...
Post by: Eiyeron on June 15, 2014, 04:44:40 am
How do you do this? And mask? On the fly masking? Nice effeect though!
Title: Re: So I Was Told About This Thing...
Post by: Streetwalrus on June 15, 2014, 07:35:52 am
Very nice ! I think acagliano might be interested in  this.
Title: Re: So I Was Told About This Thing...
Post by: TIfanx1999 on June 15, 2014, 08:24:04 am
Very cool looking. 8)
Title: Re: So I Was Told About This Thing...
Post by: aeTIos on June 15, 2014, 10:23:03 am
Very nice ! I think acagliano might be interested in  this.
He did indeed mention that he was looking for something like this.
Title: Re: So I Was Told About This Thing...
Post by: Iambian on June 15, 2014, 12:08:04 pm
This program uses three prerendered screen-sized masks, which are combined one at a time on the buffer. Interestingly, the masking process for each buffer is slower than the tilemapper used to render each frame, but the process is straightforward enough to embed in the LCD delay cycles (since this thing is running at 15Mhz).

The Wikipedia entry on fast circle rendering helped me very much, since the C code that is present transcribes almost directly into assembly.

Of course, since I'm the sort of person who "wants results nao", here's a few intermediate screenshots I took while I was working on this program. Note how much faster it is when I'm not masking [much of] anything. (Note that the first [and second] image actually has a frame limiter since it ran too fast)
Title: Re: So I Was Told About This Thing...
Post by: DJ Omnimaga on June 15, 2014, 11:44:02 pm
Look very nice as well. The last one would definitively look nice in-game and the others for cutscenes or special animations.
Title: Re: So I Was Told About This Thing...
Post by: Xeda112358 on June 15, 2014, 11:48:36 pm
I can't wait to see it actually optimized. My routine wasn't exactly ideal for speed.