Hi,
I noticed that the current version of Wormux behaves a bit strange when
a level is smaller than the window. Another thing I noticed when
designing a new level: The background is always scrolled a bit slower,
which is a nice effect, but a part of the background is not used if it
is too big. The amount of slowdown can unfortunately not be controlled.
I've been poking around a bit in the code and would like to suggest a
few changes that might resolve the issues above:
* A black margin around the map when the sky and/or the ground are too
small. The interface elements don't have to respect these margins.
* The sky is scrolled in such a way that the both left sides of the
ground and the map coincide when one scrolls completely to the left of a
level. The same goes for the right side. This way a level-designer can
control the amount of slowdown for the scrolling of the sky, by resizing
the sky image.
For the implementation, the following steps might be taken:
1) keep all the information about the margin and the remaining viewport
in the camera object
2) Add a Camera::Reset that is called from Map::Reset, for updating this
margin and viewport information.
3) Write a sort of Camera::DrawMargin
4) Call this method from GameLoop::Draw after all level elements have
been drawn, but before any interface elements are drawn.
5) Rewrite the scrolling behavior in Sky and Camera
Does anyone have other/additional ideas about this? Is it worth
implementing?
What does exactly the method Camera::Refresh exactly do? Is it related?
greetings,
Toon
_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev