Hi all,
I have sent Marcin (Boulder Remake) an email about this, and I thought I'd ask you too just in case Marcin doesn't answer...
I have been trying to make my own boulder dash inspired game using the information found here:
http://www.elmerproductions.com/sp/pete ... eInfo.html
for the algorithms and logic.
Everything works fine so far, but now I want to add in smooth scrolling like Marcin has done.
Boulder Remake seems to work very closely with regards to the physical boulder dash rules even though it is using smooth scrolling.
I HAVE gotten a version of smooth scrolling working, but it doesn't follow the boulder dash rules correctly.
This is what I do in my game:
Update (scan) phase:
1. Reset all boulder dash objects in level to not scanned.
2. If any objects are moving (see step 4.), move them to the new location and put a space at the old location.
3. For each level location scan the boulder dash object there.
4. If this object can move this frame, then do this:
a. Flag the object as moving (+ scanned) and in what direction.
b. Put a placeholder (solid, but invisible object) at the new location so other objects can't move there during this scan phase.
Render phase:
During the rendering phase each object is rendered.
If that object is moving, then offset it by some amount equalling to the X/Y direction it is moving in for smooth scrolling.
This works, but my biggest problem is that it is not correct regarding boulder dash physics.
In boulder dash, you can for instance do this little trick:
Moving up from the left and below of a firefly/butterfly WON'T explode it due to how the scanning order works.
In MY version, my character ends up next to the firefly/butterfly (update phase, step 2.), and then that same scan frame, the firefly/butterfly is processed, and BOOOOMMMM!!!
I was wondering if any of you could share how you have done your boulder dash physics IF you are also doing smooth scrolling?
thanks for your time
cheers,
Paul