Hello Fish here,
I’m here to talk about the advanced tab in Makecode!
while you can code some cool stuff without it using it can take your games to another level
(mostly Functions and arrays)
this isn’t meant to be a end all be all for everything here but more so a starters guide to using these blocks
Arrays
Arrays are a datatype That hold MORE data that can also be changed during your game
All arrays are indexed meaning that data inside can be easily retrieved and in this case you do that buy using numbers
Arrays start at 0 then count up
0,1,2,3, . . .
Example
Running this code would splash “Are” because 1 is the second piece of our array if we wanted to splash “Cool” we would need to change the 1 to a 2
Another Cool thing about arrays is that ANY data type can be used Including itself!
But any array can only hold 1 type of data so if you had a picture array you couldn’t add a String or a number to it.
(you can in other languages but not in makecode arcade)
Now onto editing Arrays mid game
this code changes the array from
0:Arrays 1:Are 2:Cool
to
0:You 1:Are 2:Cool 3:| : D
Changing Value 0 changes the first value
Then adding a value to the end of a array increases its length with the new data
you can also use negative values to start from the end of a array
this would change the array from
0:Arrays 1:Are 2:Cool
to
0:Are 1:You
you set the LAST(-1) value to You
Then remove the first value
Functions
Functions are quite simple
Any Code you add to a function will run every time you call it
you can also add parameters that act as temporary Variables you can use
Example
This function takes 2 values
A Image and a Sprite
It creates a sprite using the img and then places the new sprite on the Sprite defined earlier
you can also Return Values using Functions
Example
This function takes 1 Value
An Image Array (Because Animations are just An Array of imgs!)
And Flips each img in the array then returns a new Array with the new values
Using this Function ive been able to half all my time Copying animations
Both of those animations are the same but because of the function i can recreate a flipped version instantly!
You can also edit and create a “Call” block by right clicking the function
Images and Animations
So Images are quite important when creating any game and just setting a image when you create a sprite is nice but it can be taken a step further
one important thing to under stand about Animations is that they are just image array!
And this works in the inverse too
And that’s mostly it for animations as this post isn’t about the animation process
if you are interested in that check this out
Now to the fun part
Image manipulation is quite important if you want to use the same image twice or more times even if its just rotated
this can be nice if you just need a sprite to turn around or a recolor of a image you have already made
You can also use arrays to change every part of an Animation
just be sure to use the Clone image block to not change the original
using this you can create any* rotation of a animation you have by combining Images Functions and arrays!
*without extensions you can only create **90o rotations of a image or animations
**and to get the 90o rotation you need to go into ***java or python
***im not sure why its not a block
Have you ever Run into tile issues where you have to many tiles or some tiles that are only used once?(i swear this is about images)
Well there is a simple fix!
You can use images instead of tiles when changing them
you can take this ever farther by using Arcade-Tile-Utils
Ill go into greater depth about how great tile-utils is in a later post
Text and Console
First thing to understand about Strings(Text) is that. . .
its arrays, it’s all arrays you can’t escape.
Ill go over each of these in order

Length
Returns the length of a string
example
Hello
would return 5
Join
Merge 2 strings together
Example
Hello : world
would return
Helloworld
Parse to number
if you had a string that was a number ie “12345”
it would return a NUMBER 12345
Substring of
This is where the array part comes into play
if you had a string like such
“helloeveryoneiamstring”
you could create a substring of this by cutting out a part you want
if you did
Substring of “helloeveryoneiamstring” from 0 to 4
it would return “hello”
or if you did 13 to -1
it would return “iamstring”
Console
if you press menu you can open the console for debugging you can check whata code ran

this is most useful when combining it with logic and Join strings
You can make Text Really REALLY complicated as you can cut them up to hold as many numbers and other data as you want but i couldn’t explain it all if i tried
In short
arrays are AWESOME
and if you didn’t know how to use them i hope you do now
it can be so useful to keep info in one place or change a bunch of values at once!
this entire post is basically all arrays but trust me they are so nice.