Report as inappropriate.
A support superclass for an infinite scrolling world;
capable of horizontal, vertical or universal scrolling;
scrolls either independent of any actor or by following an actor;
scrolls background with or without actor relocations;
capable of scrolling actors without scrolling the background image;
capable of limited scrolling as access to field values are provided through getter methods;
The only limitation, which may be dealt with in a later update, is that the scrolling background image is obtained from the world background set at the time the direction of scrolling is set -- however, this would complicate the code with more fields, checks and controls.
Use 'enter' to switch between demo world and sample game world.
'up' and 'down': speed controls
'left' and 'right': directional controls
'enter': go to sample game demo
'up', 'down', 'left', and 'right': 4-way movement controls
'enter': go back to grid world demo
Avoid on-coming rocks.
Grid world demo:
'up', 'down', 'left', 'right': 8-way movement controls
'enter': go back to initial demo
This demo uses my QActor superclass to give the main actor smooth movement and rotation. One method of the scrolling support class has been slightly modified to scroll actors of this type properly. The original method was commented to make available if needed.
5092 views / 5 in the last 7 days
5 votes | 0 in the last 7 days
This scenario is a member of: Support Classes by danpost
Want to leave a comment? You must first log in.