Author Topic: Light  (Read 17507 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Light
« Reply #15 on: October 18, 2010, 12:28:15 am »
Yeah true, it's incredible how easy GS is to achieve in Axe compared to ASM and xLIB/DCS
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Light
« Reply #16 on: October 18, 2010, 04:11:37 am »
This is looking awesome! Possibly to gain some speed, you could try 2x2 pixels instead of 1x1 and it would get 4 times faster maybe?  You wouldn't be able to use the Axe line function but it sounds like you already have your own :D Me and Eeems were working on a similar game concept earlier but it didn't go anywhere.  I looked into blinded by the dark code but i couldn't make any sense of it :( and they use some sort of tricky algorithm since it can have multiple light sources.

Overall i think this is looking awesome! :D

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Light
« Reply #17 on: October 18, 2010, 09:18:55 am »
Builderboy, it could still go somewherw :p you and I just need to put our heads together more
/e

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Light
« Reply #18 on: October 18, 2010, 02:58:12 pm »
* DJ Omnimaga wonders if that is related to their secret project or something :P
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Light
« Reply #19 on: October 18, 2010, 05:03:32 pm »
Its actually highly related ^-^

Offline Michael.3545

  • LV3 Member (Next: 100)
  • ***
  • Posts: 69
  • Rating: +13/-7
    • View Profile
Re: Light
« Reply #20 on: October 18, 2010, 05:16:23 pm »
The problem with grayscale shadows is then you can see the whole map, regardless of where you are standing.  Then the shadows become more of an effect that a gameplay mechanic. 

(Is gameplay mechanic the right term here?  I'm not really sure...)

I thought the entire idea of games like these is for you not to know what is around you without actually physically going there.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Light
« Reply #21 on: October 18, 2010, 05:24:56 pm »
Yeah true, although maybe he plans to use the shadows to hide enemies and stuff, idk (Like Starcraft 2).

Btw nice to see you around again on the forums Michael :D
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: Light
« Reply #22 on: October 18, 2010, 05:29:12 pm »
Looks great! Keep us posted!
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

Offline MRide

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 711
  • Rating: +14/-0
  • You can't see this.
    • View Profile
Re: Light
« Reply #23 on: October 18, 2010, 06:10:06 pm »
The problem with grayscale shadows is then you can see the whole map, regardless of where you are standing.  Then the shadows become more of an effect that a gameplay mechanic. 

(Is gameplay mechanic the right term here?  I'm not really sure...)

I thought the entire idea of games like these is for you not to know what is around you without actually physically going there.
Yeah true, although maybe he plans to use the shadows to hide enemies and stuff, idk (Like Starcraft 2).

Btw nice to see you around again on the forums Michael :D
Well, he could make it so anything in the shadows is grey, and the walls that you can see are black.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Light
« Reply #24 on: October 18, 2010, 07:02:16 pm »
Any optimization suggestions, please?
(I'm using a variant of Bresenham's line algorithm, for those interested)

It looks awesome, but why are you using that algorithm? It could very well be faster to set the initial screen and adjust the start/end points of the Line( function (which already uses Bresenham's algorithm).

I'm using the algorithm to test when the shadows should start.  The algorithm tests all the points in the line, and when it encounters a black pixel, it switches over to the built in line( function to draw it.

--
Okay, grayscale it is!
--
Anybody know where I can find a TI-86 emulator?  I wanna try Blinded by the Dark.

Wabbit supports 86s, I think.

And btw, that looks awesome :D

EDIT: Yep, just tested. 86 works perfectly on Wabbit. Even 85s, even though they use the 86 skin.
« Last Edit: October 18, 2010, 07:03:07 pm by Deep Thought »




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Light
« Reply #25 on: October 18, 2010, 08:29:05 pm »
I thought 86 support was limited and 85 absent?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Light
« Reply #26 on: October 18, 2010, 08:31:40 pm »
Must have been a while ago. I kept bugging him about it until it worked ;D




Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Light
« Reply #27 on: October 26, 2010, 06:50:53 pm »
After procrastinating for days (curse you, cuberunner!), I finally managed to implement a variant on Builderboy's suggestion and made the game check every two pixels for collisions.
Which means that now, instead of being excruciating, it's just a little slow!  (Yay!)

Because I couldn't decide between black or grayscale shadows, I added both.  You press alpha to alternate between the two.  (I got a little lazy implementing it, so you have to come to a complete stop, press alpha really quickly if your emulator is fast, then start moving for it to switch).

Next:  Collision detection.  And plot.  And more optimizing, if possible.
« Last Edit: October 26, 2010, 06:51:26 pm by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline MRide

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 711
  • Rating: +14/-0
  • You can't see this.
    • View Profile
Re: Light
« Reply #28 on: October 26, 2010, 10:50:00 pm »
Looks good.  Like I said earlier, if you're going to do greyscale shadows, I would make anything in shadows grey, otherwise there is no point.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Light
« Reply #29 on: October 27, 2010, 02:05:31 am »
Looks nice :D
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)