The Dink Network

Re: Depth-Dot - what does it do?

January 6th 2011, 09:14 AM
knights.gif
Androrc
Peasant He/Him Austria
 
What does a sprite's depth-dot setting mean?
January 6th 2011, 09:19 AM
custom_iplaydink.gif
Iplaydink
Peasant He/Him Sweden
Hmm.. 
Sprites with a lower y coordinate than tge dot of the other will be drawn behind the sprite. It's also from where the coordinates of a sprite is counted with all commands such as move() and sp_x().
January 6th 2011, 09:27 AM
knights.gif
Androrc
Peasant He/Him Austria
 
Ah, thanks! So it also affects at which point the sprite can't go over tile hardness?
January 6th 2011, 09:29 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
I'm not really familiar with all the depth-dot does, but I'd say yes.
January 6th 2011, 09:32 AM
custom_iplaydink.gif
Iplaydink
Peasant He/Him Sweden
Hmm.. 
"Ah, thanks! So it also affects at which point the sprite can't go over tile hardness?"

Among other things, yes
January 6th 2011, 05:41 PM
wizardg.gif
schnapper
Peasant He/Him Heard Island And Mcdonald Islands
Let us save our effort and just lie down and die. 
Another interesting thing it does is affect where the sprite's dialogues will appear in relation to the sprite.
January 8th 2011, 02:20 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Really? It would be a case of "Dialogue appears x amount above depth dot", correct? I didn't know that...
January 8th 2011, 01:36 PM
dinkdead.gif
"Really? It would be a case of "Dialogue appears x amount above depth dot", correct? I didn't know that..."

Yep, and you can use sp_strength and sp_defense to change that x amount, too

"If the active_sprite is a text sprite (sp_brain of 8), the strength value is the x-offset of the text from the parent sprite's sp_x coordinate. By default it is set to 75, so the text starts 75 pixels left of the parent sprite."

"If the active_sprite is a text sprite (sp_brain of 8), the defense value stores the y-offset of the text from the parent sprite's sp_y coordinate. By default it is set to 100 plus a value related to the depth dot and hardbox, so the text appears roughly 100 pixels above the sprite's head."
January 8th 2011, 01:43 PM
knights.gif
Androrc
Peasant He/Him Austria
 
That is weird - why would the strength and defense alter the position of dialogue? The only reason I can imagine is that big monsters tend to have great strength and defense, but it still seems silly.

Anyhow, are depth dots stored in "SET_SPRITE_INFO" or in the numbers after "load_sequence"?
January 8th 2011, 01:48 PM
dinkdead.gif
"That is weird - why would the strength and defense alter the position of dialogue? The only reason I can imagine is that big monsters tend to have great strength and defense, but it still seems silly."

Strength and defense of the text sprite itself, not of the sprite that's talking.

"Anyhow, are depth dots stored in "SET_SPRITE_INFO" or in the numbers after "load_sequence"?"

Both, hardbox too. SET_SPRITE_INFO will override the numbers after load_sequence though. If you look in the DinkC Reference under Techniques there's a good detailed explanation of those numbers and general .INI, depth dot stuff.
January 8th 2011, 07:33 PM
wizardg.gif
schnapper
Peasant He/Him Heard Island And Mcdonald Islands
Let us save our effort and just lie down and die. 
Hmmm, I'd never thought of text as being a sprite. This is most interesting news.
January 8th 2011, 07:52 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Yep. For example, you can get at the title "1.08" text by doing a get_sprite_with_this_brain() for the text brain. I don't think the text-as-sprite avenue is fully explored yet. Does it have a hardbox? If so, can you give it touch_damage? Can you use functions from the move()-family on it? Can you make the text say something? Have the text follow Dink around? What happens if you hurt() a text?

You can access the sprite number of the last spoken text by a given sprite with busy() (though read dinkc.chm for a caveat).
int &textspr = busy(&spritenum);

Go nuts
January 8th 2011, 08:43 PM
dinkdead.gif
"You can access the sprite number of the last spoken text by a given sprite with busy()"

Why would you do it like that? Surely it's easier to just do:
int &textspr = say("talktalktalk", &sprite);

Or use &last_text.

And I don't think you can do much with the sprite At least I've tried things like changing the size... the rest sounds interesting though if it's possible!