&MOVE (CSBwin)

Dead posts cluttering up the front page of certain non-RTC forums are kept here. Threads have the forum subject attached, except custom dungeon threads (which are obvious)
Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

&MOVE (CSBwin)

Post by Zyx »

&MOVE on a missile (from a dungeon tile to a dungeon tile) crashes the game.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

What are you doing, moving a missile? I'm suprised you
are not trying to move a Zo Spell from a Chest in some
Screamer's back pocket to your Quiver. Gad. What
will you think of next?

At any rate, it is too much of a pain to set up a test
of such a thing. Can you send me a dungeon and
instructions to make it happen?
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

I will.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

When I saw the new post I figured you had tried to
put a door into a Shooter.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

9.8v53CGE10 attempts to fix this. But I cannot
test it because now your DSA dies with a stack underflow.

I am not sure what you are doing here. If you are
attempting to cycle the palette then this is an exceedingly
inefficient (albeit clever) way of getting it done.
A palette-modifying overlay would accomplish the whole
effect with a single word. Moreover, you would have
control of all of the colors with 16-bit color resolution.
Each palette-modifying overlay would have only 1K bytes
(16 bits for each of 512 colors). And you could fade the
palettes in and out.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

I don't how to use overlays this way. Could you provide an example?

I think I get the same error when &moving a cloud.

Also, the stack underflow error is weird. I think it is due to the fact that I &moved a monster into the cell of a missile: the monster lost some hitpoints and the DSA got interrupted by a call to a monster movement filter. When CSBwin returned to the previous DSA execution, the stack was lost.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

DSA got interrupted by a call to a monster movement filter
Ouch. If so, that will not be fun to fix. Do you have an example?
I don't how to use overlays this way
Neither do I. It has never been implemented. But I have
always had it in the back of my head.
You would create a 512-word Overlay. Each word tells the
16-bit color to use for the corresponding Atari color. Then
your DSA would say something like
"Apply palette overlay with 50 percent". The existing palette
overlay would be updated to 50 percent old and 50 percent new.
Doing it twice would cause a 25 percent old/75 percent new.
Then 12/87. etc. Specifying a null overlay would reset
the palette overaly to the original Atari colors (identity palette).
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

For the example, the last savegame should do it: throw something at the worms. (that's what i understood from the trace)

Overlays: this is very interesting. So I could, for example, transform everything into an infravision mode? Besides, since there are more or less only 30 colors used in DM, most of the 512 words would be empty, right?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

most of the 512 words would be empty, right
512 is the number of physically possible colors on
the Atari. If only 30 are used then you can put whatever you
please in the rest.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

DSA got interrupted by a call to a monster movement filter
You are exactly right. This will require some thought. A filter
can interrupt a DSA execution. Oh boy. Yukkkkk.
It is easy enough to make the thing re-entrant. But do we
know what side-effects that might have? Nope. Yukkkk. Again.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I made the DSA code reentrant. I think it must be this
way. It means that your DSA can cause another DSA
to start up and finish. Two (or more) DSAs can be running
at the same time. One DSA might put a coin on the floor
and expect it to stay there. But then if it &MOVEs a monster
and the monster lands on a pressure pad and the pressure pad
activates a teleporter and the teleporter moves the
coin then it will seem the coin mysteriously disappeared.

Or you might put a coint in the backpack and another
DSA would take it out. Onlu the 'filter' DSAs can interrupt
like this and probably only the monster movement filter.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I posted:

http://dianneandpaul.net/CSBwin/OverlayDemo.zip

It domonstrates the use of an Overlay Palette.
If you resurrect a champion and avoid the pressure
pad that turns on the water overlay then the effect
of the Overlay Palette is more obvious.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

I saw this new overlay capacity and it's very interesting! However I don't know in which order appear the colours in the 512 words palette. Could you provide an identity palette, that leaves the DM palette as it?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

The Atari palette consists of RGB in 3-bit fields.
(A lie...but better for our purpose)
Bits 0-2 B
Bits 3-5 G
Bits 6-8 R
So the Overlay palette has
[0] ; R=0,G=0,B=0.
[1] ; R=0,G=0,B=1
. . .
[511] R=7, G=7, B=7

The entries in the Overlay Palette have three five-bit
fields in the same order.

OverlayDemo.zip now has an IdentityPalette.bin
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

IdentityPalette.bin has 512 bytes, it should be 1024, right?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Ooops. Sorry. A typo. I should have typed '2' instead of '1'.
I'll put a new one in a few minutes.

OK. It is there. Strange, though, I tried the first
one and it worked pretty well! Must have been nothing
that needed a lot of Red.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

If you &MOVE a large creature then it is put on one of the four cell positions, so is made invisible unless you've got the 'draw a 4' flag enabled (in a flag enabled dungeon).

This is also true for &ADDing a large critter
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Using CSBwin9.8v62, I was able to &ADD and &MOVE a dragon,
two worms, and four gigglers.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Cool, cheers!
I will check the moving thing once I've got this whole delay thing sorted... : )
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Checked the newest version against an older version, and &moves/ &adds work fine
Post Reply