Monster stackability

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Monster stackability

Post by Joramun »

Is it possible to have some monsters "tolerate" others on their tile ?
With three variants :
- stacking (of the same monster up to 5 or 9 on the same tile)
- tolerance (one monster accepts some monster type on its tile, with possible restrictions on position, though)
- walkability (a monster lets other cross its tile, but not stay on it)

Like :
- water elementals stacking and accepting flying creatures over them
- ghosts/rives stacking and accepting any creature on their tile
What Is Your Quest ?
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

I was wondering :
how about monsters that are, let's say 2 squares long, e.g a snake
or
monsters that are 2x2squares?(big dragon or toad thing)
the wide creatures should have problems with corridors becauser
they are 1.5 to 2 times larger,
thus there should be a way to prevent them from entering a corridor.
(if you split the creature into 4 single creatures that may only move simultaneously
in one direction and then display some kind of overlay graphic could work?)

I don't know what role a 2x2 creature would actually play in the game?? Is that needed?

Toleration of different monsters on a tile is maybe a bid of a delicate matter .
Sometimes it is good that flying monsters cannot pass e.g. water puddles.
Imagine the water puddle attacks , and a wasp is flying above it..does the wasp take damage? Could be cool , but I am just saying I fear for game balance and it should be tested .
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

In fact, DSB almost tolerates 5 monsters on the same tile.
The monster wouldn't damage each other, because they are targeting the party anyway.
My question is related to one of the monsters I'll implement in my very own test dungeon.

But having a multiple tile monster is not quite possible...
What Is Your Quest ?
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

almost tolerates 5 monsters this sounds...strange!! ;)

well, maybe it should not be a "problem" to make a mirror monster that mimics every step
of the first one after less of 1/4 th of a second ? like one monster following the other?
if either of them dies , both die? only the leading monster attacks..
would be the snake monster type

You know mirror image , a spell form d&d? have the standard monster, and 2 followers,
one ghost blue the other one a light blue or so..
Image
Image

Would be cool to have s.th. like that .. a monster that has a ghost part (follower) and a real part..
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

By almost, I mean that actually, the core engine supports 5 monsters on the same tile, but the monster's "pathfinding&collision detection" forbids monsters to walk on an occupied tile.

As for a monster with a ghost counterpart, it depends on exactly what you want to do...

Currently the Artificial Intelligence of DSB emulates DM with a trick :
- in O DM, monsters created on the same tile are considered as ONE monster in terms of movement : they cannot split and also monsters cannot join others.
- in CSBwin, I don't know really. Conflux seems to have some freedom in this respect, but it looks like it's a trick.
- in RTC, monsters are totally free to move in and out of an occupied tile, as long as there is room on the tile
- in DSB, monsters are theoretically free BUT :
* monsters are not allowed to join a group (this a behavioral restriction, not an engine one) i.e. when they want to step on a tile, they check if there are monsters on it, and change their mind if there are indeed.
* multiple monsters on the same tile have a "boss", which is the only one to decide of movements. The "underlings" can just follow him, and move around on the tile.
* The trouble is I don't know how the boss is "elected", and to keep things under control, it would probably require a function to tell DSB which monster has priority as a boss, or if you want to disable the boss feature for some monsters.


So basically, your ghost idea is possible by allowing different monsters types on the same tile, but keeping the "boss" idea.
But you'd have to be able to specify which monster is the boss, because otherwise, you'll have problems with movement speed, detection range etc. (if your monsters are different in those respects)
If you want the ghost to die if the boss dies, it is already possible with a small piece of code.
What Is Your Quest ?
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

basically I was refering to 2 monsters acting as one. They are not on the same tile.not on the same dungeon square. I
They form a row of 11/2 to 2 or 21/2 or 3 squares.
You would have to think about these monsters as one,
effectively having a 2 dungeon squares long and one dungeon square broad creature.
(for 2 monsters)
anyway. you could as well think of parts. The leading monster in front of the Party is the head of the snake. The monster , 2 dungeon squares away from the party is part 2 of the snake monster.
basically , a boss that exceeds the confinements of a single tile.*effectively rendering the subdued monster useless(they just follow)
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Joramund wrote:monsters are not allowed to join a group (this a behavioral restriction, not an engine one) i.e. when they want to step on a tile, they check if there are monsters on it, and change their mind if there are indeed.
This isn't quite right. Did you mean "monsters are not allowed to join a group of monsters of a different type than they are"? Because that's how it really works. :)
Joramund wrote:The trouble is I don't know how the boss is "elected", and to keep things under control, it would probably require a function to tell DSB which monster has priority as a boss, or if you want to disable the boss feature for some monsters.
It's more or less random: The first monster on a tile with no boss declares itself the boss, and all of the other monsters fall into line.

Right now it's possible to know who is a monster's boss with dsb_ai_boss but this can't be changed or anything. Perhaps I should open this up a bit... though I'm wondering what being able to directly change the boss would do for you.
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Conflux: It's a trick, just a complex one to pull off! When a monster group wishes to move, then the group is actually split into two occasionally, so a brand new screamer and a brand new smaller screamer group say will exist.

2-square monsters: Must admit, I tried this trick in an earlier RTC for a dragon - the idea being it's tail occupied a separate square and could swing around to knock the party around. The trick was to have a pillar and teleports on each potential tile, but at the time a monster could not activate a pad based on it's direction

Anyway, yes, this more than one square monster is certainly somethign that has been cnsidered before!
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

In DSB you'd not need to go through all of the trouble of pillars and teleports, as you could automatically move the monster's "tail" around when the front moved via scripts, but it'd still likely be a rather complex bit of mechanics, especially if the tail was allowed to occupy squares other than the one where the monster had just been. No straightforward solution comes to mind. :)
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Joramund, I did not intend to hijack and spam your thread, sorry!
does anybody know this game?
http://en.wikipedia.org/wiki/Snake_%28video_game%29

I would suggest s.th. alike it.
possible exception> turning /running away from party

leading monster inverses direction it is facing and switches
positon with its tail counterpart. So a 2 square snake could flee in a corridor,
instantly moving 2 squares away..or just dont allow turning

as for the beo dragon with tail attack, that is 2 squares long..

I would suggest 2 monsters ,
one in front is the dragon w/o tail, that is dragon head.
the other monster is the tail (graphic is hind quarter of dragon)
it is following the front part and always faces the rear.
(always faces the opposite direction its front counterpart was facing on the same tile.)

front monster is supreme concerning movement and wants to face party.
tail just has one direction to attack, it cannot turn,
\moves dictated by front monster.
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Hehe, you sly hijacker !

EVERYBODY knows snake ! It's one of the first video games ever !

But consider now : you have to make a lot of ugly mechanics in order to get your monster to work, plus all the graphics that should be coherents...

It seems to me the benefit is rather low in front of the effort.
What Is Your Quest ?
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

snake game was kind of a rethoric question ;)
and yes, it is probably not worth the effort!
same like a multiplayer feature
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Ah, I do not agree on that. Multiplayer DM would be a great experience.

Consider all the possibilities :
Cooperative dungeon looting, Death Match, RPG instances...

But I think we're going OT with that ...
What Is Your Quest ?
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

hmm.
well, I am not sure how bad it would be to introduce the 2 tile monster and
also what multiplayer would mean in terms of game alteration and
amount of work
i honestly do not know how cool
it would be in the end. Who can tell?
there should be a prototype game that tests multiplayer or the 2 tile monster.
then you could see what's really going on; I cannot imagine it very vividly .
Remy
Craftsman
Posts: 111
Joined: Wed Sep 05, 2007 5:24 pm
Contact:

Post by Remy »

I've given the mechanics of a two-tile monster some thought, and there are a couple of issues that would make it unworkable, or just plain dumb, right from the get-go.

The problem comes from collisions. Take the following layout, for example (it's in code tags for spacing reasons):

Code: Select all

 . . . . .
 . . M . .
 . . M P .
 . . . . .

M - monster tile (two for two-tiled)
P - Character Party
 . - Empty Cell
Assuming the top of the screen is north, we have a two-tile monster facing north, with a party to the southeast of it's head-tile. What happens if the monster turns to the west? The tail would jump from to the west of the Party to the north. But shouldn't it have passed through their cell? Would they then be blocking it?
This is really a design decision. You could, for example, say that turns pivot from the tail, which would mean a turn to the west would cause the head to jump from north of the tail to west of the tail. But the Party is now blocking turns to the east.
The next example shows a larger problem...

Code: Select all

 . . . . [
 . . . M [
 . . . M [
 . . . . [

[ - Wall 
in this case, if the monster turns to the west, it's tail would jump inside a wall. Obviously we'd need to prevent that - the monster is blocked from turning west. We can handle that in mechanics, but there's a larger issue.
The monster can't turn away from the wall, so how is it supposed to move away from the wall? It can't turn to the west, so it can't move west, so it's effectively trapped against the wall. We'd have to give the monster the ability to side-step.
But there's still one more problem:

Code: Select all

 . . . . [
 . . P M [
 . . . M [
 . . . . [
The Party is now blocking the monster from side-stepping away from the wall. It can't turn to face the Party, because it's tail would be inside the wall. The monster is effectively trapped, and the party can whack it to death, as long as they remain along side it, without it being able to attack back.
The only way around this situation is to setup some AI mechanics that keep the two-tile beastie away from walls. Except that a smart player can take advantage of that, too. If they remain near the walls (or even better, in a doorway), the monster will have to go through some complicated movements to get at the party, which pretty much handicaps the monster.
I don't think a two-tile monster is feasible, with the possible exception of a large, open room without nooks and crannies ( or corners - if the monster is avoiding walls, a party standing in a corner could never be hit by it. They couldn't fight back, true, but it's a good place to take a nap and make healing potions).
User avatar
Parallax
DMwiki contributor
Posts: 424
Joined: Mon Aug 28, 2006 7:56 pm
Location: Back in New Jersey

Post by Parallax »

The way I think about a two-tile monster is this: the 'head' tile can turn any direction except that of the 'tail' tile. This does not change the tail tile position. The tail tile always 'faces' the head tile.

Whenever the head tile moves (forward or side-stepping, the head cannot move backwards, ever) the tail moves to the old position of the head.

Graphically, this requires that the tail be wiader than its tile in side views, so that there is no gap in the display. The best image I can think of to illustrate what I mean is the Chinese dragon.

By linking each segment's movement to the previous segment one could conceivably create a snake (or centipede, or garden hose)-like monster that would be longer than 2 tiles.

EDIT: I just realized that what I described solves every problem the previous poster brought up save for one: if the monster's head enters a dead end it is blocked.

EDIT 2: A two-tile monster that is allowed to side-step onto its own tail can back out of dead ends! Longer monster can't as they would become discontinuous or overlap their own body.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

oh well, too slow! basically I second Parallax,

Code: Select all

:

 . . . . .
 . . M . .
 . . m P .
 . . . . .

M - monster tile (head)
m - monster tile (tail)
P - Party
 . - Empty Cell
monster is facing north.
only the M part of the monster is able to decide for moves.
the tail part (small m) is just following big M/think of instant teleportation of m
to the spot where M was when M is successfully moving.

I would , however say the tail tile of monster (m) is facing
opposite direction of facing of M's tile . mirroring
m faces the opposite direction it had moved last move .
M can force m to move for fast retreat

some sample facings of M
<^> are facings of M (W N E)

Code: Select all

Code:

 . . . . .     . . ^ . .     . . . . .
 . . M>. .     . . M . .     . .<M. .
 . . m P .     . . m P .     . . m P .
 . . . . .     . . . . .     . . . . .




sidestepping is the idea!
monsters could enclose the party

Code: Select all


 . . . . .
 . . m M .
 . . N P O
 . . n . o

M N O- monster tile (head)
m n o- monster tile (tail)
P - Party
 . - Empty Cell
what if a tail tile dies, dies the whole monster?
do M and m have the same hp pool?
Post Reply