Jump to content
  • 0

DECORATE actor not visible


Magnus_Equus_Rosea

Question

I've been trying to add a custom decoration into a test and everything is fine but the sprite doesnt show up in gmae. There are no console errors and there is no red and yellow error sign and I know I added the sprite correctly. Does anyone have a fix for this?
Screenshots below:

image.png.3a1d4c2476a7729846306b55d7bd1f3d.png

image.png.7b56071d45a10261d7cab49e7b915df1.png

image.png.08cc75af0975c8adbc3ab1a869b33119.png

Screenshot_Doom_20240417_212453.png.93b7cf3a4ae32216bc9040727e2ab191.png

 

image.png

Edited by Magnus_Equus_Rosea

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0
48 minutes ago, Magnus_Equus_Rosea said:

I've been trying to add a custom decoration into a test and everything is fine but the sprite doesnt show up in gmae. There are no console errors and there is no red and yellow error sign and I know I added the sprite correctly. Does anyone have a fix for this?
Screenshots below:

image.png.3a1d4c2476a7729846306b55d7bd1f3d.png

 

From your screenshot I see that you are mapping for DOOM or BOOM original formats,

which do not support DECORATE.

 

Choose a source port which can handle DECORATE.

 

yeqpJPo.png

 

or better still ZSCRIPT (see GZDoom Doom2 UDMF) which more or less repaces the old DECORATE.

 

 

Edited by Kappes Buur

Share this post


Link to post
  • 0
1 hour ago, Kappes Buur said:

 

From your screenshot I see that you are mapping for DOOM or BOOM original formats,

which do not support DECORATE.

 

Choose a source port which can handle DECORATE.

 

yeqpJPo.png

 

or better still ZSCRIPT (see GZDoom Doom2 UDMF) which more or less repaces the old DECORATE.

 

 

Thanks for the advice. I'll port the wad I was working on to UDMF so it works.

Share this post


Link to post
  • 0
12 hours ago, Magnus_Equus_Rosea said:

Thanks for the advice. I'll port the wad I was working on to UDMF so it works.

Map format is irrelevant, as long as the port supports DECORATE then the actors can be used in any map format.

 

In fact, in ZDoom, all standard actors are internally in DECORATE format, and the vanilla maps can still be played! And in GZDoom they're all in ZScript, and same comment. Actor format and map format are fully orthogonal issues.

 

The most likely case for a sprite not being visible despite the sprite being present and no error being reported is an offset issue. Let me explain.

 

A Doom actor is, in-game, a column with X, Y, and Z coordinates. The Z coordinate is specifically for the bottom of the actor's column. This way it can do things like check if actor.z == floor.z to see if the actor is on the floor.

 

The renderer draws the actor's sprite at the actor's X, Y, Z coordinates. Like most computer graphics, sprites have their origin point (the pixel at 0, 0) at the top left corner.

 

So this means that by default, the actor's sprite is drawn to the right and, crucially, below the actor's physical position, which means it disappears under the ground.

 

To avoid this problem, the sprite's offsets should generally be set so that the X offset is half the width of the sprite image, and the Y offset is its full height.

Share this post


Link to post
  • 0

Thanks for the advice, it worked.

5 hours ago, Gez said:

Map format is irrelevant, as long as the port supports DECORATE then the actors can be used in any map format.

 

In fact, in ZDoom, all standard actors are internally in DECORATE format, and the vanilla maps can still be played! And in GZDoom they're all in ZScript, and same comment. Actor format and map format are fully orthogonal issues.

 

The most likely case for a sprite not being visible despite the sprite being present and no error being reported is an offset issue. Let me explain.

 

A Doom actor is, in-game, a column with X, Y, and Z coordinates. The Z coordinate is specifically for the bottom of the actor's column. This way it can do things like check if actor.z == floor.z to see if the actor is on the floor.

 

The renderer draws the actor's sprite at the actor's X, Y, Z coordinates. Like most computer graphics, sprites have their origin point (the pixel at 0, 0) at the top left corner.

 

So this means that by default, the actor's sprite is drawn to the right and, crucially, below the actor's physical position, which means it disappears under the ground.

 

To avoid this problem, the sprite's offsets should generally be set so that the X offset is half the width of the sprite image, and the Y offset is its full height.

 

Edited by Magnus_Equus_Rosea

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...