Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate
FLARE [ARCHIVED]

Nox-like line of sight ?

b0rsuk
Saturday, March 12, 2011 - 05:03

Hey.

One thing I [b]really[/b] like about Nox is the line of sight feature. You can't see things behind walls. Even things behind doors if doors are closed. Actually not just thing - you can see nothing around the corner, black area.

I think it makes the game look much more interesting (and atmospheric). I would link two youtube videos, but I don't know an obvious way to do that without my post being marked as spam. How do I do that ?

Does it sound doable to implement a similar feature in FLARE ?

  • Log in or register to post comments
Clint Bellanger
joined 15 years 9 months ago
Saturday, March 12, 2011 - 07:55
Clint Bellanger's picture

I think about this often!

At first I wanted to implement a primitive tile-based light system like Diablo 1 had.  That's easy code-wise, except that I don't have a function in SDL to blit a given sprite darker.  It's possible I can find an advanced blit addon for SDL that can help here.

To do high-quality lighting requires some 3D data, even if using pre-rendered 2D sprites.  Example, it would help to have a very rough outline of objects and do some sort of raycasting to separate light and shadow.

Probably there are good articles out there about efficient ways to implement this.  I'm in favor of trying it.

  • Log in or register to post comments
b0rsuk
joined 14 years 3 months ago
Saturday, March 12, 2011 - 08:55

Vision in Nox is quite unique (for a roguelike player) because it looks quite precise, a line is drawn from each corner of a tile. And it changes very dynamically, even when doors are opened and closed. In comparison, roguelike algorithms generally work on a per-tile basis. Vision in Nox is much more fine-grained.

I can't post the link - RogueBasin is a website (wiki) dedicated to development of roguelike games. It has a bunch of articles about FOV, even some new (amateur) research.

If you could pull this off, it would be great. It's more than just atmospheric/flavor. It would be very fun in multiplayer for sneaking on other players, and in single player it allows to create more action-packed levels, because you can't see all monsters from afar !

This is a wild guess, but perhaps - if implemented intelligently - it could even improve performance ? I mean, if you don't even have to draw most of stuff that's farther away...

  • Log in or register to post comments
Anonymous (not verified)
joined 0 sec ago
80.121.97.27
Tuesday, March 6, 2012 - 14:56

Hi there, i always liked that line of sight feature, so i dedicated my in game to it, heres a progress sample: marrtDOTelementfxDOTcom

  • Log in or register to post comments
mickey
joined 13 years 2 months ago
Tuesday, April 10, 2012 - 07:29

did you guys saw the anonymous' persons work - it actually does the effect pretty nicely. although its in 3D, i think its easier done in 3D and more feasible than just 2D.

  • Log in or register to post comments
Anonymous (not verified)
joined 0 sec ago
217.132.48.21
Sunday, May 6, 2012 - 14:01

@Clint - Not sure about what the best way to draw/blit this, but you can find the field of vision very quickly using the Bentley-Ottman algorithm - very simple and fast for the type of raycasting needed here. You could maybe even run on it on the isometric grid, and then blur the jagged light/shadow line somehow with prebuilt tile graphics.

Just my 2 cents, I'm just happen to be working on a javascript implementation of this.

  • Log in or register to post comments