I am currently testing out and refining a concept I have been working on for teaching in elementary school using MakeCode Arcade some basics of programming, like sequence, iteration, selection, variables and functions.
The idea is to have a blank canvas and on start program entry in MakeCode, where pupils can solve different tasks for moving the duck to the water, by use of sequences of custom move blocks in the top blocks menu entry and progress together by various loops, IFs, variables and functions etc.
The underlying program is hidden in the custom.ts file, not cluttering the canvas and drawing away attention, and the obstacles(cars) are fairly easily moved around in the tilemap to make different game levels. Both the programs and the keyboard(if programmed) can be used to move the duck, and sometimes the game is developed further to something more fun and better looking.
Skillmaps and tutorials are great, and I use them in classes, too. Mostly ones that are already made. But they take a lot of time(at least for me) to make yourself, and are often a bit linear and focused more on game making than just the basics.
Anyways, I am sharing these examples here for 3 reasons:
To maybe get some feedback or examples in this thread for improving this concept, or maybe you could post back similar or other different/new teaching concepts/ideas in MakeCode that you have made and tested with success in classrooms?
Maybe somebody could help me on how to export/make available and use as a regular red sprite variable block the now grey mySprite inside the forever loop which is defined inside custom.ts?
To give back a little to a great forum which has helped and inspired me a lot. Copy and use if and as you please.
I think I get what you’re trying to do here. I’ve also been exploring some simplified options for early elementary. I’ve also faced the same issue that you’re facing with the grey variable.
Unfortunately, there are a few things that I can’t get to show up in the toolbox, no matter how hard I try. Those include:
Pre-declared variables
Pre-filled If statements
Pre-filled conditionals
What we can do is make it so that young’uns don’t need to access the sprite directly because all of the blocks make available to them already point to the predeclared sprite in question. Here’s an example of a tutorial that does that:
Thanks for your elaborate answer, @KIKIvsIT! It both expands the perspective on the problem and provides a nice solution and teaching concept which is relevant for this thread.
I, at about the same time as you published, found out a similar workaround, where I make custom function blocks which returns the values from or do other operations with or on the variable.
I will post that later as a share of an alternative attempt at teaching material for selection logic which I am working on now.
But this is quite restrictive for practical use, and a little confusing with different blocks for the plain standard blocks when teaching.
Maybe there is a way to forward the predefined variables as true variable blocks in custom.ts and I just don´t know about it. But that seems unnecessary, when variables are already fully supported natively, and should turn up in the variable menu when defined in the global scope.In any case, not as a grey block.
I also attempted “export default” for the variable, since it is defined in another file, but then I am told that this is not necessary, since it is already globally available. So there is something strange/incoherent with the ways blocks are picked up from text-based code only in the main.ts file. You can also define new real block variables with the same name without conflict in main.ts, even though they supposedly are in the same scope already, if I remember correctly.
I’ll cross post our common issues here on @jacqueline.russell’s Common errors?, since these apparantly are common for us at the moment, and see if this gets picked up…
@Vegz78 Thank you for bringing this back to life. I have recently updated some of my resources, so I will need to update the site. I would love to collaborate to create some great educational content for all learners.