Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 5, 2011, 05:35   #21
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 36
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by Shockbolt View Post
This should generate less work than my initial approach to the tileset...hopefully.

I'm also thinking of creating different player tiles for when the player is standing in the doorway (some of the player being blocked by the wall/doorway), it shouldn't be too hard to add this feature to the game
The way the current code works is that every square of Angband gets translated into a static graphic tile. Currently there are some cases where one ascii character (for instance @) gets mapped onto different tiles depending on game settings (character's gender and race, for instance). But changing which tiles get used for tiles that are currently all the same (for instance walls, and the permanent walls that get used in town) is definitely some work.

That said I think the work is worth doing.

One thing to consider when working on walls is how you would draw this dungeon using the 16 kinds of wall tiles I suggeseted:

Code:
+------------------+
|     # # ### #####|
|# #  ### # # #####|
|   #   # ### ## ##|
|## # # #     #####|
|     # # ### #####|
|# # # ## ###      |
| # # # # ###      |
+------------------+
(the +, | and - are used only to show the edges -- they should be empty tiles)

We should be able to generate this image just by pasting in your empty floor graphic tile and the 16 different wall tiles--this is how the game actually uses tiles. I suspect that having walls of varying thickness (for now) isn't going to work, but that it should be possible to give walls a somewhat 3D look like you did by figuring out whether they are "attached on" a side or not.

EDIT: I started working on a super simple 16x16 version of this in mtpaint and I'm worried that you need the diagonal connections to get this right.

EDIT2: Yeah, it's hard to get the 3D look you want without knowing about diagonal adjacency. Otherwise, it's hard to get these two cases done correctly for X:

Code:
+--+ +--+
|X#| |X#|
|# | |##|
+--+ +--+
In the first case, you want X to have a little bit from the lower right missing, since presumably you're going to have some angling/3D effect on the two adjacent walls. In the second case, you definitely don't want a bit missing from the lower right, because it needs to flow into the diagonally adjacent square.

However, I think you only care about diagonally adjacent walls when both of the compass directions are filled, meaning you don't need 256 wall tiles, but only 47 wall tiles (the base 16, plus an additional +1x4 tiles for the elbow cases (2/4 not in a line), an additional +3x4 for the cases for the tiles blocked on 3/4 sides, and +1x15 cases for the wall that is blocked on 4/4 sides). It's late and I might be tired, but I'm pretty sure this is mostly right.

I will try to finish up my simple graphics example and post it here.
__________________
linux->xterm->screen->pmacs

Last edited by d_m; January 5, 2011 at 06:14.
d_m is offline   Reply With Quote
Old January 5, 2011, 07:58   #22
Shockbolt
Knight
 
Shockbolt's Avatar
 
Join Date: Jan 2011
Location: Norway
Posts: 604
Shockbolt is on a distinguished road
Send a message via MSN to Shockbolt Send a message via Skype™ to Shockbolt
when pasting all the items, creatures and stuff to the tilemap, I'm guessing that I have to stick to an already fixed pattern? For example 2H-sword needs to be left of the Battleaxe, which need to be next to the dagger etc.

Could I just use the 32x32.bmp file in the graf folder and scale it up to 64x64 pixels, then add my own tiles ontop of the ones already in that one (removing the ones already there ofcourse)?

Last edited by Shockbolt; January 5, 2011 at 09:00.
Shockbolt is offline   Reply With Quote
Old January 5, 2011, 11:54   #23
Nomad
Knight
 
Nomad's Avatar
 
Join Date: Sep 2010
Location: England
Posts: 958
Nomad is on a distinguished road
Quote:
Originally Posted by Shockbolt View Post
Could I just use the 32x32.bmp file in the graf folder and scale it up to 64x64 pixels, then add my own tiles ontop of the ones already in that one (removing the ones already there ofcourse)?
That's basically what I did when I was making my 8x16 tileset. It's not necessary to keep the tiles in the same order, but if you change it you'll need to update the tile coordinates in the pref files. The ones used for the 32x32 David Gervais set are graf-dvg.prf (for features, monsters and most objects), flvr-dvg.prf (for the flavoured objects) and xtra-dvg.prf (special player tiles for race/class combinations). The tiles are numbered in hex code in y:x format, so the tile in the top left corner is at 0x80:0x80, the one to the right of it is 0x80:0x81, etc.

Unfortunately, tile dimensions are hard-coded and can't be changed just using pref files, so you need someone to code you an option to use 64x64 tiles. The only way you could test them in-game at the moment would be to shrink them down to half size and use them in place of the 32x32 tiles.
Nomad is offline   Reply With Quote
Old January 5, 2011, 14:54   #24
Shockbolt
Knight
 
Shockbolt's Avatar
 
Join Date: Jan 2011
Location: Norway
Posts: 604
Shockbolt is on a distinguished road
Send a message via MSN to Shockbolt Send a message via Skype™ to Shockbolt
Quote:
Originally Posted by Nomad View Post

Unfortunately, tile dimensions are hard-coded and can't be changed just using pref files, so you need someone to code you an option to use 64x64 tiles. The only way you could test them in-game at the moment would be to shrink them down to half size and use them in place of the 32x32 tiles.
I figured there would have to be some tweaking to the codes for the 64x64 tiles to work. Until someone voulenteers to do that, I'll continue to paint the tileset.
Shockbolt is offline   Reply With Quote
Old January 5, 2011, 15:26   #25
Shockbolt
Knight
 
Shockbolt's Avatar
 
Join Date: Jan 2011
Location: Norway
Posts: 604
Shockbolt is on a distinguished road
Send a message via MSN to Shockbolt Send a message via Skype™ to Shockbolt
Quote:
Originally Posted by d_m View Post

(the +, | and - are used only to show the edges -- they should be empty tiles)

We should be able to generate this image just by pasting in your empty floor graphic tile and the 16 different wall tiles--this is how the game actually uses tiles. I suspect that having walls of varying thickness (for now) isn't going to work, but that it should be possible to give walls a somewhat 3D look like you did by figuring out whether they are "attached on" a side or not.

EDIT2: Yeah, it's hard to get the 3D look you want without knowing about diagonal adjacency. Otherwise, it's hard to get these two cases done correctly for X:

Code:
+--+ +--+
|X#| |X#|
|# | |##|
+--+ +--+
In the first case, you want X to have a little bit from the lower right missing, since presumably you're going to have some angling/3D effect on the two adjacent walls. In the second case, you definitely don't want a bit missing from the lower right, because it needs to flow into the diagonally adjacent square.

However, I think you only care about diagonally adjacent walls when both of the compass directions are filled, meaning you don't need 256 wall tiles, but only 47 wall tiles (the base 16, plus an additional +1x4 tiles for the elbow cases (2/4 not in a line), an additional +3x4 for the cases for the tiles blocked on 3/4 sides, and +1x15 cases for the wall that is blocked on 4/4 sides). It's late and I might be tired, but I'm pretty sure this is mostly right.

I will try to finish up my simple graphics example and post it here.
I'm not exactly sure what 16 tiles You refer to for the standard walls, do they include all 3 shade versions of each tile?

Can the dungeon be rendered using only two (or three tile types) as in my second version posted instead of the 3D'ish first version at the beginning of this thread? I've put together a better example that show the new wall tiles and how they are put together, I even used one of Your examples from a previous reply

When I wrote 3 tiles, I was referring to a third wall tile that really isn't needed, but can be there for an added "3D feel", as that tiletype partially hides the player behind it. See the left most part in the attached image to this reply.

Edit: For the filler wall tile(wall tile 1) You'd have to code into the game that it'd have to be replaced by tile 2, once the tile type 2 was tunelled away infront of it, if You know what I mean.


Last edited by Shockbolt; April 15, 2014 at 19:38.
Shockbolt is offline   Reply With Quote
Old January 5, 2011, 15:39   #26
EpicMan
Swordsman
 
Join Date: Dec 2009
Location: Dallas, Texas, USA
Posts: 303
EpicMan is on a distinguished road
Those look sweet! I'm also a diehard ASCII player, but I would switch to those tiles in a heartbeat.
EpicMan is offline   Reply With Quote
Old January 5, 2011, 15:57   #27
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 36
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by Shockbolt View Post
Can the dungeon be rendered using only two (or three tile types) as in my second version posted instead of the 3D'ish first version at the beginning of this thread? I've put together a better example that show the new wall tiles and how they are put together, I even used one of Your examples from a previous reply
Yeah, if you don't need the horizontal perspective then we can use many fewer tiles. I think this would be a lot more feasible to do and it still looks nice!

Right now the game can't use two tiles on one square (for instance, to hide the player like you suggested). It's a neat idea but I'd rather stick to something simpler at first.

So yeah, as long as you can represent a verticle line of three walls, two walls, and a wall standing by itself we should be fine.

EDIT: I had something about needing a different graphic for a pillar. I'm not sure we do although it might be nice to have.

EDIT2: The one sort of confusing thing is that if you have two walls which are diagonal you can move between them. The horizontal perspective is nice in that we could make it obvious that there is space, but having to make 47 tile images would be really thankless.
__________________
linux->xterm->screen->pmacs

Last edited by d_m; January 5, 2011 at 16:03.
d_m is offline   Reply With Quote
Old January 5, 2011, 16:20   #28
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 7,843
Derakon is on a distinguished road
I'm telling ya, OpenGL. Just whip up a wall texture and describe the geometries of the different wall configurations and you're good to go.
Derakon is offline   Reply With Quote
Old January 5, 2011, 16:30   #29
Nomad
Knight
 
Nomad's Avatar
 
Join Date: Sep 2010
Location: England
Posts: 958
Nomad is on a distinguished road
The graphic pref files actually already include entries for four different types of wall tiles, labelled 'basic', 'inner', 'outer' and 'solid'. It looks like only the 'basic' type are ever actually generated by the game at present, but the others do have numbers and can be assigned graphics, so I guess it was intended at some point to implement a similar sort of four-tile system.

I think the Nethack wall tiles use a four-tile system, where you've got horizontal walls, vertical walls, and 'front' and 'back' corner blocks, like so:

Code:
B-----B
|     |
|     |
F-B B-F
  | |   
  | |
Nomad is offline   Reply With Quote
Old January 5, 2011, 17:12   #30
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,820
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Nomad View Post
The graphic pref files actually already include entries for four different types of wall tiles, labelled 'basic', 'inner', 'outer' and 'solid'. It looks like only the 'basic' type are ever actually generated by the game at present, but the others do have numbers and can be assigned graphics, so I guess it was intended at some point to implement a similar sort of four-tile system.

I think the Nethack wall tiles use a four-tile system, where you've got horizontal walls, vertical walls, and 'front' and 'back' corner blocks, like so:

Code:
B-----B
|     |
|     |
F-B B-F
  | |   
  | |
Those walls are used by dungeon generation and then discarded, I'm afraid... nothing to do with tiles!
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Reply

Tags
angband, graphic, graphics, tileset


Currently Active Users Viewing This Thread: 3 (0 members and 3 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
OSX Tileset help? ZorroRoaster Variants 1 March 31, 2009 00:09
Tileset formats? caduceus Vanilla 8 April 23, 2008 23:44


All times are GMT +1. The time now is 05:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.