Foreground BGOs don't render properly

Description: It's archive, posting new is here http://wohlsoft.ru/forum/viewforum.php?f=11

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 25
Reputation: 15
Posts: 264
Joined: 27 Jun 2014

Post #1by Sambo » 28 Jun 2014, 8:51

I opened an SMBX level in PGE and I noticed that the foreground BGOs are always rendered behind blocks, when they are rendered in front of blocks in SMBX.
Image
Current Project:
Image

Kevsoft M
Angry developer
Angry developer
Avatar
Kevsoft M
Angry developer
Angry developer
Age: 24
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #2by Kevsoft » 28 Jun 2014, 9:29

Can you tell which level, or when it is a custom level, could you send it to us?
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 30
Reputation: 493
Posts: 1747
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #3by Wohlstand » 28 Jun 2014, 10:20

Oh, I think, I made a mistake in the bgo's ini file. Please tell us the id of the bgo which must have the rendered foreground?
You can edit them with the flag in lvl_bgo.ini by this id.
You can get the item id by hovering with the mouse over them inside the item toolbox.

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 25
Reputation: 15
Posts: 264
Joined: 27 Jun 2014

Post #4by Sambo » 29 Jun 2014, 9:26

I tried some other levels, and it looks like most of the foreground BGOs are rendering behind blocks.

Also, I don't know how the sorting priority thing works. Will you please explain it to me?
Image
Current Project:
Image

Kevsoft M
Angry developer
Angry developer
Avatar
Kevsoft M
Angry developer
Angry developer
Age: 24
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
Website

Post #5by Kevsoft » 29 Jun 2014, 10:03

Normally sorting is done by X and then sorted by Y. If this is not done, it may "Glitch" and BGOs are in Foreground. With the sorting priority you can force it to sort it not by the rules.

And if you wanna use that feature you can select a BGO, rightclick: Select "Settings" and in the window which pops-up you can set it then.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 30
Reputation: 493
Posts: 1747
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #6by Wohlstand » 29 Jun 2014, 10:50

Oh, and I forgot to add that:
result of the BGO Sort prority:
- will work if you set any value > 50
- will be displayed ONLY inside SMBX, and only in full screen mode (it won't get displayed in windowed mode)
- inside PGE this glitch never appears, because each BGO has it's own Z-index, which is defining the order of render. This is more stable and better because you have full control over the BGO position, and the BGO will be displayed with a defined Z-value without dependance on the position in the array.

Inside SMBX, the foreground BGO force is placed at the end of the list. This glitch appears because SMBX applies "foreground" render from the first BGO, which will be marked as "foreground", and will display all the foreground bgos after the first marked as "foreground" BGO. Foreground BGO marks are integrated into the EXE and can't be edited without knowledge of the assembler

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 25
Reputation: 15
Posts: 264
Joined: 27 Jun 2014

Post #7by Sambo » 30 Jun 2014, 21:46

So what number should I set it to so it will be on top?
Image
Current Project:
Image

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 30
Reputation: 493
Posts: 1747
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #8by Wohlstand » 30 Jun 2014, 22:43

See:
"It says Sort priority" where the BGO are placed inside array.

Warning! If you place an already foreground BGO to the TOP of array (value <1, != -1) inside SMBX FullScreen level test ALL BGO will be foreground.

The hack is using this SMBX feature:
render of BGO algorithm:
1) render all BGOs in background by array sequence.
2) on first "foreground" BGO, this and all next will be rendered foreground too.

And THIS bug I use for force display to foreground by SMBX


Return to “Troubleshooting”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest