Clint Thompson Posted May 17, 2019 Share Posted May 17, 2019 Toying around with Rb+ some more and am looking for suggestions on how to tackle this. Say I have a huge map image or background (1280 wide) and I want to animate parts of the background as you scroll by. What would be the best way to do this? As in, I know how to animate the objects but obviously you can't just place dooropen object at say 476 x and expect it to just follow the background map scrolling without looping since the wrap has to be on. (If you do, the image will wrap around sooner than not in places you don't wait it) and if you turn wrap off or edge kill on rather, it doesn't display anyways as it's already off screen. Do I have to make a screen counter on where the background image is and then activate it based on when the image is at a certain point for the animated bits? I'm not sure how to do this without breaking up the image to remain in perfect alignment. Any ideas appreciated. Thanks! Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted May 17, 2019 Share Posted May 17, 2019 Blit the frames into the position in the backdrop you want to animate, then it won't matter where it is on screen. Quote Link to comment Share on other sites More sharing options...
Clint Thompson Posted May 17, 2019 Author Share Posted May 17, 2019 How do you blit the frames in Rb+, any examples please? Thanks! Quote Link to comment Share on other sites More sharing options...
Clint Thompson Posted May 21, 2019 Author Share Posted May 21, 2019 Here is what I'm currently experimenting with. As you can see, once you scroll right there are different gears I would like to animate, add steam, etc. further out but can't do so currently. Quote Link to comment Share on other sites More sharing options...
ggn Posted May 21, 2019 Share Posted May 21, 2019 You could use a large object for the static background and move it around as usual, and an animated object that follows the movement of the big object. So for example say that the background starts at x=0,y=0 and the animated object starts at x=150,y=100. This is without any movement, just place the 2 objects and they'll look ok. Say you keep an increasing counter starting at 0, c=c+1 per frame. The background's x position then will be x1=c and the animated object's will be at x2=150+c. I hope you get the general idea... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.