Author Topic: Light  (Read 20483 times)

0 Members and 1 Guest are viewing this topic.

Offline Broseph Radson

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 295
  • Rating: +20/-1
  • Its 0x1A4 somewhere
    • View Profile
Re: Light - Progress
« Reply #45 on: November 02, 2010, 09:07:31 pm »

Offline MRide

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 711
  • Rating: +14/-0
  • You can't see this.
    • View Profile
Re: Light - Progress
« Reply #46 on: November 02, 2010, 09:38:48 pm »
Lol.  btw, Michael, I notice the room shows up for a little bit before the shadows appear.  Maybe you could adjust the contrast so people can't tell?

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: Light - Progress
« Reply #47 on: November 02, 2010, 09:46:27 pm »
There is another idea I had, but I think it might not look pretty all the time:

What about only updating certain portions of the screen in a frame, then another, then another? Would that help improving speed? Alternatively, you could update shadows less often, like the fog of War in Starcraft. In Starcraft, I think fog of war is updated at like 6 FPS max.


Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Light - Progress
« Reply #48 on: November 12, 2010, 06:57:59 pm »
Update (mostly to prove that I'm not dead).

It's been proving nearly impossible to up the speed (and I don't really want to progress without increasing the speed of the shadows), but I've done some drastic optimizations to the shadow routine, so I think the problems in my tilemapping routine.
Also, I've been doing some planning, so I have the schematics of the first level done, I've planned out how health bars, items, and traps will go.
Right now I'm attempting to make a tilemap editor so I can actually try making a better tilemap. 

After some tests:
Worst case scenario w/ simple map routine: 2.9 FPS
Normally: 2.8 FPS

x.x
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 - Progress
« Reply #49 on: November 12, 2010, 07:00:45 pm »
It's been proving nearly impossible to up the speed (and I don't really want to progress without increasing the speed of the shadows), but I've done some drastic optimizations to the shadow routine, so I think the problems in my tilemapping routine.
Did you check out the smooth scrolling tilemapper thread? there were some insanely fast tilemappers in there.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Light - Progress
« Reply #50 on: November 12, 2010, 07:02:05 pm »
I did.  I'm working on deciphering Runer112's tilemap program, but I'm still not entirely sure how it works.
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 - Progress
« Reply #51 on: November 12, 2010, 07:02:56 pm »
I think that's b/c it's crazy optimized.  See if you can get the un-optimized version and compare the two.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Light - Progress
« Reply #52 on: November 12, 2010, 07:04:24 pm »
I've been looking at the unoptimized one (the first one he released, I think?). 
I looked at the uber-optimized one, and decided that that was an adventure for another day.
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 - Progress
« Reply #53 on: November 12, 2010, 07:08:16 pm »
Oh.  Yeah, I also have difficulty understanding someone else's code.  I don't know what they were thinking when they wrote it.  (Which is why commented code is much easier for me to understand)
Well, good luck! I hope you can make this faster.  It's a really cool concept.
I have an idea for a different light-dark game, but that's on my "plan to plan to do list," so it will be awhile. :P

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Light - Progress
« Reply #54 on: November 12, 2010, 07:26:55 pm »
Well, crap.  It's not my tilemap routine.  *Sigh*
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 - Progress
« Reply #55 on: November 12, 2010, 07:59:20 pm »
Actually, the speed looks better than before.
Have you considered not having the map scrolling every time you move?

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: Light - Progress
« Reply #56 on: November 13, 2010, 02:58:38 am »
Yeah it seems a bit faster. However, have you tried what I posted the other day (the post that contains a Youtube vid)? Would it help improving speed?

I'm glad this is still alive, though.
« Last Edit: November 13, 2010, 02:59:00 am by DJ Omnimaga »

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: Light - Progress
« Reply #57 on: November 25, 2010, 08:54:18 pm »
Hey, have you got any luck with this lately? I am wondering if you have considered toning down the complexity of the light engine by simply updating one row on the screen per frame or maybe even updating it only when reaching the middle of a tile?

This may not look as great, but maybe it would increase the speed?

I think the first method might not be feasible with Line, though. Maybe you would have to use a set of sprites with diagonal stuff drawn on them. Anyway here's what I mean:
« Last Edit: November 25, 2010, 09:05:11 pm by DJ Omnimaga »

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Light - Progress
« Reply #58 on: November 25, 2010, 09:13:35 pm »
I'm actually taking a small break on my project.
In my attempts to optimize, I entangled and combined many part of my program together in a manner that makes it tedious to pry apart/rewrite.
I'm still working on other parts, such as a tilemapper and the beginnings of the menu, but in order to allow me to get a fresh perspective on the problem, I'm currently working on another shorter project (with a demo which I can probably release either today or tomorrow, or at the latest, Saturday).

Unless I can get the shadow algorithm to run respectably fast, this project will probably have to be shelved indefinitely.
« Last Edit: November 25, 2010, 09:14:04 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 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: Light - Progress
« Reply #59 on: November 25, 2010, 09:17:17 pm »
Ah ok I see, I'm glad you're still working on stuff. I hope this project doesn't die, though. Have you thought about posting your source so someone can figure out if he can help optimizing? Someone could maybe write an algorithm in ASM to do the lights part of your game.