Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old December 8, 2011, 01:23   #1
buzzkill
Prophet
 
buzzkill's Avatar
 
Join Date: May 2008
Location: Indiana, USA
Posts: 2,939
Donated: $8
buzzkill is on a distinguished road
Masking and layering terrains

I'm working on the NPP 32x32 tile set right now. NPP has a lot of terrains. NPP also has terrains which, in theory, could set upon another terrain. Right now all we can do is have a terrain type such as a tree, or a rock ,which has to be drawn on a static background terrain which works OK most of the time, but could be improved by allowing the splitting the terrain feature from the terrain flooring that it is placed upon.

It would be nice if we could mask and layer multiple terrain types the same way we do with items or monsters (upon terrains). In this way we could have a tree upon a dirt floor, or a tree upon a grassy floor which is currently impossible short each instance of a tree being a unique terrain type.

In not proposing any game play changes at this time (not that it couldn't happen). The dominant terrain alone would continue to dictate the rules that govern a particular grid. What I'm suggesting is a purely cosmetic change, to make the dungeon look nicer, much nicer.

While this wouldn't have much impact on V (no terrains) or ASCII players (no tiles), there are a *lot* of variants that use terrains that could benefit from this. Does anybody else think that this has any merit, or I am just barking at the moon?

ALSO on a related note. It would be wonderful if the game could shade out-of-LOS (torch lit, etc.) tiles itself instead of someone having to draw 3 of every tile. I know we've had this discussion before, and an opinion was formed that the artist should be allowed to shade tiles to his own tastes, but I gotta tell you, it's more trouble than it's worth. 99% of the time I just scale the brightness a bit, the same way Angband.exe could/would. If we could leave the degree of shading up to the user, all the better... and then we'd be able to shade monsters too, though I don't know what that gains us.

Anyone hear from Shockbolt lately?
__________________
www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
My banding life on Buzzkill's ladder.
buzzkill is offline   Reply With Quote
Old December 8, 2011, 02:27   #2
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Short version:
I would like to see this as well, but I don't see it happening before the CoreUI split.

Long version:
Personally, I would like to see something like the grid_data structure passed to a platform hook function, and let the platform draw the whole grid point as it wants to, so it could build and draw a terrain chain with tiles, or just draw the top terrain with ascii/fonts. But given that what is stored in the terminal grid are the visuals, whether it is a map grid or line of text, there would need to be a major rewrite, which seems to already be intended for the coreui spilt.
Blue Baron is offline   Reply With Quote
Old December 8, 2011, 09:21   #3
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Personally I'd use the word "terrain" to mean the underlying ground, and refer to trees / rubble / statues / anything else as features on the terrain.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old December 8, 2011, 16:10   #4
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
NPP already has coding support for this. Angand essentially has 3 layers to its dungeon. One for terrain, one for objects, and one for monsters/player.

NPP has a fourth that most of the core suport to make it work. It is currently used for effects. This is where clouds, and other lingering effects are stored. They can stack, like objects, so you can have up to 24 effects on one space, in addition to the terrain.

NPP also breaks out being able to move through a terrain, see through a terrain, and project (eg cast spells or fire arrows) through a terrain, and it factors the effects layer of the dungeon when deciding whether any of these three actions are possible. So most of what you envision below is already implemented.

It would be a trivial task to make things like trees or rocks an effect rather than terrain. We already did this with traps. We started to do this with doors as well, but in the end we didn't see much point since doors are always over a standard dungeon floor rather than sand dunes or pits of lava.

Currently, in terms of displaying the contents of a square on-screen, effects on a square take priority over the terrain iteself. It would take some major changes to the core code to blend terrain and effects into a single display or tile for a particular squrae. Is that what you are hoping can be accomplished with the mask?
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
nppangband is offline   Reply With Quote
Old December 8, 2011, 21:45   #5
buzzkill
Prophet
 
buzzkill's Avatar
 
Join Date: May 2008
Location: Indiana, USA
Posts: 2,939
Donated: $8
buzzkill is on a distinguished road
Quote:
Originally Posted by nppangband View Post
Currently, in terms of displaying the contents of a square on-screen, effects on a square take priority over the terrain itself. It would take some major changes to the core code to blend terrain and effects into a single display or tile for a particular square. Is that what you are hoping can be accomplished with the mask?
Nothing that involved. All I wanted to do is be able to draw a rock or a tree or a flower (properly masked) without having to draw a backgound behind it. The background will be entirely separate from it. It just for cosmetics.

Q: If the terrain features such as trees became effects, wouldn't monsters get hidden under them (like cloud effects), or is that adjustable?

Quote:
We started to do this with doors as well, but in the end we didn't see much point since doors are always over a standard dungeon floor rather than sand dunes or pits of lava.
But trees could be placed on a variety of terrains, and rocks (and other things as well) even more so.

Just hit a forest level with the comp character. Fun. Trying to figure out how to draw NPP style trees with adjacent branches that somehow tile properly, not so much fun. I'm not even sure if it's possible
__________________
www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
My banding life on Buzzkill's ladder.
buzzkill is offline   Reply With Quote
Old December 8, 2011, 23:20   #6
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Quote:
Originally Posted by buzzkill View Post
Nothing that involved. All I wanted to do is be able to draw a rock or a tree or a flower (properly masked) without having to draw a backgound behind it. The background will be entirely separate from it. It just for cosmetics.

Q: If the terrain features such as trees became effects, wouldn't monsters get hidden under them (like cloud effects), or is that adjustable?
No, Monsters have top priority, then objects, then effects, then terrain. The only reason you don't see the monsters in cloud effects is if you can't see through the cloud effects, so the monster loses the "visible" flag.


Quote:
Originally Posted by buzzkill View Post
But trees could be placed on a variety of terrains, and rocks (and other things as well) even more so.

Just hit a forest level with the comp character. Fun. Trying to figure out how to draw NPP style trees with adjacent branches that somehow tile properly, not so much fun. I'm not even sure if it's possible
I don't think so, without some re-working of the source and terrain.txt I would need to have 8 individual branch terrains, one heading out in each of the 8 directions. Then the tree generation code would need some re-working, so it slelects the terrain type that points that direction.
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
nppangband is offline   Reply With Quote
Old December 9, 2011, 00:10   #7
buzzkill
Prophet
 
buzzkill's Avatar
 
Join Date: May 2008
Location: Indiana, USA
Posts: 2,939
Donated: $8
buzzkill is on a distinguished road
Quote:
Originally Posted by nppangband View Post
I don't think so, without some re-working of the source and terrain.txt I would need to have 8 individual branch terrains, one heading out in each of the 8 directions. Then the tree generation code would need some re-working, so it slelects the terrain type that points that direction.
I think that I'm going to settle for trees and branches being distinct and recognizable, even if they don't form a cohesive 'tree'. We'll just going to have to use our imaginations extra hard on this one.
__________________
www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
My banding life on Buzzkill's ladder.
buzzkill is offline   Reply With Quote
Old December 9, 2011, 01:32   #8
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,369
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by nppangband View Post
NPP already has coding support for this. Angand essentially has 3 layers to its dungeon. One for terrain, one for objects, and one for monsters/player.

NPP has a fourth that most of the core suport to make it work. It is currently used for effects. This is where clouds, and other lingering effects are stored. They can stack, like objects, so you can have up to 24 effects on one space, in addition to the terrain.
If it's a contest, I have 5
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old December 9, 2011, 14:44   #9
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Quote:
Originally Posted by Nick View Post
If it's a contest, I have 5
It *IS* a contest. And I am going to head straight home after work and add two more layers so I can re-claim tactical superiority.

The way NPP tackles that issue is each terrain has instructions for how it gets affected by various elements, so if you cast fireballs at some ice it will eventually melt into water. But it is also used during dungeon generation to let things like trees and water spread to surrounding terrains (all based on the terrain code in Unangband).
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
nppangband is offline   Reply With Quote
Old December 9, 2011, 15:10   #10
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,024
Derakon is on a distinguished road
Quote:
Originally Posted by nppangband View Post
It *IS* a contest. And I am going to head straight home after work and add two more layers so I can re-claim tactical superiority.
Screw it, we're going to five blades.
Derakon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug Report: Graphics not masking Blue Baron Development 12 July 7, 2011 16:20


All times are GMT +1. The time now is 13:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.