Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old October 6, 2020, 18:01   #181
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,806
PowerWyrm is on a distinguished road
Commit a6f0b32 plugs some memory leaks, but "centre" (which is created first) is still not freed in two cases:
- persistent levels
- failure to create caverns

Edit: nevermind, there's a pull request already doing this...
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

Last edited by PowerWyrm; October 6, 2020 at 18:11.
PowerWyrm is offline   Reply With Quote
Old October 6, 2020, 18:31   #182
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,806
PowerWyrm is on a distinguished road
For gauntlet levels, you get up stairs to the left with no-teleport squares and down stairs to the right, which makes you cross the labyrinth to get to the next level. Except when you arrive from the level below, a down staircase is generated at the player's position, which breaks the purpose of the level, since you can immediately go down again. Maybe make the player enter from the right side in that case?
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old October 6, 2020, 22:19   #183
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,509
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by PowerWyrm View Post
For gauntlet levels, you get up stairs to the left with no-teleport squares and down stairs to the right, which makes you cross the labyrinth to get to the next level. Except when you arrive from the level below, a down staircase is generated at the player's position, which breaks the purpose of the level, since you can immediately go down again. Maybe make the player enter from the right side in that case?
That's a good idea.
__________________
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 October 7, 2020, 17:48   #184
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,806
PowerWyrm is on a distinguished road
Big problem with gauntlet levels:

Code:
int gauntlet_hgt = 2 * randint1(5) + 3;
int y_size = z_info->dungeon_hgt * gauntlet_hgt / (15 + randint1(5));
Works fine since this will give a vertical size of z_info->dungeon_hgt * (5-13)/(16-20).
(although I think this gives too many "flat" levels)

Code:
int gauntlet_wid = 2 * randint1(10) + 19;
int x_size = z_info->dungeon_wid * gauntlet_wid / ((30 + randint1(10)) * 2);
This gives an horizontal size of z_info->dungeon_wid * (21-39) / (62-80), which can go up to z_info->dungeon_wid * 39/62 = 62% of the dungeon width for each cavern part. Add the labyrinth and you get dungeon levels that often extend past the maximal width allowed and of course will crash if you go too far right...
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old October 7, 2020, 21:56   #185
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,509
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by PowerWyrm View Post
This gives an horizontal size of z_info->dungeon_wid * (21-39) / (62-80), which can go up to z_info->dungeon_wid * 39/62 = 62% of the dungeon width for each cavern part. Add the labyrinth and you get dungeon levels that often extend past the maximal width allowed and of course will crash if you go too far right...
That's embarrassing. I'll have to rethink my dimensions.
__________________
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 October 8, 2020, 15:42   #186
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,806
PowerWyrm is on a distinguished road
For lair levels, the generation of "pit" monsters in the lair doesn't work well, it picks pit monsters but stops in the middle and generates random mobs instead. This is probably due to calling mon_restrict(NULL) in the middle of monster generation which resets the type of mobs generated.

Edit: not a problem with calling mon_restrict(NULL), I've tracked those calls and it's not the case. Must be a call to get_mon_num_prep(NULL) then.

For example: choosing an "archer" pit starts to generate rangers, orc archers and co, then after generating a scout it goes time vortex/troll chieftain/shimmering mold...

Edit: found the reason, it's because some mobs have "friends-base" flag which erases the type used in mon_restrict(). In the example above, the scout generated with the "archer" type will generate "person" friends and then the following calls will be made with NULL parameter.

To fix this, a call to mon_restrict() with the pit type has to be made after each call to pick_and_place_monster() in spread_monsters().
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

Last edited by PowerWyrm; October 8, 2020 at 16:05.
PowerWyrm is offline   Reply With Quote
Old October 8, 2020, 17:19   #187
Huqhox
Adept
 
Huqhox's Avatar
 
Join Date: Apr 2016
Age: 50
Posts: 137
Huqhox is on a distinguished road
Quote:
Originally Posted by PowerWyrm View Post
For lair levels, the generation of "pit" monsters in the lair doesn't work well, it picks pit monsters but stops in the middle and generates random mobs instead. This is probably due to calling mon_restrict(NULL) in the middle of monster generation which resets the type of mobs generated.

Edit: not a problem with calling mon_restrict(NULL), I've tracked those calls and it's not the case. Must be a call to get_mon_num_prep(NULL) then.

For example: choosing an "archer" pit starts to generate rangers, orc archers and co, then after generating a scout it goes time vortex/troll chieftain/shimmering mold...

Edit: found the reason, it's because some mobs have "friends-base" flag which erases the type used in mon_restrict(). In the example above, the scout generated with the "archer" type will generate "person" friends and then the following calls will be made with NULL parameter.

To fix this, a call to mon_restrict() with the pit type has to be made after each call to pick_and_place_monster() in spread_monsters().
Nice find

This kind of bug is why I both love and hate programming in equal measure...
__________________
"This has not been a recording"
Huqhox is offline   Reply With Quote
Old October 8, 2020, 22:15   #188
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,509
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by PowerWyrm View Post
Edit: found the reason, it's because some mobs have "friends-base" flag which erases the type used in mon_restrict(). In the example above, the scout generated with the "archer" type will generate "person" friends and then the following calls will be made with NULL parameter.

To fix this, a call to mon_restrict() with the pit type has to be made after each call to pick_and_place_monster() in spread_monsters().
Thanks for all the stuff you have done/are doing on the special levels. I've worked on them in bursts over a few years, so the code is a bit uneven.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick 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
Reviving Iso-Angband, an isometric view addon for Angband Hajo Development 111 August 3, 2014 20:44


All times are GMT +1. The time now is 07:21.


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