On my mission to create the perfect side-scroller action game, parallax scrolling is a key component. After diving into the IceCream code base, I thought I was going to have to create my own. I started on the feature (fortunately it’s a relatively small thing) when I discovered that IceCream has a built-in sprite property called AutoScroll. Setting this to true and the AutoScrollSpeed > 0 causes the sprite to “scroll” just like a background, making a copy of itself and everything necessary to cover the entire camera width.
Wow, how cool!
There are a few bugs with it, though. One, the AutoScroll properties are configurable in MilkShake but don’t save to the scene XML, or load. So I had to add that in (quick). It also doesn’t work if you want to move the image from right to left, only vertical or left to right. This is a bit of an oversight, as no one wants to play a game that scrolls from left to right. The character/level should move left to right, but the background should move right to left. Basically, I just need to add support for AutoScrollSpeed being negative.
The third nitpick isn’t a bug, but it doesn’t support a linked background. So if my background is chopped into multiple images to save time/memory when rendering back-to-back, they’ll have to be combined into a single material in IceCream. This isn’t the end of the world and could be patched in if it became an issue (via LinkPoints property or something). Not low-hanging fruit in terms of performance.
I don’t understand why this engine never caught on or wasn’t pushed more by the developers. It’s very powerful and extremely easy to use. It’s the perfect combination of GUI + code, not to mention all the core engine components are already written for you.
Update: I realized later that the reason AutoScroll isn’t saved to XML by MilkShake is probably because it’s more common to set it up via code after the scene loads and the scene has truly started.
It also brings up two other points to investigate: is AutoScroll meant to scroll w/ the camera automatically? And, can the AutoScroll functionality work in a scenario that does not use a constant speed? E.g., in an action sort of game where the player can freely move left (“back” in the level), or right (“forward in the level”), at varying speeds.