text:
Programming in LOLGraphics 3.4/Making a simple game in LOLGraphics

Introduction
In this tutorial we will make a simple WASD controlled game where you control a square. If you fall in the lava pool, you lose, and if you get to the purple carpet, you will be asked a multiple-choice trivia question (who was the first president of the United States). If you answer it correctly, you win. If you answer it wrong, you lose. Simple enough.

Since the code will be written in parts, this chapter will follow the following conventions: new lines that didn’t exist in the previous version will be colored by green, lines that should be removed will be colored by red, and lines that should stay as they are will be colored by blue.

Drawing the field
You will start of with an empty program. Let’s start by drawing the field. Yeh background will be green like grass, there will be one red square representing a pool of lava, and one magenta square.

HAI 3.4 0 1 IM IN UR CODE EXECUTIN UR KOMANDZ PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR CODE IM IN UR SUBPROGRAM DAT IZ KALLED DRAW_FIELD PLZ CHANGE PAINT BRUSH 0 154 23 PLZ FILL RECT 0 0 630 430 PLZ CHANGE PAINT BRUSH RED PLZ FILL RECT 100 100 50 50 PLZ CHANGE PAINT BRUSH MAGENTA PLZ FILL RECT 300 200 50 50 IM OUTTA UR SUBPROGRAM

Notice that the delay was set to 1. This is the lowest possible and was done on purpose so that the game will run as smoothly as possible.

Drawing the player
The player will be an orange square that can move around the screen.

HAI 3.4 0 1 IM IN UR CODE EXECUTIN UR KOMANDZ PLZ RUN SUBPROGRAM DRAW_FIELD PLZ RUN SUBPROGRAM DEFALT_VARIABLES IM OUTTA UR CODE IM IN UR SUBPROGRAM DAT IZ KALLED DEFALT_VARIABLES I HAS A TWO BYTE DAT IZ CALLED X I HAS A TWO BYTE DAT IZ CALLED Y PLZ SET TWO BYTE X 200 PLZ SET TWO BYTE Y 150 PLZ CHANGE PAINT BRUSH ORANGE PLZ FILL RECT X Y 25 25 IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED DRAW_FIELD PLZ CHANGE PAINT BRUSH 0 154 23 PLZ FILL RECT 0 0 630 430 PLZ CHANGE PAINT BRUSH RED PLZ FILL RECT 100 100 50 50 PLZ CHANGE PAINT BRUSH MAGENTA PLZ FILL RECT 300 200 50 50 IM OUTTA UR SUBPROGRAM

Notice how the drawing happens in the same subprogram where the default variables are set. This will change.

Player movement
As it is, we don’t have much of a game. Let’s implement player movement:

HAI 3.4 0 1 IM IN UR CODE EXECUTIN UR KOMANDZ PLZ RUN SUBPROGRAM DEFALT_VARIABLES PLZ RUN SUBPROGRAM DRAW_FIELD PLZ RUN SUBPROGRAM DEFALT_VARIABLES FOREVER RUN MOVE IM OUTTA UR CODE IM IN UR SUBPROGRAM DAT IZ KALLED DEFALT_VARIABLES I HAS A TWO BYTE DAT IZ CALLED X I HAS A TWO BYTE DAT IZ CALLED Y I HAS A TWO BYTE DAT IZ CALLED BUTTON PLZ SET TWO BYTE X 200 PLZ SET TWO BYTE Y 150 PLZ SET TWO BYTE BUTTON -1 PLZ CHANGE PAINT BRUSH ORANGE PLZ FILL RECT X Y 25 25 IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED DRAW_FIELD PLZ CHANGE PAINT BRUSH 0 154 23 PLZ FILL RECT 0 0 630 430 PLZ CHANGE PAINT BRUSH RED PLZ FILL RECT 100 100 50 50 PLZ CHANGE PAINT BRUSH MAGENTA PLZ FILL RECT 300 200 50 50 PLZ CHANGE PAINT BRUSH ORANGE PLZ FILL RECT X Y 25 25 IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED MOVE PLZ READ CHAR BUTTON SWITCH BUTTON CASE 56,87,119 UP CASE 52,65,97 LEFT CASE 50,83,115 DOWN CASE 54,68,100 RIGHT IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED UP PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE Y Y-10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED DOWN PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE Y Y+10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED LEFT PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE X X-10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED RIGHT PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE X X+10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM

Notice that the player drawing routine was moved to the field, and that the program now sets default values before it starts drawing. Also in the switch/case statement, it compares the variables to the ASCII values of WASD and 8462 keys.

Detecting Lava
Now we have completed the movement, but you can walk wherever you want including on top of lava. Let’s fix that. Let’s add code that detects when you fell in lava and end the game.

HAI 3.4 0 1 IM IN UR CODE EXECUTIN UR KOMANDZ PLZ RUN SUBPROGRAM DEFALT_VARIABLES PLZ RUN SUBPROGRAM DRAW_FIELD FOREVER RUN MOVE IM OUTTA UR CODE IM IN UR SUBPROGRAM DAT IZ KALLED DEFALT_VARIABLES I HAS A TWO BYTE DAT IZ CALLED X I HAS A TWO BYTE DAT IZ CALLED Y I HAS A TWO BYTE DAT IZ CALLED BUTTON PLZ SET TWO BYTE X 200 PLZ SET TWO BYTE Y 150 PLZ SET TWO BYTE BUTTON -1 IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED DRAW_FIELD PLZ CHANGE PAINT BRUSH 0 154 23 PLZ FILL RECT 0 0 630 430 PLZ CHANGE PAINT BRUSH RED PLZ FILL RECT 100 100 50 50 PLZ CHANGE PAINT BRUSH MAGENTA PLZ FILL RECT 300 200 50 50 PLZ CHANGE PAINT BRUSH ORANGE PLZ FILL RECT X Y 25 25 IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED MOVE PLZ READ CHAR BUTTON SWITCH BUTTON CASE 56,87,119 UP CASE 52,65,97 LEFT CASE 50,83,115 DOWN CASE 54,68,100 RIGHT PLZ RUN SUBPROGRAM CKECK_LAVA_X IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED UP PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE Y Y-10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED DOWN PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE Y Y+10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED LEFT PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE X X-10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED RIGHT PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE X X+10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED FELL_IN_LAVA PLZ PRINT TEXT YOU FELL IN LAVA IM OUTTA UR CODE IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_LAVA_X SWITCH X CASE 80,90,100,110,120,130,140 CKECK_LAVA_Y IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_LAVA_Y SWITCH Y CASE 80,90,100,110,120,130,140 FELL_IN_LAVA IM OUTTA UR SUBPROGRAM Now if you fall in the lava, you get a message informing you about this, and the game ends. Notice that because the player starts at coordinates (200,150) and moves at a speed of 10 pixels/iteration, both the x and y values will always be numbers that can evenly be divided by 10.

Detecting Carpet
Now we can detect when the player enters lava, let’s also detect when the player steps on the carpet.

HAI 3.4 0 1 IM IN UR CODE EXECUTIN UR KOMANDZ PLZ RUN SUBPROGRAM DEFALT_VARIABLES PLZ RUN SUBPROGRAM DRAW_FIELD FOREVER RUN MOVE IM OUTTA UR CODE IM IN UR SUBPROGRAM DAT IZ KALLED DEFALT_VARIABLES I HAS A TWO BYTE DAT IZ CALLED X I HAS A TWO BYTE DAT IZ CALLED Y I HAS A TWO BYTE DAT IZ CALLED BUTTON PLZ SET TWO BYTE X 200 PLZ SET TWO BYTE Y 150 PLZ SET TWO BYTE BUTTON -1 IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED DRAW_FIELD PLZ CHANGE PAINT BRUSH 0 154 23 PLZ FILL RECT 0 0 630 430 PLZ CHANGE PAINT BRUSH RED PLZ FILL RECT 100 100 50 50 PLZ CHANGE PAINT BRUSH MAGENTA PLZ FILL RECT 300 200 50 50 PLZ CHANGE PAINT BRUSH ORANGE PLZ FILL RECT X Y 25 25 IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED MOVE PLZ READ CHAR BUTTON SWITCH BUTTON CASE 56,87,119 UP CASE 52,65,97 LEFT CASE 50,83,115 DOWN CASE 54,68,100 RIGHT PLZ RUN SUBPROGRAM CKECK_LAVA_X IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED UP PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE Y Y-10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED DOWN PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE Y Y+10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED LEFT PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE X X-10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED RIGHT PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE X X+10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED FELL_IN_LAVA PLZ PRINT TEXT YOU FELL IN LAVA IM OUTTA UR CODE IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_LAVA_X SWITCH X CASE 80,90,100,110,120,130,140 CKECK_LAVA_Y PLZ RUN SUBPROGRAM CKECK_CARPET_X IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_LAVA_Y SWITCH Y CASE 80,90,100,110,120,130,140 FELL_IN_LAVA IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED ON_CARPET PLZ PRINT TEXT YOU WIN IM OUTTA UR CODE IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_CARPET_X SWITCH X CASE 280,290,300,310,320,330,340 CKECK_CARPET_Y IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_CARPET_Y SWITCH Y CASE 180,190,200,210,220,230,240 ON_CARPET IM OUTTA UR SUBPROGRAM

Trivia question
Now when you step on the carpet, you win instantly. Let’s make it so that you will get a trivia question and only win if you answered correctly.

HAI 3.4 0 1 IM IN UR CODE EXECUTIN UR KOMANDZ PLZ RUN SUBPROGRAM DEFALT_VARIABLES PLZ RUN SUBPROGRAM DRAW_FIELD FOREVER RUN MOVE IM OUTTA UR CODE IM IN UR SUBPROGRAM DAT IZ KALLED DEFALT_VARIABLES I HAS A TWO BYTE DAT IZ CALLED X I HAS A TWO BYTE DAT IZ CALLED Y I HAS A TWO BYTE DAT IZ CALLED BUTTON PLZ SET TWO BYTE X 200 PLZ SET TWO BYTE Y 150 PLZ SET TWO BYTE BUTTON -1 IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED DRAW_FIELD PLZ CHANGE PAINT BRUSH 0 154 23 PLZ FILL RECT 0 0 630 430 PLZ CHANGE PAINT BRUSH RED PLZ FILL RECT 100 100 50 50 PLZ CHANGE PAINT BRUSH MAGENTA PLZ FILL RECT 300 200 50 50 PLZ CHANGE PAINT BRUSH ORANGE PLZ FILL RECT X Y 25 25 IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED MOVE PLZ READ CHAR BUTTON SWITCH BUTTON CASE 56,87,119 UP CASE 52,65,97 LEFT CASE 50,83,115 DOWN CASE 54,68,100 RIGHT PLZ RUN SUBPROGRAM CKECK_LAVA_X IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED UP PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE Y Y-10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED DOWN PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE Y Y+10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED LEFT PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE X X-10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED RIGHT PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE X X+10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED FELL_IN_LAVA PLZ PRINT TEXT YOU FELL IN LAVA PLZ PRINT TEXT PLZ PRINT TEXT YOU LOSE IM OUTTA UR CODE IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_LAVA_X SWITCH X CASE 80,90,100,110,120,130,140 CKECK_LAVA_Y PLZ RUN SUBPROGRAM CKECK_CARPET_X IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_LAVA_Y SWITCH Y CASE 80,90,100,110,120,130,140 FELL_IN_LAVA IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED ON_CARPET PLZ PRINT TEXT WHO WAS THE FIRST PLZ PRINT TEXT WHO PRESIDENT OF THE PLZ PRINT TEXT UNITED STATES? PLZ PRINT TEXT PLZ PRINT TEXT 1) RICHARD NIXON PLZ PRINT TEXT 2) GEORGE WASHINGTON PLZ PRINT TEXT 3) DONALD TRUMP PLZ PRINT TEXT 4) JOHN ADAMS I HAS A ONE BYTE DAT IZ CALLED ANSWER PLZ ASK TEH USR 2 GIMME A ONE BYTE ANSWER PLZ CLEAR TEH CONSOLE SWITCH [ANSWER] LABELCASE 2 WIN PLZ PRINT TEXT YOU LOSE! PLZ GOTO LABEL END DIS IZ MY LABEL! IT IZ KALLED WIN PLZ PRINT TEXT YOU WIN! DIS IZ MY LABEL! IT IZ KALLED END IM OUTTA UR CODE IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_CARPET_X SWITCH X CASE 280,290,300,310,320,330,340 CKECK_CARPET_Y IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_CARPET_Y SWITCH Y CASE 180,190,200,210,220,230,240 ON_CARPET IM OUTTA UR SUBPROGRAM

Now when you step on the carpet, you will get asked who was the first president of the United States. Also, when you fall im lava, the text “You lose” is displayed in addition to “You fell in lava”. This “game” can be considered complete, however there’s one more thing we are going to add.

Slight improvement
You would expect that after the player falls in lava, he would not be drawn on the screen. However this is not what happens in the game as of now. Let’s fix this. There are multiple ways to do so: So here’s the improved code:
 * 1) One way, is to set the x and y values of the player to something out of bounds and then redraw the screen. This will cause the player to be “drawn” but because it will be out of the screen you won’t see him. Feel free to use this way, but this is not what we are going to use in this book.
 * 2) The second way is it to create a one-byte variable called IN_LAVA, set it to 0, and when the player falls in lava, set it to 1. The drawing routine will check the value of this variable and set if it’s equal to 1, the player won’t be drawn. Feel free to use it in your code, but this isn’t what we will be doing in this book.
 * 3) The third way would be to set the value of x or y to a number like -1 and then in the drawing routine to check if x==-1, and if yes then the player won’t be drawn. You can use any number that can’t be evenly divided by 10 and it won’t have any effect on how the code runs because the player moves at a speed of 10 pixel/iteration and starts with x,y coordinates that can be evenly divided by 10. This is what we will do.

HAI 3.4 0 1 IM IN UR CODE EXECUTIN UR KOMANDZ PLZ RUN SUBPROGRAM DEFALT_VARIABLES PLZ RUN SUBPROGRAM DRAW_FIELD FOREVER RUN MOVE IM OUTTA UR CODE IM IN UR SUBPROGRAM DAT IZ KALLED DEFALT_VARIABLES I HAS A TWO BYTE DAT IZ CALLED X I HAS A TWO BYTE DAT IZ CALLED Y I HAS A TWO BYTE DAT IZ CALLED BUTTON PLZ SET TWO BYTE X 200 PLZ SET TWO BYTE Y 150 PLZ SET TWO BYTE BUTTON -1 IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED DRAW_FIELD PLZ CHANGE PAINT BRUSH 0 154 23 PLZ FILL RECT 0 0 630 430 PLZ CHANGE PAINT BRUSH RED PLZ FILL RECT 100 100 50 50 PLZ CHANGE PAINT BRUSH MAGENTA PLZ FILL RECT 300 200 50 50 SWITCH X LABELCASE -1 END PLZ CHANGE PAINT BRUSH ORANGE PLZ FILL RECT X Y 25 25 IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED MOVE PLZ READ CHAR BUTTON SWITCH BUTTON CASE 56,87,119 UP CASE 52,65,97 LEFT CASE 50,83,115 DOWN CASE 54,68,100 RIGHT PLZ RUN SUBPROGRAM CKECK_LAVA_X IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED UP PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE Y Y-10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED DOWN PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE Y Y+10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED LEFT PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE X X-10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED RIGHT PLZ SET TWO BYTE BUTTON -1 PLZ SET TWO BYTE X X+10 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED FELL_IN_LAVA PLZ PRINT TEXT YOU FELL IN LAVA PLZ PRINT TEXT PLZ PRINT TEXT YOU LOSE PLZ SET TWO BYTE X -1 PLZ RUN SUBPROGRAM DRAW_FIELD IM OUTTA UR CODE IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_LAVA_X SWITCH X CASE 80,90,100,110,120,130,140 CKECK_LAVA_Y PLZ RUN SUBPROGRAM CKECK_CARPET_X IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_LAVA_Y SWITCH Y CASE 80,90,100,110,120,130,140 FELL_IN_LAVA IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED ON_CARPET PLZ PRINT TEXT WHO WAS THE FIRST PLZ PRINT TEXT WHO PRESIDENT OF THE PLZ PRINT TEXT UNITED STATES? PLZ PRINT TEXT PLZ PRINT TEXT 1) RICHARD NIXON PLZ PRINT TEXT 2) GEORGE WASHINGTON PLZ PRINT TEXT 3) DONALD TRUMP PLZ PRINT TEXT 4) JOHN ADAMS I HAS A ONE BYTE DAT IZ CALLED ANSWER PLZ ASK TEH USR 2 GIMME A ONE BYTE ANSWER PLZ CLEAR TEH CONSOLE SWITCH [ANSWER] LABELCASE 2 WIN PLZ PRINT TEXT YOU LOSE! PLZ GOTO LABEL END DIS IZ MY LABEL! IT IZ KALLED WIN PLZ PRINT TEXT YOU WIN! DIS IZ MY LABEL! IT IZ KALLED END IM OUTTA UR CODE IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_CARPET_X SWITCH X CASE 280,290,300,310,320,330,340 CKECK_CARPET_Y IM OUTTA UR SUBPROGRAM IM IN UR SUBPROGRAM DAT IZ KALLED CKECK_CARPET_Y SWITCH Y CASE 180,190,200,210,220,230,240 ON_CARPET IM OUTTA UR SUBPROGRAM

Notice that the label “END” is the same one in the carpet subprogram. This doesn’t matter since after it there’s  which ends the program.


text:
Cookbook:Coconut Oil

Coconut oil, alternatively called coconut butter, is an edible fat derived from coconut flesh.

Characteristics
The fat is solid and white when below 25°C (77°F), above which it melts to a clear oily liquid. This property causes it to retain structural characteristics at many room temperatures, while melting on the tongue and avoiding greasiness. It does, however, mean that melted coconut oil can congeal if even slightly cold ingredients are added to it. Sometimes coconut oil may be hydrogenated to keep it solid at warmer temperatures.

Commercially, coconut oil is available in a few different varieties as either unrefined or refined. The unrefined oil, which may also be referred to as "virgin" oil, is simply pressed and separated from the coconut meat. It has a low smoke point of about 350°F (180°C). The refined oil is heated and filtered, which removes any coconut aroma and raises the smoke point to 400–450°F (205–232°C).

Selection and storage
Choose coconut oil according to how you plan on using it. High-heat cooking where coconut flavor is not important should use refined oil to take advantage of its higher smoke point. For other uses, unrefined oil can be used. Store coconut oil in an airtight container away from light and heat to prevent degradation. If you want it to be consistently solid, you can store it in the fridge.

Use
Due to its partial similarities with butter, coconut oil can be used in baking as a non-dairy fat. Because of its lower melting point, it will contribute less of a greasy mouthfeel than another non-dairy solid fat like shortening. You do, however, need to make sure it's in a solid state to take advantage of certain things like creaming or making flaky pastry. Refined coconut oil can be used in high-heat cooking applications such as frying.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Cookbook:Coconut Oil


text:
History of wireless telegraphy and broadcasting in Australia/Topical/Biographies/Alan Owen Burrows

Potted Biography
Burrows, Alan Owen [150] - 1901(NSW)-1933(NSW) - Licences: Nil yet identified - Qualifications: cc; Nil yet identified - radio correspondent (Sydney Morning Herald, Sydney Sun); proprietor Miss F. V. Wallace (Wireless Shop), 1927-1933; president Waverley Radio Club - Electoral Rolls: radio dealer (Waverley, 1930-1933) - Comment: Gone too soon

Brief Biography
Alan Owen Burrows was born 5 February 1901 at Windsor, NSW to Parents Richard Burrows and Eveline Mary Georgina Burrows nee Barraclough. Little is known of his young life, but clearly he had an early interest in journalism, and from 1922 occasional articles appeared in the Sydney Sun on a variety of domestic and radio topics, such as "Jewellery as an Art", "The Public Library", "Jewellery by Auction", "Wireless School at Work", "Everyday Surnames", "The Amateur Bushranger" and "Making it Yourself".

On 5 May 1924, he commenced a regular weekly column with the Sun exclusively devoted to radio and adopted the name "Ad Astra". The column focused upon the practical aspects of listening in, such as construction of sets and choices to be made in part selection.

From 6 August 1924, the name of the column was changed to "Wireless & Radio", together with a fancy graphic masthead, still staying with the Sydney Sun. Like most journalists of the day, he fell in line with the regulator and voiced opinions against inexperienced operators using regenerative sets and unlicensed listers poaching broadcasting programmes. He saw the need for programmes variety being fulfilled by the amateur broadcasters but did not promote individual operators. In November 1924 he was quick to announce two-way communication between Australia & England.

From 12 June 1925, Alan swung his allegiances to The Sydney Morning Herald, initially changing the name of his column to "Wireless Notes and News", but likely after complaint from similarly named columns in NSW, to just "Wireless" (3 July 1925). This column continued, largely unaltered to 20 July 1927.

On 2 August 1927, after more than two years with the SMH, he returned to the Sydney Sun, with the column name returning also to "Wireless & Radio", including even the original masthead graphic. The column continued uninterrupted until the final copy of 30 September 1930.

Resources
A comprehensive biography of Alan Owen Burrows has not yet been prepared for this Wikibook, however the following resources have been assembled in preparation:

 * Research - Alan Owen Burrows - Summary of research to date

 * Transcriptions and Notes - Alan Owen Burrows - More than 20 transcriptions and notes in chronological order (reads like a detailed biography)

 * Photos, QSL cards and other graphics - Alan Owen Burrows - Nothing uploaded as yet, but several photos identified

 * Incubator of Wikipedia Article on Alan Owen Burrows - Coming real soon now!

Key Articles
Some gems prospected from Trove:


text: Shelf:Roblox

title: Shelf:Roblox


text: Shelf:Roblox/ancestry

title: Shelf:Roblox/ancestry


text: Category:Shelf:Roblox

title: Category:Shelf:Roblox


text: Category:Shelf:Roblox/all books

title: Category:Shelf:Roblox/all books


text: Subject:Roblox

title: Subject:Roblox


text: Category:Subject:Roblox

title: Category:Subject:Roblox


text: Category:Subject:Roblox/all books

title: Category:Subject:Roblox/all books


text:
User talk:2603:9000:8603:8E00:D9A3:2951:F277:AF52

Hi. I am almost sure about where you received the information, because I know most of this information is incomplete. If it is removed, then I thank you.


text:
The Story of Rhodesia/Printable version (Alternate)

= Part 1: Pre-Colonial History =

Matabeleland (Ndebele Kingdom)
=Part 2: Company Rule in Rhodesia=

Military & Involvement in the second Boers War, WWI
=Part 3: Colonial History of Southern Rhodesia=

Central African Federation & Return to “Rhodesia”
=Part 4: Rhodesia Under U.D.I.=

Rhodesia's Unilateral Declaration of Independence
= End Notes = ==Authors and Contributors


text: Subject:Grand Theft Auto

title: Subject:Grand Theft Auto


text: Category:Subject:Grand Theft Auto

title: Category:Subject:Grand Theft Auto


text: Category:Subject:Grand Theft Auto/all books


text: Shelf:Grand Theft Auto

title: Shelf:Grand Theft Auto


text: Category:Shelf:Grand Theft Auto/all books


text: Category:Shelf:Grand Theft Auto

title: Category:Shelf:Grand Theft Auto


text: Shelf:Grand Theft Auto/ancestry

title: Shelf:Grand Theft Auto/ancestry


text:
User talk:VectorVoyager

/wiki/Bash_Shell_Scripting#Shell_arithmetic

is it right?

tt style="white-space:nowrap">3 + 4</code

title: User talk:VectorVoyager


text:
Cookbook:Schmaltz

Schmaltz is a rendered chicken or goose fat, analogous to beef tallow and pork lard. It is considered a staple of Ashkenazi Jewish cooking, but it is versatile and can be used in many different cuisines.

Recipes Using Schmaltz

 * Kugel

title: Cookbook:Schmaltz


text:
Cookbook:Tallow

Tallow is the rendered fat from beef or mutton. It is similar to beef suet, although the two are not interchangeable. Tallow is solid at room temperature and has a relatively high smoke point, making it useful for frying.

title: Cookbook:Tallow


text:
User talk:JackPotte/2022

How we will see unregistered users
Hi!

You get this message because you are an admin on a Wikimedia wiki.

When someone edits a Wikimedia wiki without being logged in today, we show their IP address. As you may already know, we will not be able to do this in the future. This is a decision by the Wikimedia Foundation Legal department, because norms and regulations for privacy online have changed.

Instead of the IP we will show a masked identity. You as an admin will still be able to access the IP. There will also be a new user right for those who need to see the full IPs of unregistered users to fight vandalism, harassment and spam without being admins. Patrollers will also see part of the IP even without this user right. We are also working on better tools to help.

If you have not seen it before, you can read more on Meta. If you want to make sure you don’t miss technical changes on the Wikimedia wikis, you can subscribe to the weekly technical newsletter.

We have two suggested ways this identity could work. We would appreciate your feedback on which way you think would work best for you and your wiki, now and in the future. You can let us know on the talk page. You can write in your language. The suggestions were posted in October and we will decide after 17 January.

Thank you. /Johan (WMF)

18:14, 4 January 2022 (UTC)

Ummm.....
This "If you publish a message on JackBot's talk it will stop" thing is weird. Maybe SEMI-protect it so that some vandal doesn't disable JackBot.... T. Gregtregretgtr (discuss • contribs) 23:30, 17 January 2022 (UTC)
 * Hello, when I started this system on Wikipedia, it was just to avoid to be blocked by admins in case of error: I was inexperienced and needed every one to participate to my beta tests. But now that I have more automatic tests, I'll think about it. JackPotte (discuss • contribs) 07:48, 18 January 2022 (UTC)

Deleted works of fiction.
Hi, I have recently asked an admin to email me 3 deleted works of fiction from here. I understand that they are out of scope for this project and I don’t request to revive the,. I’m only interested in reading them. Anyways, I feel bad asking the same user multiple times, so could you please email me the content of Uniquel Love, Statistics proverbs, When not to use half as the threshold, The Tale of the Headless Postman? Thanks in advance. -Gifnk dlm 2020 From Middle English Wikipedia 📜📖💻 (talk) 08:41, 25 January 2022 (UTC)
 * Hello if you don't want to feel bad by pinging people, on several talk pages (for the same topic if untreated), and have a quicker answer, just use Requests_for_deletion. Then, the first available volunteers will handle the request. JackPotte (discuss • contribs) 11:51, 29 January 2022 (UTC)
 * Thank you very much! I will do that! -Gifnk dlm 2020 From Middle English Wikipedia 📜📖💻 (talk) 14:21, 29 January 2022 (UTC)

Oi
i’m using those pages for the book creator so can you just userspace them instead of deleting them thanks Juuudfufhbf (discuss • contribs) 01:26, 6 February 2022 (UTC)
 * You mean, like this: User:Juuudfufhbf/The legend book? JackPotte (discuss • contribs) 08:24, 6 February 2022 (UTC)

yes Juuudfufhbf (discuss • contribs) 16:53, 6 February 2022 (UTC)

StoryBots (Google Sites)/Netflix
Any idea what this is and similar edits by the same editor? --Xania   talk 03:32, 16 April 2022 (UTC)
 * Hello, it seems to be a bunch of heterogeneous topics relative to StoryBots, and I can't see how it could be admitted here as a pedagogic book. JackPotte (discuss • contribs) 06:43, 16 April 2022 (UTC)
 * Hi, thanks for your reply. I've queried these pages. I'll see if there's any improvement in the next few days.--Xania [[Image:Flag_of_the_Isle_of_Mann.svg|15px]] [[Image:Flag_of_Ukraine.svg|15px]] talk 08:03, 16 April 2022 (UTC)

How do wiki bots work
Hi Jack, I see that you are operating a bot JackBot. Is there a clear tutorial on creating a bot? I’m interested in creating one that will query the list of editors from this tool and keep the authors and contributors page of books up to date and hopefully to learn more about how wikibots work. I understand that the bots run client side. Thank in advance, - 🇺🇦 Слава🇺🇦Україні 🇺🇦 Героям🇺🇦Слава🇺🇦 (talk)🇺🇦 08:33, 26 July 2022 (UTC)
 * Hello, I don't know if https://meta.toolforge.org/catanalysis has an API or if it would need to parse the human site. However there are a few pages to read to create a bot:
 * w:Help:Creating a bot
 * Perlwikibot
 * MediaWiki API/Pywikibot
 * JackPotte (discuss • contribs) 20:24, 27 July 2022 (UTC)

 * Thank you very much! - 🇺🇦 Слава🇺🇦Україні 🇺🇦 Героям🇺🇦Слава🇺🇦 (talk)🇺🇦 06:59, 28 July 2022 (UTC)

FYI
Regarding the recent "broken redirect"/"orphaned talk" deletions after the weird page moves, see Special:Log/merge (last two entries). Thanks, 𝟙𝟤𝟯𝟺𝐪𝑤𝒆𝓇𝟷𝟮𝟥𝟜𝓺𝔴𝕖𝖗𝟰 (𝗍𝗮𝘭𝙠) 22:30, 3 October 2022 (UTC)

Moved book
Hello, You moved a book with the reason "too small to be a book". I didn't find any size requirements for books. Can you help here? Con-struct (discuss • contribs) 17:47, 26 October 2022 (UTC)
 * Hello, the growth part is explained into Using Wikibooks/How To Structure A Wikibook, and the smallest books are located into Category:One-page books. But there isn't any fixed precise characters number. So, we have to use common sense and think about the usefulness for the readers who find the stub from the search engine. JackPotte (discuss • contribs) 19:50, 26 October 2022 (UTC)

Created a new bot
Hi Jack, I have written the code for a bot to update the authors and contributors page of books. I would like to test it but I have a vpn on my computer. Could you please give an ip block exemption to User:AuthorsAndContributorsBot? Thanks in advance, - 🇺🇦 Слава🇺🇦Україні 🇺🇦 Героям🇺🇦Слава🇺🇦 (talk)🇺🇦 19:36, 2 November 2022 (UTC)

 * Btw, I intend to only run it on one book at first (Programming in LOLGraphics 3.4) to test. If it causes trouble, I will revert the edit myself. - 🇺🇦 Слава🇺🇦Україні 🇺🇦 Героям🇺🇦Слава🇺🇦 (talk)🇺🇦 19:42, 2 November 2022 (UTC)

 * I have disabled the VPN to test the bot but it got blocked by edit filter. Could you please unblock it? Thanks in advance, - 🇺🇦 Слава🇺🇦Україні 🇺🇦 Героям🇺🇦Слава🇺🇦 (talk)🇺🇦 20:09, 2 November 2022 (UTC)
 * Hello, apparently [//en.wikibooks.org/wiki/Special:AbuseLog/277367 the filter 71 had been created to avoid to ping some of our contributors], who have contributed to the book you tried to update with their names. So this must be a recurrent problem if I just unblock the bot. I'm going to see what's best. JackPotte (discuss • contribs) 20:17, 2 November 2022 (UTC)
 * I've killed two birds with one stone by allowing the IP block exempted (like your bot since now) to bypass this filter. JackPotte (discuss • contribs) 20:34, 2 November 2022 (UTC)

 * Thank you very much! I have tested the bot and it works. Currently it’s only from a list of books defined in the code though I might change it in the future. - 🇺🇦 Слава🇺🇦Україні 🇺🇦 Героям🇺🇦Слава🇺🇦 (talk)🇺🇦 20:48, 2 November 2022 (UTC)

Adding my bot to bot user group
Hi Jack, could you please add User:AuthorsAndContributorsBot to the bots user group? I think it’s annoying that edits by a bot a listed as edits by human users in Special:RecentChanges. Thanks in advance, - 🇺🇦 Слава🇺🇦Україні 🇺🇦 Героям🇺🇦Слава🇺🇦 (talk)🇺🇦 23:25, 3 November 2022 (UTC)
 * Hello actually, as described in Bots, this bot flag request should be submitted in Requests for permissions. JackPotte (discuss • contribs) 20:31, 4 November 2022 (UTC)

 * Thank you very much! - 🇺🇦 Слава🇺🇦Україні 🇺🇦 Героям🇺🇦Слава🇺🇦 (talk)🇺🇦 21:49, 4 November 2022 (UTC)

Cookbook redirects question
Hello! I had asked MarcGarver some questions about redirects in the cookbook, but I haven't heard back and I wanted to get your feedback/opinion as well. Also mentioning @Xania since they've worked on the cookbook for a while. Thanks! —Kittycataclysm (discuss • contribs) 22:20, 17 November 2022 (UTC)
 * Hello, I'm not the best specialist for that but I've expressed my humble opinion on the MarcGarver's talk page. JackPotte (discuss • contribs) 12:16, 19 November 2022 (UTC)
 * Thank you! —Kittycataclysm (discuss • contribs) 15:05, 24 November 2022 (UTC)

COINTELPRO page deleted
Hi Jack, you have deleted a page I have worked on with a few of my peers - COINTELPRO: The FBI, Civil Rights, and Domestic Surveillance. I'm not sure why you would delete this because it was requested of us by our professor as an addition to a guidebook called Lentis (which was created by said professor). Can you please undo the deletion of the article? You essentially deleted our homework assignment. Thanks, Marshall M. Marshall-msm8key (discuss • contribs) 18:45, 1 December 2022 (UTC)
 * ✅ Hello I'm sorry about that but the page contained a template telling me that it wasn't conform for more than one week. Today I've restored and renamed it to be in Lentis according to Naming policy. JackPotte (discuss • contribs) 07:01, 2 December 2022 (UTC)
 * Thank you for restoring the page. Our group is new to publishing on Wikibooks so if there are any more issues feel free to contact us and let us know what's wrong. Marshall-msm8key (discuss • contribs) 07:40, 2 December 2022 (UTC)

title: User talk:JackPotte/2022


text: User:MdsShakil/sandbox

title: User:MdsShakil/sandbox


text:
Signetics 2650 & 2636 programming/Indexed branching

BSXA and BXA
These two instructions enable indexed branching. BXA is an unconditional indexed branch, while BSXA is an unconditional indexed branch to a subroutine. Register 3 must be specified as the index register.

The example below uses the BSXA instruction to execute one of four subroutines selected by the value in R3. Stepping through this with the WinArcadia debugger is a good way to understand how it works. mybyte equ     $1F0E      ; define a variable lodi,r0 $20       ; initialise program status word, just to be sure! lpsu              ; inhibit interrupts, stack pointer=0 lpsl              ; register bank 0, without carry, arithmetic compare stra,r0 mybyte loop: lodi,r3 0           ;go and subtract 1 bsxa   mysubs,r3 lodi,r3 9           ;go and multiply by 4 bsxa   mysubs,r3 lodi,r3 6           ;go and add 16 bsxa   mysubs,r3 lodi,r3 3           ;go and divide by 2 bsxa   mysubs,r3 bctr,un loop mysubs: x0:    bcta,un subtract1 x3:    bcta,un divide2 x6:    bcta,un add16 x9:    bcta,un multiply4

subtract1: loda,r0 mybyte subi,r0 1 stra,r0 mybyte retc,un

divide2: loda,r0 mybyte rrr,r0 stra,r0 mybyte retc,un

add16: loda,r0 mybyte addi,r0 16 stra,r0 mybyte retc,un

multiply4: loda,r0 mybyte rrl,r0 rrl,r0 stra,r0 mybyte retc,un Some points to note:
 * The index register must be R3
 * The index value goes in steps of three because the bcta instructions are three bytes long.
 * If the subroutines were all close enough together, bctr instructions could be used and the index would go in steps of two.
 * In some scenarios the table of branch instructions, mysubs, could be omitted altogether but the index values would be rather haphazard and might be difficult to maintain.

Creating a state machine
Indexed branching might typically be used where a 'case statement' would be used in a high-level language. One application of BSXA is to create a state machine to control parts of a program. It might be something global such as controlling which part of the program is running: splash screen, attract mode, select level screen, game play, or game over screen. It might also be used to control the state of certain elements within a program.

The code for this tutorial can be found at 'State machine'. In this program, the code draws two objects, one of them moving along a rectangular path, the other a triangular path. This could be done with code that tests the objects position and determines which way to move it on every frame, but this can quickly get messy. In a state machine model, the object moving in a rectangular pattern is in one four states: moving right, moving down, moving left or moving up. Each state does a check after every move to see if it has reached its endpoint, at which time it changes the state of the machine to the next operation. A variable is used to keep track of the state, and this acts as the index to the appropriate subroutine. In this code, a second state machine asynchronously controls the object moving on the triangular path.

Exercise
Add a third state machine that controls a blue rectangle moving back-and-forth along a path like a greater-than symbol, >