How do I scroll the background when the background is larger than the screen?

0 favourites
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Von Perkele

    Thank you for your reply.

    I am using a demo from the swing copter tutorial this time.

    Hoping to use rafaeltrigo demos to learn how to scroll better. Seems I never quite get it right.

    Thought I'd try to make a game out of it.

    drive.google.com/file/d/10tEkg3wK6K-M71_W5bYJy3QkoJyPI4xz/view

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Two things.

    I mentioned this before. In this project you are using an image that had a size of 1280 x 400 or something. That is insanely costly performance and memory usage wise. I changed the image size to something like 90 x 300 or something. Notice there is no loss of graphical detail since it's simple pixel art? Yet it's 18 times more efficient performance and memory usage wise (yes, you can do the math: (1280*400)/(90*300)). You can simply resize smaller images in the editor to make them appear larger instead of having the actual image size be unnecessary big.

    The BG imagepoint Y is set to 0. Since it's scrolling downwards, it should change position when it reaches viewport bottom. Like this:

    dropbox.com/s/7th1i9mj88xt56u/RappyTappy.c3p

  • Von Perkele

    I Notice a big loss of graphical , my advice is resize out of construct and keep its original size when importing

    dazedangels

    The mechanics of scrolling is simple , and there are many ways to do it , because of it I did the Tutorial

    But the point of attention is the image itself , when you use a image that the drawing dont match the top and the bottom it will make a strange effect , my advice in these cases is to get an image of size of screen and them make it double with tilebackgroud , when you use a image like yours that doesnt match , the exemple of Von Perkele is right you should use 2 or more images , or use my first exemple on tutorial

    But for you Understand the Mechanics ...when a image reach some x or y position normally half size of your image , you put it back to the original start point , starts on y :-768 when the image reach Y: 0 or greater it backs to Y-768 and so on , after you understanding that you can choose a better way to fit your neeeds

    use Snap to grid as well for you match it perfectelly

  • Oof, this is an unnecessarily complex way to do it

    All you need is a TiledBackground and 1 line of code

    gofile.io/d/C2oNbu

  • ,

    I spend at least a day researching online before I post a question on any forum. I don't know if you realize this, but it's actually easier if you can find the answers online. And it's obvious that I have done research since I posted a link to the video that first taught me how to do scrolling backgrounds.

    Unfortunately Construct makes it nearly impossible to find anything useful. If Construct would remove all the worthless C2 posts that are over 5 years old, all the posts with Dead Links and all the post where the images have been removed - than people would actually be able to FIND the answers when they Google their problems. If the forum was cleaned up then Google would stop indexing outdated posts and we could find what we need.

    I'm not suggesting you do research. I'm suggesting the opposite in fact. Play with the engine yourself. The engine is not bloated at all, you can easily investigate most of the behaviors and object types on your own. If you had looked at the object types for 5 minutes you would've probably come across "Tiled Background" and seen that it's exactly what you want: a scrolling, repeating background. I think you'd learn things a lot more deeply that way, in a hands-on manner. That's just my advice and what has worked for me

  • I didn’t know this method, and I think it was the easiest way and it works best , Well done

  • von Perkele, rafaeltrigo,

    Thank you all so much. We need more of this - different ways to do the same thing.

    ,

    I've spent hours, far more than 5 minutes, playing with this program. I try every example I find online. This doesn't come easy for everyone. I look at these options, try to put them together and they don't work as described. Tile movement works great until you add drag and drop. Solid doesn't mean solid and the manual isn't helpful - I've read it. We need more examples (challenges) like these so everyone can learn, not just people who learn from manuals.

  • dazedangels

    For me that use the tool just for hobby, and I never programmed before the construct it was very difficult in the beginning ( 2 years ago ) to evolve and create more complex games without tutorials and files to download, now to create simple games, it doesn't need much , because this I do tutorials with a downloadable file so that more people can have the information faster, and doenst need to spend hours in old Forums searching for some subjects , and a lot of times the files doesnt exist anymore , And I think this is the focus of the construct, no programmim , Visual Scripting , So if we need to program a lot, most migrate to Unity ! Maybe old users of construct are used to it and doesnt need much help, but new users and especially those that don't program or come from other platforms where the community is huge and there are many examples easy will feel the difference , but I think construct is in a great way and is the best engine software to create 2d games around , just need a Scene Graph !

    One thing that help me a lot was creating puzzle games , like match 3 , very complex with a lot of Functions and using many instances !

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)