Scrolling Tiled Background C2

Get help using Construct 2

Post » Sat Oct 01, 2011 6:08 pm

@Wink: is your browser firefox ?
Try to set event2 => TiledBackground.X to TiledBackground.X - int(60*dt)

The int() function makes it so that the result of the operation is always an integer (not a float).
This seems to make the "gap" disappear".Kyatric2011-10-01 18:08:42
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sat Oct 01, 2011 7:15 pm

Thank you so much Kyatric. That fixed it.

Yes I have been using firefox but I also have Chrome, Explorer, Opera, and Safari. All of them were giving me the same issue but not anymore thanks to your fix.

Thanks again
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Sat Oct 01, 2011 9:03 pm

I'm running Firefox as well and that fixed by problem with the gap in my other game but I have made a duplicate of the game to test parallaxing layers and I tried setting the bound to layout on the sprite but that didn't work with parallax so now my little player still drops off into the abyss! I was not sure if we could tile backgrounds (like the sky and dunes) as you had shown us and still use parallax with our other sprites. (??)

Thanks for helping us with the gap, Kyatric. It is most appreciated!

Here's my capx with the parallax layers. I have them set for minimum movement just to see if I could get it to work. Basically I want this particular view to tile repeatedly for the first level of my game, with my player not plummeting off the right-hand side of the screen!

Advice to achieve this would be greatly appreciated! Thanks in advance for your time.

Capx

Have a nice weekend!
B
5
S
1
G
2
Posts: 45
Reputation: 1,315

Post » Sat Oct 01, 2011 10:32 pm

I'm not sure parallax is the best way to go.
To see some platformer/parallax use, check out C2's example folder.

To your issue :
http://dl.dropbox.com/u/36472942/construct/forumhelp/Multi-Sprite-Scrolling.capx

Seamless scrolling (not fullproof though, gap has come back, I'm not sure why).
Guess it's a good base to work from though.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sun Oct 02, 2011 12:24 am

Hello Kyatric,

Thanks so much for taking time to provide the example. Yes, I noticed the gap returned and sometimes it appears as if they actually overlap on occasion during the scroll as well.

I concur with you that this may not be the most prudent way to proceed and I have searched the forum and see that layout size shouldn't be an issue so perhaps I will just duplicate the sprites (dunes, clouds, etc) and make my layout large enough to complete this portion (level) of the game with the parallaxing layers to achieve the 3D effect on the distant objects/scenery/ground, etc; saving the actual platform effects for another game level entirely.

I am obviously missing a large portion of the concept to the platform games unless they are actually duplicating sprites in order to achieve the appearance of the scrolling effects that you see in so many of them, and implementing a large layout to achieve the illusion. I was under the assumption that things were happening in the background via the infinite tiling/scrolling layers.

I have opened most of the examples already, which could very well be adding to my confusion. I get something working just right and then think I'll try something else and before you know it, I've torn everything up. I suppose we can just call that, part of the learning process!

Thanks again for all you do, it's truly appreciated!
B
5
S
1
G
2
Posts: 45
Reputation: 1,315

Post » Sun Oct 02, 2011 1:33 am

Ya when I start to add things to my game the seam breaks in firefox, Opera, and the worst seems to be Chrome. But explorer still works, and Safari seems to be the best for this.

I was going to make a retro plane shooter/bomber with a never ending scroll similar to the style of the ATARI 2600 Barnstorming game that came out in 1982. Man I loved that game back then. lol

I think it's just a browser support issue. I guess I will just put this project on hold for now and start something different.

Thanks for all the help though KyatricWink2011-10-02 01:34:35
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Fri Nov 02, 2012 6:13 pm

Hmm the gap troubles hasnt been fixed right? Because on my Firefox I have it -.- I have fix it with a another bachground so the cap doesent appear anymore, because the background overwrite it :DSakura132012-11-02 18:17:43
B
4
Posts: 13
Reputation: 476

Post » Mon Nov 05, 2012 4:28 pm

What I tend to do it for certain really important scrolling tiles that need to look seamless..is to put a very small fade out gradient on one edge of the Seamless tile..but also allowing for the extra fade out...of course...much like the sprite "bleeds" for plants and flowers etc...by doing this you can overlap your tiles just enough and the "Gap" is not seen if you do your art asset correctly...nearly every professional company uses this "Edge Bleed" technique..its very clean and fixes so many problems .......also MeJustMe..In regard to your Sand dune sprite issue this technique works as well.....Use an Alpha blended bleed edge on all your necessary Parallax Sprites...This way Overlap is not seen at all.....and to get variation in your Parallax dunes...Make 4 or 5 sprites in such a way that they can be blended and randomized..Art Asset creation is as important to your game final design as every other part...so spend some time..figuring out a lego block approach to all of your parallax sprites just as you would for your...normal level sprites......

What I mean is....This layout (which is only a teeny part of the Enormous layout) made up entirely of only These parts and a few extra Parallax Backgrounds & FX

So as long as you alpha blend the edges you can do amazing stuff because everything blends into every thing else...Good asset creation is an Artform in itself...Practice makes perfect..
If you are clever with your scene object design you can build entire world from only a few props..like the creative team did in the "300" movie..They only made 1 scene ROCK prop and just shot it again and again from about 30 different angles...very simple idea...same principle here

mystazsea2012-11-05 16:42:33
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
30
S
11
G
8
Posts: 313
Reputation: 7,360

Post » Tue Nov 06, 2012 12:02 pm

It would be nice if we could just change the image matrix. I used to make infinite scrolling backgrounds in Flash like that.
B
17
S
4
G
5
Posts: 41
Reputation: 4,254

Post » Tue Nov 06, 2012 1:06 pm

[QUOTE=Kyatric] @Wink: is your browser firefox ?
Try to set event2 => TiledBackground.X to TiledBackground.X - int(60*dt)

The int() function makes it so that the result of the operation is always an integer (not a float).
This seems to make the "gap" disappear".[/QUOTE]

Wouldn't setting the "rounded pixel" option solve the gap problem because it auto rounds all pixel locations from floats to int? (It's in the project properties I believe.)
B
18
S
6
G
2
Posts: 22
Reputation: 2,339

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt, farfetchd83, mjj1990, Vodakman and 5 guests