This site requires JavaScript, please enable it in your browser!
Greenfoot back
danpost

danpost

Buck Valley, USA

danpost's collections

A collection of scenarios that demonstrate ways to accomplish various tasks. The scenarios are uploaded 'with-source' and the code is open to use freely. NOTE: The Bar class is used in some of these scenarios, which is there only to help in the demo. Use of it is open, but, please do not modify it.
Some re-usable classes for various object types and functionality created by danpost. Quick Reference: Scrolling Scroller Class Demos (Scroller extends Object) [basic implementation for all types of scrolling worlds; recommended] Scrolling SuperWorld (SWorld extends World) [extensive implementation; limited and difficult to work with] Infinite Fixed Side-Scrolling SuperWorld (Scroll extends World) [saves location of actors outside world bounds] Easy Infinite Scroller Support Class (Scroll extends World) [uses wrapping of background image] Horiz/Vert/Univ Scroller (Scroll extends Object) [uses size of background image for limits of scrolling] Bee Quick (ImgScroll demo) [uses size of given background image for limits of scrolling or creates one of given dimensions and fills it with the given image] Object Support (World and Actor support) XWorld XActor Classes (XWorld extends World; XActor extends Actor)[adds helper methods to World and Actor classes] MapWorld SuperClass (MapWorld extends World) [used to create and implement world mappings] Hexagonal SuperWorld (HexWorld extends World) [used to implement an hexagonal world] Super Level Support Class (Level extends World) [used to assist scenarios using multiple world levels] 3D Motion Demo (ThreeD extends Actor) [gives actors apparent depth within the scenario window] Asteroids w/Improved QActor SuperClass (QActor extends Actor) [gives actors smoother movement and rotation] GQActor Superclass Demo (GQActor extends QActor) [adds gravity and drag to actors with built-in movement methods] Animation Support Class (Animation extends Object) [used to implement animation for World and Actor objects] Specialty Worlds Pause World Class (Pause extends World) [used to pause active world] Password Protection Class (Pass extends World) [used to lock an active scenario] TextFile Viewing World Class (TextFileViewer extends World) [used to view text files] Dialog Support Class (Dialog extends World) [used for interactive dialogs] Unique Actors Light Beam Class Demo [creates a beam of light in a range of angles] PIP Actor Class [creates a world inside the active world] Magnifying Glass Actor Class Demo [creates an actor that magnifies what is behind it] Fps Actor Class [displays the current rate of frames, or act cycles, per second] BGMusic Actor Class Demo [creates an object that controls background music for a scenario] ColorSelector and DropDownOptions [one creates a color selector actor; the other, a drop down menu actor] Progress bar/Health bar class (Bar class) [creates a bar object that represents a value within a range of values] Bar Subclasses (extends Bar class) [each subclass creates a different type of bar -- timer, checkbox, changeable value bar] Menu Demo [used with a Button class that has subclasses of Marquiss, Text, DelayButton and BlinkText] Clock w/BgInk Support Class [has a BgInk class that facilitates placing images on the world background] Calendar Actor Class [has an actor that shows any calendar month (changeable)] Miscellaneous Support Time on Your Hands Demo (Timer extends Object) [for internal counters and timers] TextImage Support Class (TextImage extends GreenfootImage) [for easy, versitile text images]
A collection of games that I have accumulated on the site.
A collection of puzzle-type scenarios I have accumulated on the site.
A collection of scenarios I have created that produce fractals, visually aesthetic patterns and the like.

Recent Comments | Show All

@JooshK, just use a zero value for the vertical offset when calling the 'scroll(int, int)' method. For example: scroll(1, 0);
danpost

2023/10/15

@ibrahimnrhd, in most cases, you do not have to modify the Scroller class. The one in this scenario was actually slightly modified to so that a programmer can add some non-scrolling area to the right, to the bottom, or both. This was mainly so you could add stats or any graphic user interface objects to a program.