QBasic/Advanced Graphics

Basic Movement
Animation is basically graphics that changes over a fixed period of time. In this we will be using a do-loop.

Explanation:
 * 1) We have switched from the default qbasic text-only screen to one which enables graphics.
 * 2) We have called the sub which creates the animation.
 * 3) We have begun the do-loop until. This enables the animation to run until the user ends it by pressing a key.
 * 4) We have set an increment of the coordinates. This allows the box to be drawn on a new position rather than the same one. If it movement in only one direction was wished, we had to set the increment only in one variable.
 * 5) We have drawn lines from each coordinate to another. Note that each time one coordinate remains fixed while the others change.(In this I refer to the two coordinate sets, the first starting and the ending one)
 * 6) We have issued a sleep command . This stops execution for 2 seconds . Without this the do-loop will execute more quickly than we want, and the animation will be very short-lived.
 * 7) By using RND for the variables, you can create a randomized ,unpredictable animation.

Mouse-Control
In this step, we will use the QB64 inbuilt _mousehide,_mousex,_mousey,_mouseinput and _mousebutton commands to control the mouse input.

WARNING
These Functions only work in QB64!


 * 1) Here the first function "_mousehide" prevents the default pointer mouse format to be displayed on the screen
 * 2) Mouseinput function retrieves mouse information.
 * 3) The next functions "_mousex" and "_mousey" hold the current x and y coordinates of the mouse.
 * 4) The lines draw a basic trigger.
 * 5) The "_mousebutton" function returns the value of the mouse button pressed, "1" signifies the left button being pressed.
 * 6) If the mouse button event has taken place within a certain enclosed area, a message in the form of "message$" is issued. This can be used later on.
 * 7) The procedure, if the previous condition has been fulfilled, goes to line label "action" where any commands to be executed may lie.
 * 8) Else, the process loops , until a "loop until" condition has been met. It can also be something other than the one given above.

Usage
These graphics and animations can be used to create a complete game. Instead of the "Mouse" functions, you could use the "Inkey$" command to issue various scenarios and cases, each with a complete code to decide what happens next.

Tip
Instead of making games which do not contain any user information, you could use ".txt" files to store information. This information can be later retrieved to make a game with a complete "Career" option.