What is Spawn x y z and platform values for?

Bruce

Active member
Hello all,

I have read the guide about openbor engine guideline, but I still don't understand about spawn z
spawn x y z

I changed this z value to different values but I did not see any difference.
I also don't understand about the platform values.
Can someone please explain about the z and platform values?



Thank you so much for your help and sorry for the noob questions
 
but I still don't understand about spawn z
spawn x y z

Hmmm.... are you referring to these commands in level text?
spawn1 {x} {z} {a}
spawn2 {x} {z} {a}
spawn3 {x} {z} {a}
spawn4 {x} {z} {a}

This command defines starting point for each player. When level starts, only {x} and {z} are applied to active players. When a player respawns or joins in, all three parameters are applied.
In case, it's not clear {a} defines how high from sky player drops to level when respawning.

I changed this z value to different values but I did not see any difference.

I think it's because you're supposed to modify the second parameter instead of the third one.
Still, I'll explain a bit about second parameter, it's measured from minimum z.
Example: minimum z of a level is 160 and there's spawn1 50 20 500.
When player 1 starts the level, he/she will appear 50 pixels from left edge and 20 pixels from minimum z or IOW 180 pixels.

I also don't understand about the platform values.
Can someone please explain about the z and platform values?

Platform is usually defined in entity text like this:
Code:
anim    idle
    loop    1
    delay    10
    offset    39 127
    bbox    16 38 48 90
    platform 40 135 -35 -35 35 35 16 72
    frame    data/chars/misc/barrel.png
    frame    data/chars/misc/barrel.png

😖
I've realized that it's more clear with visuals which I don't have ATM. I'll attach barrel.png for reference starter.

But before that, is this platform you are asking?
 

Attachments

  • Barrel.png
    Barrel.png
    2.8 KB · Views: 2
Hmmm.... are you referring to these commands in level text?


This command defines starting point for each player. When level starts, only {x} and {z} are applied to active players. When a player respawns or joins in, all three parameters are applied.
In case, it's not clear {a} defines how high from sky player drops to level when respawning.



I think it's because you're supposed to modify the second parameter instead of the third one.
Still, I'll explain a bit about second parameter, it's measured from minimum z.
Example: minimum z of a level is 160 and there's spawn1 50 20 500.
When player 1 starts the level, he/she will appear 50 pixels from left edge and 20 pixels from minimum z or IOW 180 pixels.



Platform is usually defined in entity text like this:
Code:
anim    idle
    loop    1
    delay    10
    offset    39 127
    bbox    16 38 48 90
    platform 40 135 -35 -35 35 35 16 72
    frame    data/chars/misc/barrel.png
    frame    data/chars/misc/barrel.png

😖
I've realized that it's more clear with visuals which I don't have ATM. I'll attach barrel.png for reference starter.

But before that, is this platform you are asking?
Wow, you are genius!
I meant to ask about the a value not the z value. Since you explained it so well, now I have better understanding about the z value as well!

Yes, it is the kind of platform I was referring to. What is the purpose of the platform for since we have images of the entities to display for the level (stage) already?

Can you also explain about the block (not sure what it is called) to prevent players and enemies from walking over or under the objects such as wall, entities, etc... how do I declare or set this up by coding?
Right now, I can walk through the walls 😞

Thank you so much for your help.
 
Last edited:
What is the purpose of the platform for since we have images of the entities to display for the level (stage) already?

Walls and platforms aren't declared immediately by default when panel and sprite respectively are declared for level and entity text.
Obstacles have default platform setting but it's not always accurate.
TLDR it's best to declare it yourself.

Can you also explain about the block (not sure what it is called) to prevent players and enemies from walking over or under the objects such as wall, entities, etc... how do I declare or set this up by coding?

There's reference image in manual to declare wall in level text.

My tip to declare wall is : to use graphic editor to view the background image and get bottom left/right corner coords of the wall. If the wall has sharp edge facing left, then get bottom left corner coords but if wall has sharp edge facing right, then get bottom right corner coords instead.

Sorry, I don't have graphical explanation for setting platform yet.
 
Walls and platforms aren't declared immediately by default when panel and sprite respectively are declared for level and entity text.
Obstacles have default platform setting but it's not always accurate.
TLDR it's best to declare it yourself.



There's reference image in manual to declare wall in level text.

My tip to declare wall is : to use graphic editor to view the background image and get bottom left/right corner coords of the wall. If the wall has sharp edge facing left, then get bottom left corner coords but if wall has sharp edge facing right, then get bottom right corner coords instead.

Sorry, I don't have graphical explanation for setting platform yet.
I really appreciate for your time and help. It did help me alot, thank you and god bless you!
 
I've just recalled that I've posted example on how to set hole and wall in same level. Read this thread to see how I did it.

I've also updated barrel image with offset point and platform setting. White lines show the solid part of the barrel. Green cross is the offset while blue cross is the platform's offset.
Here's offset and platform setting again:
offset 39 127
platform 40 135 -35 -35 35 35 16 72
 

Attachments

  • Barrel.png
    Barrel.png
    2.9 KB · Views: 7
Back
Top Bottom