Skip to content

Commit c104e0a

Browse files
More readme cleanup
1 parent 4e11da9 commit c104e0a

5 files changed

Lines changed: 16 additions & 12 deletions

File tree

.github/makecode/blocksdiff.png

36.5 KB
Loading

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
1+
This extension creates mazes as tilemaps. Three different maze algorithms, as described by https://weblog.jamisbuck.org,
2+
have been implemented: Binary Tree, Sidewinder & Ellers.
23

4+
The extension adds a new block which returns a tilemap.
5+
6+
Dimensions, wall/floor tiles and, optionally, corridor size can be configured.
7+
8+
For the tile selectors to work properly you hould create a tilemap asset, using at least the tile you want to use for
9+
walls and floors. The asset tilemap serves no other purpose.
10+
11+
## Blocks preview
12+
13+
![A rendered view of the blocks](https://github.com/johnjuuljensen/makecode_maze/raw/master/.github/makecode/blocks.png)
314

415
> Open this page at [https://johnjuuljensen.github.io/makecode_maze/](https://johnjuuljensen.github.io/makecode_maze/)
516
@@ -20,12 +31,6 @@ To edit this repository in MakeCode.
2031
* click on **Import** then click on **Import URL**
2132
* paste **https://github.com/johnjuuljensen/makecode_maze** and click import
2233

23-
## Blocks preview
24-
25-
This image shows the blocks code from the last commit in master.
26-
This image may take a few minutes to refresh.
27-
28-
![A rendered view of the blocks](https://github.com/johnjuuljensen/makecode_maze/raw/master/.github/makecode/blocks.png)
2934

3035
#### Metadata (used for search, rendering)
3136

main.blocks

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="YC8ArHe3W02Bs+%[y0Te">mySprite</variable><variable type="KIND_SpriteKind" id="Isv{TOVuD,87J0dROC%E">Player</variable><variable type="KIND_SpriteKind" id="coxUTvpWW=v-x.I5=S@O">Projectile</variable><variable type="KIND_SpriteKind" id="tre7Ep_Z-?ys,7g{nw+[">Food</variable><variable type="KIND_SpriteKind" id="j,m`E^syC95i!.OzSUq5">Enemy</variable><variable type="KIND_SpriteKind" id=";a]e}BsAITvgx-A#d#zY">Text</variable></variables><block type="pxt-on-start" id="1c5vW)xs~{5}7~XC{Qlj" x="0" y="0"><statement name="HANDLER"><block type="set_current_tilemap" id="l@ls%pbyc4P2dmImRhp~"><value name="tilemap"><shadow type="tiles_tilemap_editor"></shadow><block type="maze_generateTilemap" id="@qW{(;fj6z|*c?+{vAWg"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="true"></mutation><field name="algorithm">MazeAlgorithm.Ellers</field><value name="mazeWidth"><shadow type="math_number" id="e~Q!dgzKKD;)h$Pgl@z7"><field name="NUM">8</field></shadow></value><value name="mazeHeight"><shadow type="math_number" id="+!.N24B-+r4B5wTre|/8"><field name="NUM">8</field></shadow></value><value name="wall"><shadow type="tileset_tile_picker" id="7^+Y!Ti@JTz9Ct!rpj-x"><field name="tile">sprites.dungeon.floorDark0</field></shadow></value><value name="floor"><shadow type="tileset_tile_picker" id="S(uC@C2[``+@#Ssv=Ss5"><field name="tile">sprites.castle.tileGrass2</field></shadow></value></block></value><next><block type="variables_set" id="n;P++*8r!YDj:1y=d5N~"><field name="VAR" id="YC8ArHe3W02Bs+%[y0Te">mySprite</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="spritescreate" id="QI0553CQc9/k3?@vDk$("><value name="img"><shadow type="screen_image_picker" id="vG|-39*-m:^,ULL^@p}Q"><field name="img">img`
1+
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="%`Tg;^NbjNb)^!#:xqmD">mySprite</variable><variable type="KIND_SpriteKind" id="mRfhiOYpaBs:ulqo@Xfc">Player</variable><variable type="KIND_SpriteKind" id="N,oPyt$K6-0ue4a,A+l6">Projectile</variable><variable type="KIND_SpriteKind" id="OJIt[L}}v(b7](7lQ*b0">Food</variable><variable type="KIND_SpriteKind" id="pDSA|Noi/6;+~}U]}vCh">Enemy</variable></variables><block type="pxt-on-start" id=")vd))@X(MktP|F}/JOC0" x="0" y="0"><statement name="HANDLER"><block type="set_current_tilemap" id="H?vrTgCk4*14~f2{lY^Q"><value name="tilemap"><shadow type="tiles_tilemap_editor"></shadow><block type="maze_generateTilemap" id="OOEaCqQ)I_b!9d;.Ra*n"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="true"></mutation><field name="algorithm">MazeAlgorithm.Ellers</field><value name="mazeWidth"><shadow type="math_number" id="9Pc=q`aVNzi2;udVCzFq"><field name="NUM">8</field></shadow></value><value name="mazeHeight"><shadow type="math_number" id="mBL`Ys1X32bgsJ9Yt37]"><field name="NUM">8</field></shadow></value><value name="wall"><shadow type="tileset_tile_picker" id="?SU3Pu20gZ-l[yf2CAt3"><field name="tile">sprites.dungeon.floorDark0</field></shadow></value><value name="floor"><shadow type="tileset_tile_picker" id="Uc0C0@aV(B*l?+b2({)7"><field name="tile">sprites.castle.tileGrass2</field></shadow></value></block></value><next><block type="variables_set" id=",Iqhgp(jX(*X5cY-,g|O"><field name="VAR" id="%`Tg;^NbjNb)^!#:xqmD">mySprite</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="spritescreate" id="E)%R|GS4-7ly?$H?Ny5g"><value name="img"><shadow type="screen_image_picker" id="e;fjsB9]=d#eScTM5#~d"><field name="img">img`
22
........................
33
.....ffff...............
44
...fff22fff.............
@@ -23,4 +23,4 @@ fbbbbf2222fd4...........
2323
........................
2424
........................
2525
........................
26-
`</field><data>{"commentRefs":[],"fieldData":{"img":"vG|-39*-m:^,ULL^@p}Q"}}</data></shadow></value><value name="kind"><shadow type="spritekind" id="uC%MtLoP)sK-XgOVkN)r"><field name="MEMBER">Player</field></shadow></value></block></value><next><block type="mapplaceontile" id="xVaDY=2CNEA=cbH}x#gg"><value name="sprite"><shadow type="variables_get" id="ERrN[)5{w18=]s|vW^4|"><field name="VAR" id="YC8ArHe3W02Bs+%[y0Te">mySprite</field></shadow></value><value name="loc"><shadow type="mapgettile" id="n%.=x/j$H,be?FMf73{b"><value name="col"><shadow type="math_number" id="p2/8(urV;4$#RvlTcfdY"><field name="NUM">2</field></shadow></value><value name="row"><shadow type="math_number" id="5RCRUdlv?l220S/Zzuxk"><field name="NUM">2</field></shadow></value></shadow></value><next><block type="game_control_sprite" id="X#~AocBPq[afrRr,M?$e"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="true"></mutation><value name="sprite"><shadow type="variables_get" id="a^Po,ezH*@U+IP`h4[jw"><field name="VAR" id="YC8ArHe3W02Bs+%[y0Te">mySprite</field></shadow></value><next><block type="camerafollow" id="O7!C2dr!c%%?X~edlF:K"><value name="sprite"><shadow type="variables_get" id="biuhUG$^9;5l7LSM:Vy!"><field name="VAR" id="YC8ArHe3W02Bs+%[y0Te">mySprite</field></shadow></value><next><block type="controls_repeat_ext" id="~VB!OYy:y(-zcP]@oN9L"><value name="TIMES"><shadow type="math_whole_number" id="qwi.*_k!uQqB)lj+r~#M"><field name="NUM">10</field></shadow></value><statement name="DO"><block type="mapsettileat" id="IV;zJ/.}H52TpSkzJhG6"><value name="tile"><shadow type="tileset_tile_picker" id="_E}%^u_y|WgQ!SLCz?YT"><field name="tile">sprites.dungeon.chestClosed</field></shadow></value><value name="loc"><shadow type="mapgettile"></shadow><block type="array_pickRandom" id="A;xBUGUFhl@aK)[Sh|M}"><value name="list"><block type="mapgettilestype" id="!Q?|yVW@5YPiov2Cd|oN"><value name="tile"><shadow type="tileset_tile_picker" id="MG7*,^Y~I{Tkp[#jNz0N"><field name="tile">sprites.castle.tileGrass2</field></shadow></value></block></value></block></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></statement></block></xml>
26+
`</field><data>{"commentRefs":[],"fieldData":{"img":"e;fjsB9]=d#eScTM5#~d"}}</data></shadow></value><value name="kind"><shadow type="spritekind" id="ipZgE!l0j`=f)ClCV%Ra"><field name="MEMBER">Player</field></shadow></value></block></value><next><block type="mapplaceontile" id="MX4xmq7TW|#f31|?U7:r"><value name="sprite"><shadow type="variables_get" id="CQR:S0-^$fW50U#4^4|z"><field name="VAR" id="%`Tg;^NbjNb)^!#:xqmD">mySprite</field></shadow></value><value name="loc"><shadow type="mapgettile" id="mYoO{}/VJ^$bf!8.~X[6"><value name="col"><shadow type="math_number" id="0jv!bzXx;+ngG{k(;3uK"><field name="NUM">2</field></shadow></value><value name="row"><shadow type="math_number" id="$RPJ-d,FB*.3xAu[u/5n"><field name="NUM">2</field></shadow></value></shadow></value><next><block type="game_control_sprite" id="~Q_kk$_(_Dmo?|/+=gPf"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="true"></mutation><value name="sprite"><shadow type="variables_get" id="1}sD;Hr**$+imenhbCq1"><field name="VAR" id="%`Tg;^NbjNb)^!#:xqmD">mySprite</field></shadow></value><next><block type="camerafollow" id=".QlA`voUlT4SH7noIM9a"><value name="sprite"><shadow type="variables_get" id="ZH?KxZm0}zCl#1JWqWl*"><field name="VAR" id="%`Tg;^NbjNb)^!#:xqmD">mySprite</field></shadow></value><next><block type="controls_repeat_ext" id="GU?n1L[LJH=@Ai5lr_+1"><value name="TIMES"><shadow type="math_whole_number" id="FTZ4E;n^yG,Wa-32*gQ`"><field name="NUM">10</field></shadow></value><statement name="DO"><block type="mapsettileat" id="ac~o:N%.|g^~`sf9`53o"><value name="tile"><shadow type="tileset_tile_picker" id="mGU?uu`XG)y~+#@EoR{G"><field name="tile">sprites.dungeon.chestClosed</field></shadow></value><value name="loc"><shadow type="mapgettile"></shadow><block type="array_pickRandom" id="xkt,Hpdg*UZV92HRJMZ|"><value name="list"><block type="mapgettilestype" id=";CV-uFCj8xCFh:~K!gbK"><value name="tile"><shadow type="tileset_tile_picker" id="KBL1}xmt1O^)-B86Xz[7"><field name="tile">sprites.castle.tileGrass2</field></shadow></value></block></value></block></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></statement></block></xml>

maze.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ enum MazeAlgorithm {
44
Ellers = 2
55
}
66

7-
//% weight=100 color=#0fbc11 icon=""
7+
//% weight=100 color=#0fbc11 icon=""
88
namespace maze {
99

1010
/**

pxt.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"version": "1.0.0",
44
"description": "",
55
"dependencies": {
6-
"device": "*",
7-
"arcade-text": "github:microsoft/arcade-text#v1.3.0"
6+
"device": "*"
87
},
98
"files": [
109
"main.blocks",

0 commit comments

Comments
 (0)