Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old April 20, 2017, 14:02   #51
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,152
Donated: $40
Pete Mack is on a distinguished road
Those are pretty rare. I never keep them. (I do sometimes keep ESP mushrooms.) Deaths to umber hulks are just too rare to bother with--it's not like the original Rogue, where they were utterly deadly.
Quote:
Originally Posted by PowerWyrm View Post
This isn't an issue anymore now there are mushrooms of the clear mind.
Pete Mack is offline   Reply With Quote
Old April 21, 2017, 11:55   #52
PowerWyrm
Veteran
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 1,973
PowerWyrm is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
Those are pretty rare. I never keep them. (I do sometimes keep ESP mushrooms.) Deaths to umber hulks are just too rare to bother with--it's not like the original Rogue, where they were utterly deadly.
You need to keep them if you lack rConf, not really for Umber Hulks, but more for Ariel.
__________________
PWMAngband variant maintainer - check http://www.mangband.org/forum/viewforum.php?f=9 to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old April 21, 2017, 12:36   #53
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,152
Donated: $40
Pete Mack is on a distinguished road
You need them only if you decide to melee a monster that hits to confuse. Beyond some really weak monsters, that means Cat Lord, Ariel, Thuringwethil, high giants, nightmares, and ethereal dragons--the latter two of which an endgame strong fighter can kill even if confused. Not a real problem.
Pete Mack is offline   Reply With Quote
Old April 22, 2017, 04:03   #54
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,566
Donated: $60
Nick is on a distinguished road
The latest builds on the nightlies page now have the new pathfinding algorithm.

It will not be perfect.

My aim with this first attempt was to get the basic principles right, and then alter things as people notice things wrong with it. So please, report differences you're seeing, especially when monsters are doing dumb things.
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old April 23, 2017, 02:46   #55
t4nk
Adept
 
Join Date: May 2016
Posts: 249
t4nk is on a distinguished road
Quote:
Originally Posted by Nick View Post
The latest builds on the nightlies page now have the new pathfinding algorithm
Now that looks like how I expected pathfinding to work!
t4nk is offline   Reply With Quote
Old April 23, 2017, 03:45   #56
t4nk
Adept
 
Join Date: May 2016
Posts: 249
t4nk is on a distinguished road
Code:
 * The biggest limitation of this code is that it does not easily
 * allow for alternate ways around doors (not all monsters can handle
 * doors) and lava (many monsters are not allowed to enter lava).
 */
So you can build three heatmaps? If you want to speed it up, you can use one of those overly clever programming tricks For example:
Code:
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

typedef uint16_t heatmap_grid_type;

struct heatmap
{
	heatmap_grid_type **grids;
	heatmap_grid_type *underlying;

	int width;
	int height;
};

struct heatmap make_heatmap(int width, int height)
{
	assert(width > 0);
	assert(height > 0);

	struct heatmap heatmap = {
		.width = width,
		.height = height
	};

	const size_t access_size = sizeof(heatmap_grid_type *) * height;
	const size_t grids_size = sizeof(heatmap_grid_type) * height * width;

	char *mem = malloc(access_size + grids_size);
	assert(mem);

	heatmap_grid_type **access = (heatmap_grid_type **) mem;
	heatmap_grid_type *grids = (heatmap_grid_type *) (mem + access_size);

	for (int y = 0; y < height; y++) {
		access[y] = grids + y * width;
	}

	heatmap.grids = access;
	heatmap.underlying = grids;

	return heatmap;
}

void wipe_heatmap(struct heatmap *h)
{
	memset(h->underlying, 0,
			sizeof(*h->underlying) * h->width * h->height);
}

void free_heatmap(struct heatmap *heatmap)
{
	free(heatmap->grids);

	heatmap->grids = NULL;
	heatmap->underlying = NULL;
	heatmap->width = 0;
	heatmap->height = 0;
}

/* demonstration */

int main(int argc, char **argv)
{
	int width = 3;
	int height = 5;

	if (argc > 2) {
		width = strtol(argv[1], NULL, 0);
		height = strtol(argv[2], NULL, 0);
	}

	struct heatmap h = make_heatmap(width, height);

	wipe_heatmap(&h);

	for (int y = 0; y < h.height; y++) {
		for (int x = 0; x < h.width; x++) {
			printf("(%d, %d) == %d\n",
					x, y, h.grids[y][x]);
		}
	}

	putchar('\n');

	int i = 0;
	for (int y = 0; y < h.height; y++) {
		for (int x = 0; x < h.width; x++) {
			h.grids[y][x] = i++;
		}
	}

	for (int y = 0; y < h.height; y++) {
		for (int x = 0; x < h.width; x++) {
			printf("(%d, %d) == %d\n",
					x, y, h.grids[y][x]);
		}
	}

	free_heatmap(&h);

	return 0;
}
That eliminates intervening malloc's metadata and increases cache coherency; you also get to use memset() to wipe the heatmap (similar trick is used in ui-term.c).
t4nk is offline   Reply With Quote
Old April 23, 2017, 04:31   #57
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,566
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by t4nk View Post
Code:
 * The biggest limitation of this code is that it does not easily
 * allow for alternate ways around doors (not all monsters can handle
 * doors) and lava (many monsters are not allowed to enter lava).
 */
That was actually a bit of comment from FAangband that got left there accidentally

Thanks for the heatmap code, though, I'll likely use that.
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old April 25, 2017, 16:56   #58
Ingwe Ingweron
Veteran
 
Join Date: Jan 2009
Location: Manhattan Beach, CA
Posts: 1,432
Ingwe Ingweron is on a distinguished road
Quote:
Originally Posted by Nick View Post
The latest builds on the nightlies page now have the new pathfinding algorithm.

It will not be perfect.

My aim with this first attempt was to get the basic principles right, and then alter things as people notice things wrong with it. So please, report differences you're seeing, especially when monsters are doing dumb things.
Monsters have seemingly become significantly dumber. For example, in a moated dragon pit, @ just sat in the far corner of the moat from the door and could lead the big D's out singly or in pairs. Even though the room was lighted and monsters were awake, they didn't come streaming out the door to mob the @. They just sat in their room, apparently sniffing the scent of @, but having no idea how to exit the room to find him.
__________________
“We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see.”
― Tom Stoppard, Rosencrantz and Guildenstern are Dead
Ingwe Ingweron is offline   Reply With Quote
Old April 25, 2017, 18:59   #59
t4nk
Adept
 
Join Date: May 2016
Posts: 249
t4nk is on a distinguished road
Quote:
Originally Posted by Ingwe Ingweron View Post
Monsters have seemingly become significantly dumber. For example, in a moated dragon pit, @ just sat in the far corner of the moat from the door and could lead the big D's out singly or in pairs. Even though the room was lighted and monsters were awake, they didn't come streaming out the door to mob the @. They just sat in their room, apparently sniffing the scent of @, but having no idea how to exit the room to find him.
Hmm, maybe that's because monsters are basically deaf? Dragons have hearing 20 (see monster.txt), so they can only hear the player from 20 - SKILL_STEALTH grids away.
t4nk is offline   Reply With Quote
Old April 25, 2017, 21:15   #60
Ingwe Ingweron
Veteran
 
Join Date: Jan 2009
Location: Manhattan Beach, CA
Posts: 1,432
Ingwe Ingweron is on a distinguished road
Quote:
Originally Posted by t4nk View Post
Hmm, maybe that's because monsters are basically deaf? Dragons have hearing 20 (see monster.txt), so they can only hear the player from 20 - SKILL_STEALTH grids away.
But, don't dragons have excellent sense of smell?
__________________
“We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see.”
― Tom Stoppard, Rosencrantz and Guildenstern are Dead
Ingwe Ingweron 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
YAWP: My first ever win, quickly followed up by finding The One Ring on DLVL 104! fruviad AAR 3 January 2, 2017 22:39
Finding a solution to ID Nick Vanilla 51 April 3, 2014 02:18
Path of Exile? HallucinationMushroom Idle chatter 68 December 2, 2013 14:11
Path to target request juggle5 Vanilla 9 May 17, 2011 13:07
Does Entroband reward one with experience for finding awesome items? BlackFlame Variants 3 February 18, 2010 07:28


All times are GMT +1. The time now is 15:33.


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