When you are done, go back to the bloP environment by shiftclicking the bloP logo and selecting “Lock GUI” = bloP Philosophy In order to make the bloP environment safe (that is, you won't be allowed to modify the bloP environment when it is “locked”: you won't be able to define new blocks, drag sprites, etc), so that when you write and run your programs you won't risk to impair the environment, I made some modifications to Snap, trying not to change the way Snap works (you should be able to load and run Snap XML files without any modification): Modifications to Snap: - you can hide/rename categories (when you hide a category, all primitives of that category will be hidden) - you can hide the Stage and the sprites icons in the corral (but you need at least one visible sprite icon in the corral) - you have 3 new Control blocks: - hat “when loading”: the script under this hat is run when a program is loaded in Snap/bloP - hat “when running a script”: the script under this hat is run in bloP before another script is run (that is when you click on it or you click the green flag) - block “run other scripts”: this block, used at the end of a script that starts with the “when running” block, runs the script you intended to run when you clicked on it or clicked the green flag - you can switch from Snap to bloP (and viceversa) by shiftclicking the logo and selecting “lock/unlock GUI”. modify the environment as you like by: - modifying custom blocks or adding new custom blocks - renaming categories by righclicking them - restoring default names and visibility for all categories by rightclicking the category frame 5. make all icons visible in the corral by rightclicking the corral and selecting “add removed objects back to corral” 4. show the primitives you need by rightclicking in the palette and selecting “show primitives” in the menu 3. shiftclick the bloP logo and select “Unlock GUI” in the menu 2. save your programs by using File > Save As… The programs will be saved in a new XML file (NOTE: in this version the XML file will include both the programs and the whole definition of the block language) = How to Modify or Create a block language To create a new block language, just follow these steps (if you want to modify the blockC language, follow steps 1 and 2 above in order to load blockC in advance): 1. Just snap together the C/C++ blocks you will find in the Input, Output, Control, Functions, Operators, and Variables categories. you can run the sample programs that you find in “C programs” or “C++ programs” or you can create your own blockC programs by adding (“+” button) or duplicating a program (rightclick menu) or by using File > New in order to create a completely new blockC program. in File > Open select the blockC.xml file (if during loading your browser tells you that there is a script that is not responding… just wait a little bit) 3. = How to Startup a block language To startup the blockC language follow these steps: 1. Let me know if you are intersted by dropping a line at. I'm developping a simpler version of blockC (only INT variables and only C instructions). I didn't investigate it in depth, but on my PC loading blockC crashes Firefox and freezes IE. WARNING: while bloP runs fine either in Chrome, Firefox or IE, blockC on the countrary is a bit heavy, so it runs fine only in Chrome. Please, let me know of every improvement you think I could make to the environment in order to make it really useful and easy-to-use for people who want to develop (or use) block languages. When you click on a new program, the program that is running (if any) will be automatically stopped. By clicking the green flag, the topmost program of the selected sprite will be run. In order to run a program just click on its script. In the “C programs” and “C++ programs” sprites you will find working examples of blockC programs. After loading the blockC.xml file in bloP you will see 6 categories of blocks: Input, Output, Control, Functions, Operators, Variables. At the moment I have a ready version of my “block-C” language (a subset of C/C++ implemented as a block programming language) that fully works in bloP. The environment is a mod of Snap (well, to be clear, without Snap the whole project just wouldn't be there… Thanks Jens and Brian for your wonderful environment!). Hi Everyone, I have completed a first draft of “bloP”, a development environment for block languages. Update: online demo of bloP/blockC available at.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |