Author Topic: So I Was Told About This Thing...  (Read 4136 times)

0 Members and 1 Guest are viewing this topic.

Offline Iambian

  • Coder Of Tomorrow
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 739
  • Rating: +216/-3
  • Cherry Flavoured Nommer of Fishies
    • View Profile
So I Was Told About This Thing...
« 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.
A Cherry-Flavored Iambian draws near... what do you do? ...

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: So I Was Told About This Thing...
« Reply #1 on: June 14, 2014, 06:01:10 pm »
Wow, this is looking pretty awesome O.O Nice demo! :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: So I Was Told About This Thing...
« Reply #2 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.
I'm not a nerd but I pretend:

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: So I Was Told About This Thing...
« Reply #3 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

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: So I Was Told About This Thing...
« Reply #4 on: June 15, 2014, 04:24:46 am »
Wow that's some badass effect O.O

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: So I Was Told About This Thing...
« Reply #5 on: June 15, 2014, 04:44:40 am »
How do you do this? And mask? On the fly masking? Nice effeect though!

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: So I Was Told About This Thing...
« Reply #6 on: June 15, 2014, 07:35:52 am »
Very nice ! I think acagliano might be interested in  this.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: So I Was Told About This Thing...
« Reply #7 on: June 15, 2014, 08:24:04 am »
Very cool looking. 8)

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: So I Was Told About This Thing...
« Reply #8 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.
I'm not a nerd but I pretend:

Offline Iambian

  • Coder Of Tomorrow
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 739
  • Rating: +216/-3
  • Cherry Flavoured Nommer of Fishies
    • View Profile
Re: So I Was Told About This Thing...
« Reply #9 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)
« Last Edit: June 15, 2014, 12:12:33 pm by Iambian »
A Cherry-Flavored Iambian draws near... what do you do? ...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: So I Was Told About This Thing...
« Reply #10 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.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: So I Was Told About This Thing...
« Reply #11 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.