Open Surge Forum

A fun 2D retro platformer inspired by Sonic games and a game creation system

You are not logged in.

Announcement

Our community has moved to Discord! https://discord.gg/w8JqM7m

#1 2010-08-12 00:04:23

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

What's up with the new Background feature?

I've been trying to make it work, but ever since the foreground feature came in, stuff is missing if it's put in the wrong order REGARDLESS OF ZINDEX. Moving it around WITHOUT CHANGING IT will mess with it as well. There's always one item that doesn't appear.

I move the wrong thing and then EVERYTHING disappears.

What the heck? Why isn't certain stuff appearing? Why isn't nanoparser catching it? I thought order was determined by ZINDEX, not actual 'order'. Is something conflicting? Is it a bug? How do you do it correctly?

I know I'm bombarding with questions... but...

HUH? sad

EDIT: OOPS. I brought this up before haven't I. Screenshots time.

EDIT 2:

 background
{
    initial_position    0 0
    scroll_speed        -1.2 -1.2
    behavior            LINEAR -1000 -10
    repeat_x            TRUE
    repeat_y            TRUE
    zindex              0.9

    sprite
    {
        source_file     images/sandy4.png
        source_rect     0 0 48 48
        frame_size      48 48

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

background
{
    initial_position    0 0
    scroll_speed        -0.3 -0.3
    behavior            LINEAR -10 0
    repeat_x            TRUE
    repeat_y            TRUE
    zindex               0.1

    sprite
    {
        source_file     images/cloudsb.png
        source_rect     0 0 2000 2000
        frame_size      2000 2000

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

background
{
    initial_position    0 0
    scroll_speed        -0.4 -0.4
    behavior            DEFAULT
    repeat_x            TRUE
    repeat_y            FALSE
    zindex               0.2

    sprite
    {
        source_file     images/sandy3.png
        source_rect     0 0 736 506
        frame_size      736 506

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

background
{
    initial_position    0 0
    scroll_speed        -0.6 -0.6
    behavior            DEFAULT
    repeat_x            TRUE
    repeat_y            FALSE
    zindex               0.3

    sprite
    {
        source_file     images/sandy2.png
        source_rect     0 0 736 506
        frame_size      736 506

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

background
{
    initial_position    0 0
    scroll_speed        -0.8 -0.8
    behavior            DEFAULT
    repeat_x            TRUE
    repeat_y            FALSE
    zindex               0.4

    sprite
    {
        source_file     images/sandy.png
        source_rect     0 0 736 506
        frame_size      736 506

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

And I get this:
s004.png
Absolutely nothing but the sky and sandstorm. I coded it right, did I not? Even if I didn't, the order was still so it should've appeared, and I checked the images. The dimensions fit perfectly.

However, without the zindex on bg stuff (excluding the sandstorm...)

background
{
    initial_position    0 0
    scroll_speed        -1.2 -1.2
    behavior            LINEAR -1000 -10
    repeat_x            TRUE
    repeat_y            TRUE
    zindex              0.9

    sprite
    {
        source_file     images/sandy4.png
        source_rect     0 0 48 48
        frame_size      48 48

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

background
{
    initial_position    0 0
    scroll_speed        -0.3 -0.3
    behavior            LINEAR -10 0
    repeat_x            TRUE
    repeat_y            TRUE

    sprite
    {
        source_file     images/cloudsb.png
        source_rect     0 0 2000 2000
        frame_size      2000 2000

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

background
{
    initial_position    0 0
    scroll_speed        -0.4 -0.4
    behavior            DEFAULT
    repeat_x            TRUE
    repeat_y            FALSE

    sprite
    {
        source_file     images/sandy3.png
        source_rect     0 0 736 506
        frame_size      736 506

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

background
{
    initial_position    0 0
    scroll_speed        -0.6 -0.6
    behavior            DEFAULT
    repeat_x            TRUE
    repeat_y            FALSE

    sprite
    {
        source_file     images/sandy2.png
        source_rect     0 0 736 506
        frame_size      736 506

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

background
{
    initial_position    0 0
    scroll_speed        -0.8 -0.8
    behavior            DEFAULT
    repeat_x            TRUE
    repeat_y            FALSE

    sprite
    {
        source_file     images/sandy.png
        source_rect     0 0 736 506
        frame_size      736 506

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

s005.png

I get this. Only a single dune. I had three in the background.

Now watch this: I swap the order around of these...

background
{
    initial_position    0 0
    scroll_speed        -1.2 -1.2
    behavior            LINEAR -1000 -10
    repeat_x            TRUE
    repeat_y            TRUE
    zindex              0.9

    sprite
    {
        source_file     images/sandy4.png
        source_rect     0 0 48 48
        frame_size      48 48

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

background
{
    initial_position    0 0
    scroll_speed        -0.3 -0.3
    behavior            LINEAR -10 0
    repeat_x            TRUE
    repeat_y            TRUE

    sprite
    {
        source_file     images/cloudsb.png
        source_rect     0 0 2000 2000
        frame_size      2000 2000

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}


background
{
    initial_position    0 0
    scroll_speed        -0.8 -0.8
    behavior            DEFAULT
    repeat_x            TRUE
    repeat_y            FALSE

    sprite
    {
        source_file     images/sandy.png
        source_rect     0 0 736 506
        frame_size      736 506

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

background
{
    initial_position    0 0
    scroll_speed        -0.6 -0.6
    behavior            DEFAULT
    repeat_x            TRUE
    repeat_y            FALSE

    sprite
    {
        source_file     images/sandy2.png
        source_rect     0 0 736 506
        frame_size      736 506

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

background
{
    initial_position    0 0
    scroll_speed        -0.4 -0.4
    behavior            DEFAULT
    repeat_x            TRUE
    repeat_y            FALSE

    sprite
    {
        source_file     images/sandy3.png
        source_rect     0 0 736 506
        frame_size      736 506

        animation
        {
            repeat      FALSE
            fps         8
            data        0
        }
    }
}

s006.png
And now TWO appear. Well, that could be because the big one was in front of the little one. However, the one that's supposed to be in the middle never shows up on screen...

What. On. Earth.

What should I do??? I've tried everything...

EDIT 3: Sorry for the rudeness. I've been at this for about 2 days... and I can't figure it out.

EDIT 4: Edited out the 'jerkness' of the post.

Last edited by SilverstepP (2010-08-12 20:26:49)

Offline

#2 2010-08-12 00:33:22

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: What's up with the new Background feature?

You're using stuff from the bleeding edge that haven't even been documented yet. It's okay to use the features, but please keep in mind it's a bleeding edge.

Make sure zindex > 0.5
Set both repeat_x and repeat_y to TRUE

If it works, you have to adjust the initial_position.

Offline

#3 2010-08-12 00:37:57

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: What's up with the new Background feature?

Alexandre wrote:

You're using stuff from the bleeding edge that haven't even been documented yet. It's okay to use the features, but please keep in mind it's a bleeding edge.

Make sure zindex > 0.5
Set both repeat_x and repeat_y to TRUE

If it works, you have to adjust the initial_position.

Wait, why set them both to true?

EDIT: Well, I ask this because I would have dunes in the air if I did it that way....

Offline

#4 2010-08-12 03:01:43

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: What's up with the new Background feature?

Please send the complete background (.bg files + images + whatever), so we can understand the problem better.

Offline

#5 2010-08-12 04:14:35

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: What's up with the new Background feature?

Alexandre wrote:

Please send the complete background (.bg files + images + whatever), so we can understand the problem better.

Well, I guess I'll design the level first and send the bg file completely untouched. Is that alright? I'd have to send you the lev file anyways...

I want to get some stress off, lol.

Offline

#6 2010-08-12 12:19:06

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: What's up with the new Background feature?

We don't need the level. We just need the background. If there's a bug, we want to fix it as fast as possible.

Offline

#7 2010-08-12 20:24:36

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: What's up with the new Background feature?

Alexandre wrote:

We don't need the level. We just need the background. If there's a bug, we want to fix it as fast as possible.

http://www.mediafire.com/?uxugey2iaqn78vk

Right. There you go. All the images and the .bg file. I didn't miss anything, did I?

Offline

#8 2010-08-12 22:19:09

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: What's up with the new Background feature?

It seems to be working perfectly here:

s001o.png

s002.png

I have made no modifications to your bg file. I just modified the bgtheme from the template level to test your dunes.bg.

Offline

#9 2010-08-13 03:23:03

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: What's up with the new Background feature?

Alexandre wrote:

It seems to be working perfectly here:

s001o.png

s002.png

I have made no modifications to your bg file. I just modified the bgtheme from the template level to test your dunes.bg.

O.O

HEH?

No way! I can't believe this!

Last edited by SilverstepP (2010-08-13 03:24:53)

Offline

#10 2010-08-13 03:27:51

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: What's up with the new Background feature?

SilverstepP wrote:
Alexandre wrote:

It seems to be working perfectly here:

s001o.png

s002.png

I have made no modifications to your bg file. I just modified the bgtheme from the template level to test your dunes.bg.

O.O

HEH?

No way! I can't believe this!

EDIT: I think it may be that yours is updated a bit more. I really should download the more recent bleeding edge-- I'm at revision 157 right now... I don't know WHY, but its worth a shot.

Offline

#11 2010-08-13 13:01:17

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: What's up with the new Background feature?

Try inserting your background into the template level. What happens?

Offline

#12 2010-08-13 15:36:28

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: What's up with the new Background feature?

What on earth.... it works perfectly on my template as well?!

I don't understand... The position of the stuff on Desert Dunes were in the same area as the template!

Well, guess I'm doing my level over then. 'facepalm'

Thank you, Alex.

Offline

#13 2010-08-27 20:35:09

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: What's up with the new Background feature?

This problem is still occurring. However... something's weird. It happens only occasionally, even if you don't change the files and play the exact same .lev file.

Sometimes it appears and loads correctly, but other times it just shows one or two. What's weird is that I don't change anything, and yet it appears sometimes exactly the way I wrote it and other times only the sky appears.

However, this time I have looked at official levels even, and sometimes THEY even get mixed up and have certain elements missing. And I tried putting them in the template and the do the exact same thing at times.

Perhaps there is a very small error or typo causing this... could you look into it, Alex? The screen is never completely blank, so I assume that the error lies with how the backgrounds are ordered... perhaps the reason that only the sky appears is because it covers everything else.

Offline

#14 2010-08-27 23:24:49

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: What's up with the new Background feature?

"sometimes" is not good enough. If you believe there is a bug, you need to do better than this. We can't fix a bug if we can't reproduce it. The list below is a guide for any bug report:

0. Describe the bug concisely, clearly.

1. Send us the exact set of files that make the bug visible

2. Describe in details the exact list of steps required in order to reproduce the bug. Do it in a way so that even my grandma can understand. Please keep the list to a minimum by eliminating any unnecessary steps.

3. Please provide any additional information you may have

Thank you.

Offline

#15 2010-08-28 00:48:53

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: What's up with the new Background feature?

Alexandre wrote:

"sometimes" is not good enough. If you believe there is a bug, you need to do better than this. We can't fix a bug if we can't reproduce it. The list below is a guide for any bug report:

0. Describe the bug concisely, clearly.

1. Send us the exact set of files that make the bug visible

2. Describe in details the exact list of steps required in order to reproduce the bug. Do it in a way so that even my grandma can understand. Please keep the list to a minimum.

3. Please provide any additional information you may have

Thank you.

OK, I'm messing around a bit...

This is revision 199 I'm using....

I found out something about the mystery bug that I run into. The layer that is supposedly the farthest away gets misplaced all the way up front at times. Since my levels always have a massive sky piece of some sort for the background, it blocks everything out, except the sky. The 'official' files also have a tendancy to do this; prototype.bg was completely unedited and somehow the tops of the mountains got cut off... that probably means that the sky just got placed in front of it.

I have tried everything though... I can't find a pattern for how this occurs. It has happened on an unedited official level (Exotic Paradise act 1) but, I guess the only way to reproduce this bug is to keep playing long enough to see it happen, because I have absolutely no clue on how to make it happen for sure.

You have the link to the dunes up above. Those have a tendancy to move the back in the front regardless of what level they're put in (yes, it even happened in the Template a few times).

So, I guess a possible way of reproducing it could be...

0. Make a lev file with dunes.bg as the background (It happens sometimes in the template). It seems to hate this in particular.
1. Run Open Sonic.
2. Play the level. (Put some platforms in so the characters won't instantly die).

That's all I can think of to do. It's just... weird. There's no specific way I can think of to trigger it. sad Sorry.

Offline

#16 2010-08-28 02:12:26

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: What's up with the new Background feature?

okay.

I've just written a different algorithm to sort the backgrounds. It seems to be fine here, however it will only be available on revision 201 or later. rev201+ is not available at this exact moment, but it will be later. Then you can test it again and see if the bug persists.

Offline

#17 2010-08-28 02:17:53

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: What's up with the new Background feature?

Alexandre wrote:

okay.

I've just written a different algorithm to sort the backgrounds. It seems to be fine here, however it will only be available on revision 201 or later. rev201+ is not available at this exact moment, but it will be later. Then you can test it again and see if the bug persists.

Alright.

Offline

#18 2010-08-28 13:51:43

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: What's up with the new Background feature?

Get revision 203.

Offline

#19 2010-08-28 13:59:15

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: What's up with the new Background feature?

It's stopped! Thanks! big_smile

Offline

Board footer

Powered by FluxBB  hosted by tuxfamily.org