-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
243 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
vmlib/worlds/tutorial/tutorial-3/data/build_1keccg2mvge2d/build_1keccg2mvge2d.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"id": "build_1keccg2mvge2d", | ||
"start_transform": { | ||
"basis": [ | ||
[1.0, 0.0, 0.0], | ||
[0.0, 1.0, 0.0], | ||
[0.0, 0.0, 1.0] | ||
], | ||
"origin": [-74.0, 0.0, -5.0] | ||
}, | ||
"start_color": "green", | ||
"edits": { | ||
|
||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
vmlib/worlds/tutorial/tutorial-3/data/build_232lnaswahww5/build_232lnaswahww5.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"id": "build_232lnaswahww5", | ||
"start_transform": { | ||
"basis": [ | ||
[1.0, 0.0, 0.0], | ||
[0.0, 1.0, 0.0], | ||
[0.0, 0.0, 1.0] | ||
], | ||
"origin": [1.0, 0.0, 6.0] | ||
}, | ||
"start_color": "black", | ||
"edits": { | ||
"build_232lnaswahww5": [ | ||
[[-1.0, 2.0, 0.0], [1, "black"]], | ||
[[-2.0, 0.0, 0.0], [1, "black"]], | ||
[[-1.0, 0.0, 0.0], [1, "black"]], | ||
[[-1.0, 1.0, 0.0], [1, "black"]], | ||
[[0.0, 1.0, 0.0], [1, "black"]], | ||
[[-2.0, 2.0, 0.0], [1, "black"]], | ||
[[0.0, 2.0, 0.0], [1, "black"]], | ||
[[-2.0, 1.0, 0.0], [1, "black"]] | ||
] | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
vmlib/worlds/tutorial/tutorial-3/data/build_p3o8fhe1l8q3t/build_p3o8fhe1l8q3t.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"id": "build_p3o8fhe1l8q3t", | ||
"start_transform": { | ||
"basis": [ | ||
[1.0, 0.0, 0.0], | ||
[0.0, 1.0, 0.0], | ||
[0.0, 0.0, 1.0] | ||
], | ||
"origin": [-12.0, 0.0, -3.0] | ||
}, | ||
"start_color": "black", | ||
"edits": { | ||
"build_p3o8fhe1l8q3t": [ | ||
[[0.0, 3.0, -1.0], [0, "black"]], | ||
[[0.0, 3.0, 0.0], [0, "black"]], | ||
[[0.0, 1.0, -1.0], [1, "black"]], | ||
[[0.0, 2.0, -1.0], [1, "black"]], | ||
[[0.0, 0.0, -1.0], [1, "black"]], | ||
[[0.0, 1.0, 0.0], [1, "black"]], | ||
[[0.0, 2.0, 0.0], [1, "black"]] | ||
] | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
vmlib/worlds/tutorial/tutorial-3/data/build_q44ng8hzm25a5/build_q44ng8hzm25a5.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"id": "build_q44ng8hzm25a5", | ||
"start_transform": { | ||
"basis": [ | ||
[1.0, 0.0, 0.0], | ||
[0.0, 1.0, 0.0], | ||
[0.0, 0.0, 1.0] | ||
], | ||
"origin": [-10.0, 0.0, 57.0] | ||
}, | ||
"start_color": "red", | ||
"edits": { | ||
|
||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
vmlib/worlds/tutorial/tutorial-3/data/build_wbvc3ofglbenr/build_wbvc3ofglbenr.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"id": "build_wbvc3ofglbenr", | ||
"start_transform": { | ||
"basis": [ | ||
[1.0, 0.0, 0.0], | ||
[0.0, 1.0, 0.0], | ||
[0.0, 0.0, 1.0] | ||
], | ||
"origin": [-42.0, 0.0, 94.0] | ||
}, | ||
"start_color": "black", | ||
"edits": { | ||
|
||
} | ||
} |
18 changes: 7 additions & 11 deletions
18
...ld_wtj28vqvn7x1p/build_wtj28vqvn7x1p.json → ...ld_z4u2d6n7c4bur/build_z4u2d6n7c4bur.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"enu_version": "v0.1.99-203-ge463afdf", | ||
"enu_version": "v0.1.99-205-g6f51bcb6", | ||
"format_version": "v0.9.2" | ||
} |
28 changes: 19 additions & 9 deletions
28
vmlib/worlds/tutorial/tutorial-3/scripts/bot_oy8kjgw7cmn5x.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,49 @@ | ||
let sayings = [ | ||
color = green | ||
|
||
let hellos = [ | ||
"Stop! You've been pre-selected for an exclusive timeshare offer!", | ||
"Wait! I want to talk to you about the first rule of Fight Club!", | ||
"Excuse me! Do you have a moment to talk about the Flying Spaghetti Monster?", | ||
"Leeeroooooy Jeeeenkins!" | ||
] | ||
|
||
let goodbyes = [ | ||
"Never mind. You probably wouldn't understand.", | ||
"Pleasure doing business with you.", | ||
"Wait... who are you?", | ||
] | ||
|
||
- wander: | ||
speed = 3 | ||
forward 2..10 | ||
turn -45..45 | ||
|
||
- chase: | ||
speed = 10 | ||
speed = 6 | ||
turn player | ||
forward 5 | ||
|
||
- caught: | ||
say "" | ||
sleep 2 | ||
say "Never mind. You probably wouldn't understand." | ||
say random(goodbyes) | ||
sleep 2 | ||
|
||
loop: | ||
nil -> wander | ||
go_home -> wander | ||
caught -> go_home | ||
(go_home, give_up) -> wander | ||
caught -> go_home as give_up | ||
if start_position.far(20): | ||
wander -> go_home | ||
if player.near(10): | ||
if player.near(10) and | ||
start_position.near(30): | ||
|
||
# chase if the player is near and we're not too far from home base | ||
(wander, go_home) ==> chase: | ||
# this will be called once the command switches | ||
say cycle(sayings) | ||
say cycle(hellos) | ||
if player.far(20): | ||
chase -> go_home | ||
if player.near(1.5): | ||
chase -> go_home as give_up | ||
if player.near(3): | ||
chase -> caught | ||
|
32 changes: 32 additions & 0 deletions
32
vmlib/worlds/tutorial/tutorial-3/scripts/build_1keccg2mvge2d.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import math | ||
|
||
speed = 0 | ||
scale = 0.6 | ||
|
||
360.times: | ||
turn 1 | ||
save() | ||
lean back, 20 | ||
200.times(i): | ||
if 1 in 500: | ||
color = cycle(white, green) | ||
else: | ||
color = black | ||
drawing = 2 in 3 | ||
forward 1 | ||
lean back, sin(i * 0.06) * 3.0 | ||
restore() | ||
|
||
# Now that we've finished building we move it into position. | ||
move me | ||
speed = 100 | ||
up 101 | ||
lean 179 | ||
|
||
# turn and scale | ||
speed = 50 | ||
var counter = 0 | ||
forever: | ||
counter = counter + 1 | ||
scale = 0.6 + sin(counter * 0.05) * 0.03 | ||
turn right, 0.1 |
13 changes: 13 additions & 0 deletions
13
vmlib/worlds/tutorial/tutorial-3/scripts/build_232lnaswahww5.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
lock = true | ||
|
||
let text = """ | ||
# Towers. Too Many Towers. | ||
Code a building and name it `tower`. Give it some friends with `tower.new`. | ||
This is an example of a [Prototype](https://ē.nu/docs/coding/concepts.html). | ||
""" | ||
|
||
say text, text, width = 3, height = 3 |
14 changes: 14 additions & 0 deletions
14
vmlib/worlds/tutorial/tutorial-3/scripts/build_p3o8fhe1l8q3t.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
lock = true | ||
|
||
turn right | ||
let text = """ | ||
# ??? | ||
I'm not sure what this is supposed to be. | ||
It uses Nim's [math](https://nim-lang.org/docs/math.html) module to build with sine waves. | ||
""" | ||
|
||
say text, text, height = 3 |
7 changes: 7 additions & 0 deletions
7
vmlib/worlds/tutorial/tutorial-3/scripts/build_q44ng8hzm25a5.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name tower(height = 70, length = 20, sides = 4, twist = 0) | ||
speed = 0 | ||
height.times: | ||
sides.times: | ||
forward length | ||
turn 360 / sides + twist | ||
up 1 |
14 changes: 14 additions & 0 deletions
14
vmlib/worlds/tutorial/tutorial-3/scripts/build_wbvc3ofglbenr.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
drawing = false | ||
seed = 213 | ||
speed = 0 | ||
turn right | ||
10.times: | ||
forward 20..40 | ||
turn 20..50 | ||
tower.new( | ||
height = 40..100, | ||
length = 5..10, | ||
sides = 3..10, | ||
twist = -2..2, | ||
color = cycle(red, green, blue, black) | ||
) |
2 changes: 0 additions & 2 deletions
2
vmlib/worlds/tutorial/tutorial-3/scripts/build_wtj28vqvn7x1p.nim
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
vmlib/worlds/tutorial/tutorial-3/scripts/build_z4u2d6n7c4bur.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
lock = true | ||
|
||
turn 180 | ||
let blurb = "Here are some things you can build with Enu. Play with their code, or build something new from scratch." | ||
|
||
let menu = """ | ||
- [Load Tutorial](<nim://load_level("tutorial-1", "tutorial")>) - Leave this level and load the Enu tutorial. | ||
- [Load Inky: Isolation](<nim://load_level("tutorial-2", "tutorial")>) - Load `Inky: Isolation`, a simple game made with Enu. | ||
- [Clear Changes and Reset Examples](<nim://reset_level()>) - Reset and reload this level. Be careful, all of your changes will be lost. | ||
""" | ||
|
||
let text = \""" | ||
# Examples | ||
{blurb} | ||
- Load Tutorial | ||
- Load `Inky: Isolation` | ||
- Clear Changes and Reset Examples | ||
""" | ||
|
||
let more = \""" | ||
# Menu | ||
{blurb} | ||
- [Load Tutorial](<nim://load_level("tutorial-1", "tutorial")>) - Leave this level and load the Enu tutorial. | ||
- [Load Inky: Isolation](<nim://load_level("tutorial-2", "tutorial")>) - Load `Inky: Isolation`, a simple game made with Enu. | ||
- [Clear Changes and Reset Examples](<nim://reset_level()>) - Reset and reload this level. Be careful, all of your changes will be lost. | ||
""" | ||
|
||
say text, more, height = 4, width = 3 |