LOLGraphics Version 2.5


What's new?

Fixed the bug that made it so that getting input using PLZ ASK TEH USR 2 GIMME A ONE/TWO/FOUR/EIGHT BYTE practically impossible. Also, added a switch case "structure" (more on that below), and added a new command that changes the color of the text in the console. Currently it only supports 134 colors predefined in java but i plan to add support for RGB colors as well. Also upgraded the 8624 demo to allow diagonal movement, and also added 2 new example codes: "Fibonacci", and "Changing colors". "Fibonacci" asks the user to enter a number and then prints that amount of numbers from Fibonacci sequence. "Changing colors" does exactly what the name suggests - it changes the color of the text in the console twice every second. 


SWITCH CASE:

Switch case is probably the most important addition in this version. Before this was added, if you wanted to check the value of a variable and run different subprograms based on it, the only option to do this was by using this time-consuming and not very attractive looking code:

PLZ ASK CEILIN KAT 2 CHEK IZ [BUTTON]==8

IF CEILIN KAT IZ NODDING PLZ RUN UP

PLZ ASK CEILIN KAT 2 CHEK IZ [BUTTON]==2

IF CEILIN KAT IZ NODDING PLZ RUN DOWN

PLZ ASK CEILIN KAT 2 CHEK IZ [BUTTON]==4

IF CEILIN KAT IZ NODDING PLZ RUN LEFT

PLZ ASK CEILIN KAT 2 CHEK IZ [BUTTON]==6

IF CEILIN KAT IZ NODDING PLZ RUN RIGHT

Starting from version 2.5, there's a new way to do this: by using switch case. In the switch, you can type any variable or address you want, just remember that this command requires [] for one byte variables, [[]] for two byte variables, [[[]]] for four byte variables, and [[[[]]]] for eight byte variables. In the case, you can type a number or few numbers separated by commas without spaces. Here's an example:

SWITCH [BUTTON]

CASE 8 UP

CASE 2 DOWN

CASE 4 LEFT

CASE 6 RIGHT

CASE 86,68,9 UP_RIGHT

CASE 48,84,7 UP_LEFT

CASE 42,24,1 DOWN_LEFT

CASE 62,26,3 DOWN_RIGHT

As you see much more elegant, and also more flexible. The words you see after the numbers are the subprograms that should be run if the variable is equal to the specified value or one of the specified values. If you don't write the switch line, the default value will be 0.


And here are the example codes if you want them for some reason (despite the fact that they are included in the jar file that is available for download).

New 8462 demo:

HAI 2.5 0 1

IM IN UR CODE EXECUTIN UR KOMANDZ

I HAS A TWO BYTE DAT IZ CALLED X

I HAS A TWO BYTE DAT IZ CALLED Y

I HAS A ONE BYTE DAT IZ CALLED BUTTON

PLZ SET TWO BYTE X 150

PLZ SET TWO BYTE Y 100

PLZ DELIVR MAH CHEEZBURGERS 2 X Y

I CAN HAS A CHEEZBURGER?

FOREVER RUN CHECK

IM OUTTA UR CODE

IM IN UR SUBPROGRAM DAT IZ KALLED CHECK

PLZ SET ONE BYTE BUTTON -1

PLZ READ ONE BYTE BUTTON

SWITCH [BUTTON]

CASE 8 UP

CASE 2 DOWN

CASE 4 LEFT

CASE 6 RIGHT

CASE 86,68,9 UP_RIGHT

CASE 48,84,7 UP_LEFT

CASE 42,24,1 DOWN_LEFT

CASE 62,26,3 DOWN_RIGHT

IM OUTTA UR SUBPROGRAM

IM IN UR SUBPROGRAM DAT IZ KALLED UP

PLZ CLEAR TEH SCREEN

PLZ SET TWO BYTE Y Y-10

PLZ DELIVR MAH CHEEZBURGERS 2 X Y

I CAN HAS A CHEEZBURGER?

IM OUTTA UR SUBPROGRAM

IM IN UR SUBPROGRAM DAT IZ KALLED DOWN

PLZ CLEAR TEH SCREEN

PLZ SET TWO BYTE Y Y+10

PLZ DELIVR MAH CHEEZBURGERS 2 X Y

I CAN HAS A CHEEZBURGER?

IM OUTTA UR SUBPROGRAM

IM IN UR SUBPROGRAM DAT IZ KALLED LEFT

PLZ CLEAR TEH SCREEN

PLZ SET TWO BYTE X X-10

PLZ DELIVR MAH CHEEZBURGERS 2 X Y

I CAN HAS A CHEEZBURGER?

IM OUTTA UR SUBPROGRAM

IM IN UR SUBPROGRAM DAT IZ KALLED RIGHT

PLZ CLEAR TEH SCREEN

PLZ SET TWO BYTE X X+10

PLZ DELIVR MAH CHEEZBURGERS 2 X Y

I CAN HAS A CHEEZBURGER?

IM OUTTA UR SUBPROGRAM

IM IN UR SUBPROGRAM DAT IZ KALLED UP_RIGHT

PLZ CLEAR TEH SCREEN

PLZ SET TWO BYTE X X+10

PLZ SET TWO BYTE Y Y-10

PLZ DELIVR MAH CHEEZBURGERS 2 X Y

I CAN HAS A CHEEZBURGER?

IM OUTTA UR SUBPROGRAM

IM IN UR SUBPROGRAM DAT IZ KALLED UP_LEFT

PLZ CLEAR TEH SCREEN

PLZ SET TWO BYTE X X-10

PLZ SET TWO BYTE Y Y-10

PLZ DELIVR MAH CHEEZBURGERS 2 X Y

I CAN HAS A CHEEZBURGER?

IM OUTTA UR SUBPROGRAM

IM IN UR SUBPROGRAM DAT IZ KALLED DOWN_RIGHT

PLZ CLEAR TEH SCREEN

PLZ SET TWO BYTE X X+10

PLZ SET TWO BYTE Y Y+10

PLZ DELIVR MAH CHEEZBURGERS 2 X Y

I CAN HAS A CHEEZBURGER?

IM OUTTA UR SUBPROGRAM

IM IN UR SUBPROGRAM DAT IZ KALLED DOWN_LEFT

PLZ CLEAR TEH SCREEN

PLZ SET TWO BYTE X X-10

PLZ SET TWO BYTE Y Y+10

PLZ DELIVR MAH CHEEZBURGERS 2 X Y

I CAN HAS A CHEEZBURGER?

IM OUTTA UR SUBPROGRAM


Fibonacci:

HAI 2.5 0 100

IM IN UR CODE EXECUTIN UR KOMANDZ

I HAS A ONE BYTE DAT IZ CALLED MAX

PLZ TYPE TEXT HOW MANY NUMBERS DO   YOU WANT ME TO PRINT?

PLZ ASK TEH USR 2 GIMME A ONE BYTE MAX

PLZ PRINT ONE BYTE MAX

PLZ PRINT TEXT ======================

I HAS A ONE BYTE DAT IZ CALLED I

I HAS A EIGHT BYTE DAT IZ CALLED A

I HAS A EIGHT BYTE DAT IZ CALLED B

I HAS A EIGHT BYTE DAT IZ CALLED C

PLZ SET ONE BYTE I 2

PLZ SET EIGHT BYTE A 0

PLZ SET EIGHT BYTE B 1

PLZ ASK CEILIN KAT 2 CHEK IZ [MAX]>0

IF CEILIN KAT IZ NODDING PLZ RUN PRINT_A

PLZ ASK CEILIN KAT 2 CHEK IZ [MAX]>1

IF CEILIN KAT IZ NODDING PLZ RUN PRINT_B

PLZ ASK CEILIN KAT 2 CHEK IZ [I]<[MAX]

WHILE CEILIN CAT IZ NODDIN PLZ RUN COUNT

IM OUTTA UR CODE

IM IN UR SUBPROGRAM DAT IZ KALLED COUNT

PLZ SET ONE BYTE I I+1

PLZ SET EIGHT BYTE C A

PLZ SET EIGHT BYTE A B

PLZ SET EIGHT BYTE B C+A

PLZ PRINT EIGHT BYTE B

PLZ ASK CEILIN KAT 2 CHEK IZ [I]<[MAX]

IM OUTTA UR SUBPROGRAM

IM IN UR SUBPROGRAM DAT IZ KALLED PRINT_A

PLZ PRINT EIGHT BYTE A

IM OUTTA UR SUBPROGRAM

IM IN UR SUBPROGRAM DAT IZ KALLED PRINT_B

PLZ PRINT EIGHT BYTE B

IM OUTTA UR SUBPROGRAM


Changing colors:

HAI 2.5 0 1

IM IN UR CODE EXECUTIN UR KOMANDZ

PLZ PRINT TEXT HELLO WORLD

PLZ PRINT TEXT THIS IS A CODE IN

PLZ PRINT TEXT LOLGRAPHICS

PLZ PRINT TEXT THE COLOR OF THIS TEXT

PLZ PRINT TEXT WILL CHANGE TWICE

PLZ PRINT TEXT EVERY SINGLE SECOND

PLZ PRINT TEXT ISN'T THAT AMAZING?

PLZ PRINT TEXT

PLZ PRINT TEXT

PLZ PRINT TEXT       O       O

PLZ PRINT TEXT           | 

PLZ PRINT TEXT     

PLZ PRINT TEXT     |           | 

PLZ PRINT TEXT     -------------

PLZ SET DELAY 500

FOREVER RUN CHANGE_COLOR

IM OUTTA UR CODE

IM IN UR SUBPROGRAM DAT IZ KALLED CHANGE_COLOR

PLZ CHANGE TEXT COLOR BLACK

PLZ CHANGE TEXT COLOR BLUE

PLZ CHANGE TEXT COLOR CYAN

PLZ CHANGE TEXT COLOR DARK_GRAY

PLZ CHANGE TEXT COLOR GRAY

PLZ CHANGE TEXT COLOR GREEN

PLZ CHANGE TEXT COLOR LIGHT_GRAY

PLZ CHANGE TEXT COLOR MAGENTA

PLZ CHANGE TEXT COLOR ORANGE

PLZ CHANGE TEXT COLOR PINK

PLZ CHANGE TEXT COLOR RED

PLZ CHANGE TEXT COLOR WHITE

PLZ CHANGE TEXT COLOR YELLOW

IM OUTTA UR SUBPROGRAM

Files

LOLGraphics 2.5.jar 280 kB
Apr 15, 2021

Get LOLGraphics

Leave a comment

Log in with itch.io to leave a comment.