Skip to content

Commit cb5db42

Browse files
committed
add makecode
1 parent 4f6d47d commit cb5db42

File tree

6 files changed

+28
-15
lines changed

6 files changed

+28
-15
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@ The NWJS shortcut CTRL+A will always redirect from any game back to the main pag
2525

2626
Supply the game title, url, number of players, genres and *optionally* a cartridge image. Currently, cross-domain loading of cartridge images is not supported. The cartridge images will have to be added to this repository manually...😰 (loading them remotely is too slow...😴)
2727

28+
If you set `makecode` to `true`, an alternative cartridge image will be used.
29+
2830
```
2931
{
3032
"name": "Ruimtegruis",
3133
"url": "https://kokodoko.github.io/ruimtegruis/",
3234
"genres" : [1,1,1,0,0,0,0,0,0],
3335
"players" : 1,
34-
"cover": "cover_ruimtegruis.png"
36+
"cover": "cover_ruimtegruis.png",
37+
"makecode" : false
3538
}
3639
```
3740
## Cartridge image
@@ -40,7 +43,15 @@ Gebruik dit image als basis
4043

4144
<img src="./docs/images/cart.png">
4245

46+
## Makecode Arcade
47+
48+
Je kan een link naar je makecode arcade game toevoegen aan games.json. Dan zet je `makecode` op true, je krijgt dan automatisch onderstaand cartridge image:
49+
50+
<img src="./docs/images/cart-makecode.png">
51+
52+
## Running this project
4353

54+
Aanpassingen in de typescript `dev` map moet je publiceren met CMD+SHIFT+B.
4455

4556
## Credits
4657

dev/gridmenu.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ class GridMenu {
5353
div.style.filter = `saturate(0.8)`;
5454
} else {
5555
div.style.filter = `hue-rotate(${Math.floor(Math.random() * 360)}deg) saturate(0.8)`;
56-
div.style.backgroundImage = `url(./images/cart.png)`
56+
//let makecode = data.makecode
57+
div.style.backgroundImage = (data.makecode) ? `url(./images/cart-makecode.png)` : `url(./images/cart.png)`
5758
div.innerHTML = data.name
5859
}
5960
}

dev/interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ interface GameData {
44
genres:number[]
55
players:number
66
cover?:string
7+
makecode?:boolean
78
}
89

910
interface Vector {

docs/images/cart-makecode.png

70.7 KB
Loading

docs/js/main.js

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)