Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How about going OpenGL?  (Read 699 times)

TiagoTiago

  • Bay Watcher
    • View Profile
How about going OpenGL?
« on: March 26, 2010, 12:14:18 am »

What do you think of rendering the map, tiles and all, into a texture applied to a mesh with about the same resolution of the tiles (or perhaps more), using the height map to deform the mesh, near clipping plane to cut mountains and other stuff above the current Z level, a slight paralaxing as  you move to other spots on the map, fog for stuff bellow the current Z level, OpenGL hardware accelerated lighting etc?
Logged
---
Notification emails don't always reach me, please let me know if you think it has happened (like if i don't reply a thread i'm expected to reply for more than a week)

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: How about going OpenGL?
« Reply #1 on: March 26, 2010, 12:45:14 am »

The game's already using OpenGL, I dunno about parallaxing or fog or anything working really well with ASCII stuff though.
Logged

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: How about going OpenGL?
« Reply #2 on: March 26, 2010, 12:55:24 am »

Yeah, it's already OpenGL, with Baughn's .40d# variants greatly improving on it. Parallaxing is a great potential way of ditching the current "1 Z-level at a time" viewmode, since it would simply extrapolate the current abilities of the engine, showing all visible layers below the current one on additional surfaces, properly scaled according to distance from the camera with very little extra effort required. Depth fog or other forms of shading are also possible - there was a great mockup video posted by someone that used alpha blending for this effect (IIRC), and it was very awesome. With some shader work, even depth of field would be possible for when there's stuff visible above the currently viewed level.

The lighting is something Toady already has planned, but whether or not it's going to be hardware-accelerated is a good question.

(edit: hrm. I just now realised that this is talking about hardware-accelerated shaders and dynamic lighting in a game that can be, essentially, played via TelNet. DF goes Beyond the Impossible even with the graphics.)
« Last Edit: March 26, 2010, 12:57:27 am by Sean Mirrsen »
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

sweitx

  • Bay Watcher
  • Sun Berry McSunshine
    • View Profile
Re: How about going OpenGL?
« Reply #3 on: March 26, 2010, 10:46:49 am »

The lighting is something Toady already has planned, but whether or not it's going to be hardware-accelerated is a good question.

(edit: hrm. I just now realised that this is talking about hardware-accelerated shaders and dynamic lighting in a game that can be, essentially, played via TelNet. DF goes Beyond the Impossible even with the graphics.)
Well, most rogue-like game has lighting system implemented (namely, any tile that has LOS to the light source is lit).  However, most rogue-like don't have 3D maps.
Logged
One of the toads decided to go for a swim in the moat - presumably because he could path through the moat to my dwarves. He is not charging in, just loitering in the moat.

The toad is having a nice relaxing swim.
The goblin mounted on his back, however, is drowning.

TiagoTiago

  • Bay Watcher
    • View Profile
Re: How about going OpenGL?
« Reply #4 on: March 26, 2010, 10:08:42 pm »

taking advantage of the GPU processing power for lighting should make lighting not have such a huge effect in the performance
Logged
---
Notification emails don't always reach me, please let me know if you think it has happened (like if i don't reply a thread i'm expected to reply for more than a week)

TiagoTiago

  • Bay Watcher
    • View Profile
Re: How about going OpenGL?
« Reply #5 on: March 26, 2010, 10:16:21 pm »

Btw, for the stuff above the current Z level, cutting the mesh with the near clipping plane would better reflect how things are nowadays with us being able to see inside mountains and stuff.

Though perhaps things could be made pseudo-volumetric, with several layers, one for each Z level, but each layer would also have it's own height map (water depth/height, ramps, plants, constructions etc), with the parts without surface (free air and solid areas inside the terrain) transparent, this might allow for the different Z levels to touch each other (like in the transitions for ramps, rivers going down etc).

Perhaps it would be good to have control of at how many Z levels above the current position the near clipping plane would be to allow people to choose to see above instead of inside when desired.
Logged
---
Notification emails don't always reach me, please let me know if you think it has happened (like if i don't reply a thread i'm expected to reply for more than a week)

TiagoTiago

  • Bay Watcher
    • View Profile
Re: How about going OpenGL?
« Reply #6 on: March 27, 2010, 11:37:50 am »

Btw, using the volumetric approach, it should also be possible to have orthogonal points of view, looking from the sides instead of just from above (perhaps switching the navigation keys around so you still have things move on the screen the same way, basicly swapping the Z level keys with the north/south keys), geometry wouldn't connect as easily, but it would be quite useful, specially with paralaxing.

edit: you can even have a very basic navigation mode, were you move fwd and back, turn to the sides in 90 degrees increments and move up and down
« Last Edit: March 27, 2010, 11:39:57 am by TiagoTiago »
Logged
---
Notification emails don't always reach me, please let me know if you think it has happened (like if i don't reply a thread i'm expected to reply for more than a week)