Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Everything dark except circle around character?  (Read 3255 times)

0 Members and 1 Guest are viewing this topic.

Marek

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 61
  • I'm a llama!
    • View Profile
Everything dark except circle around character?
« on: August 13, 2004, 12:12:48 AM »

I'm a bit stumped at a major challenge. I've made a top-down maze puzzle and now I want to make it so that everything is dark except the area around the character, who has a flashlight. Sort of like some of the dungeons in Zelda: Link to the Past (except here it's just one puzzle in a regular 3rd person point and click adventure).

What would the most efficient way be to achieve this effect? Should I make a massively large (my screen size is 800x600, so it'd have to be 2400x1800 :o ) black overlay sprite with a little hole in it that follows the character sprite when it moves? Or is there some other, more clever way to handle this?

Your help would be very much appreciated.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Everything dark except circle around character?
« Reply #1 on: August 13, 2004, 07:06:33 AM »

Well, sorry, but I can't think of other solution than the overlay. You could optimize it a bit, though, such as composing the overlay of several tiles, so that it doesn't consume too much memory. There would be one square of black and one square with an oval "hole", then you could build a big square with a hole in it from those. Am I making sense?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Marek

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 61
  • I'm a llama!
    • View Profile
Re: Everything dark except circle around character?
« Reply #2 on: August 13, 2004, 11:27:55 PM »

Gotcha. I'll see if I can pull this off without things slowing down too much...
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Everything dark except circle around character?
« Reply #3 on: August 14, 2004, 12:53:07 PM »

I couldn't help, had to try it :) See this thread: http://forum.dead-code.org/index.php?topic=639.0
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.105 seconds with 24 queries.