Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - SomeGuy

Pages: 1 ... 3 4 [5]
Other Announcements / RL map ASCII symbols for uncommon objects
« on: December 19, 2012, 10:03:46 AM »
Hi there.

I would like to ask to the community about opinion for different ASCII symbols for uncommon objects in the map.
I will be using the typical symbols for common items in Nethack or Rogue:
# Walls
· floor (the high point, not the common point)
) weapons
! potions
[ armors
% food / corpses
? scrolls
! potions
= rings and jewelry
* gems
$ gold

Monsters use letters as usual.

But within my RL there are some items that there not appear in other RLs, so I would thank some ideas on good ASCII (preferably NOT unicode) symbol for it.

The items are:

- A Map-to-Map teleport : it is not a pickable item. When the player walks in, it gets teleported to another level. It is basically stairs down, with the only difference that once the player gets to the new level, there is no way back.

- A Cell-to-Cell teleport: the same as before, but it teleports to another place in the same map. I need this to use a different symbol to the previous one, so the player know what type of teleport is.

- Enchanting Shrine: it's a map cell, again, not pickable. When the player walks in it gets some magical effects. I think I could use here the Nethack's shrine symbol, but maybe there is another one that could be more exciting xD

- Arrows: the player can use a bow. Arrows are limited and they can be scarcely found. I'm not sure the symbol that is commonly used, or even if there is one. I think something like | or / or \ could be ok...

- Throwing axes: same as Arrows, but I would like it to have a different symbol that is easy to understand and not get confused with arrows. I would say that / for arrows and \ for axes would be ok?

- Shield: I think I saw a RL with shields but I'm not sure. Whatever, which symbol would fit it well? Actually I want shields to have different symbols than armor since shields work different than in other RLs and are not really equipped as in other RL's

- Other misc decorative items that are not that important: Fire brazier, Wooden Barrel, Medieval Torture table (something like you see in Braveheart)

I would prefer to use symbols instead of letters because monsters are already letters and it can lead to confusion.

Thanks a lot.

Programming / Re: How to make monster pathfinding to work realistic?
« on: December 16, 2012, 05:39:42 PM »
I think you may get uninteresting results if you simply lighten weights on occupied tiles. What if the player ran away? If the kobold took an alternative path, he might cut off the player's escape route.

There are some cool ways to govern these sort of things- Expectimax or Minimax are very simple and might yield interesting results if you can keep your branching factor really low. Markov Models could also do well- though Monte Carlo is the way of the future. If you're sticking with simple reflex agents, then weighting the map is going to get you the result you want, but I would seek something a little more sophisticated.

That sounds great. I didn't take a look at *max algos.
But definitely, when finish other parts of the game, I will be tweaking everyting. I want to implement some more advanced pathfinding method, and the ones you suggested are the first I'm gonna take a look.


Programming / Re: How to make monster pathfinding to work realistic?
« on: December 15, 2012, 07:32:57 PM »


Thanks for both answers they gave me the idea on how to solve it.

  When choosing a path don't count monsters as blocking. Makes them less smart but more realistic.

Actually I changed the initial behavior.

I solved the thing as follows. It's not the most elegant way. but it's good for keep things working in a simple and quite realistic way:

FIRST: I calculate a normal route for monsters, using the usual game  map, where # is blocking and · is walkable.
SECOND: monsters are not taken into account as blocking elements (as Jo suggested)
THIRD: before a monster moves to the next cell in the route, the game checks if there is another monster in such cell. If there is nothing, then just move to the new cell. But if there is a monster, then execute another algorithm that calculates an alternate route, but this time, using a different blocking map, where other monsters are basically walls. With that new route, the monster will calculate the shortest distance to the player again, but without having into account the route weight as Quendus suggested (btw I'm going simple). Actually the behaviour I found when testing this is that monsters tend to surround the player, so, for example, in open areas like rooms, they simply avoid monsters that are attacking the player.

I know it's quite simple and can make monsters to use stupid routes in certain situations. I'm not interested in Smart Kobold, but this method is quite decent for some simple initial AI.

Programming / How to make monster pathfinding to work realistic?
« on: December 15, 2012, 10:11:10 AM »

I'm creating some roguelike but I have a little problem with monster pathfinding.

Actually, the algorithm I'm using works perfect and everything is ok.
The only problem I got is when the player is in a situation like this:

Here we have a thin corridor where the player and a Kobold are approaching, and in the other side, an Orc.

The Kobold can go straight and reach the player, but the straight path to the player is blocked for the Orc, so the pathfinding algo searches an alternative route.
This doesn't sound bad for this example since the 0rc can reach in little amount of turns the other side of the corridor, but I see here two problems:

- when the map is large and complicated the pathfinding algorithm searches a route that may require a lot of turns, which is quite dumb, and nobody will go for a long route if he can wait a couple of turns for the Kobold to die,
- If there is no alternate route, the Orc just stuck in place until the Kobold dies and the route is free.

So I want the Orc to move towards the player and just await behind the Kobold until this one dies rather than searching an alternate route if this alternate route if this route is too long, but also, use the alternate route if the distance to run is relatively short.

Any idea on how to do this?

Actually I'm using a Jump-Point pathfinding algorithm, so I'm not sure if there is some interesting tweak that it is recommended to do specifically for Roguelikes.
Also, I'm using a blockmap for the player and another for the enemies. (blockmap = array that contains the walkable tiles)
The enemies' blockmap has all walls and floors in the normal map, but also monsters here are represented by "#" too, so they are basically like walking walls, so the pathfinding is recalculated like if monsters were walls.

Thanks a lot.

Pages: 1 ... 3 4 [5]