Skip to content

Commit b402f19

Browse files
committed
update L5-starter to include printToScreen() and add to instructions on
download page
1 parent 2023c19 commit b402f19

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

L5-starter.zip

37 Bytes
Binary file not shown.

L5-starter/main.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ function setup()
66
-- Set the program title
77
windowTitle("Basic sketch")
88

9+
-- Sets print command output to display in window
10+
printToScreen()
11+
912
describe('Draws a yellow background')
1013
end
1114

docs/download.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This compressed folder contains the *L5.lua* library, a starter *main.lua* file
2323

2424
**Latest version:** [Download L5.lua](https://raw.githubusercontent.com/L5lua/L5/main/L5.lua)
2525

26-
**Stable release (v0.1.3):** [Download L5.lua v0.1.3](https://raw.githubusercontent.com/L5lua/L5/v0.1.3/L5.lua)
26+
**Stable release (v0.1.5):** [Download L5.lua v0.1.5](https://raw.githubusercontent.com/L5lua/L5/v0.1.5/L5.lua)
2727

2828
### Source code
2929

@@ -40,7 +40,9 @@ After downloading, extract the ZIP and serve the folder with a local web server.
4040

4141
## Running your program
4242

43-
The easiest way to run your L5 program is to drag the folder containing your main.lua onto the Love2d application. But to see error messages and printing in the console you will want to run from an Integrated Development Environment (IDE) or command line. Here are platform-specific details:
43+
The easiest way to run your L5 program is to drag the folder containing your main.lua onto the Love2d application. To be able to view the output of `print()` add the function `printToScreen()` to your setup() section of code.
44+
45+
Alternatively, you may want to code, test and run your programs from an Integrated Development Environment (IDE) or command line. Here are platform-specific details:
4446

4547
### Linux
4648

@@ -50,7 +52,7 @@ In the Terminal, you can run `love path/to/main.lua`. Or if you are in the folde
5052

5153
### Mac
5254

53-
Drag and drop the folder holding L5.lua and your main.lua onto the Love application.
55+
Drag and drop the folder holding L5.lua and your main.lua onto the Love application, being sure to add `printToScreen()` to your setup function to be able to see `print()` output.
5456

5557
OR
5658

@@ -107,9 +109,11 @@ and try it again.
107109

108110
### Windows
109111

110-
The easiest way to run your program is to drag the folder onto either love.exe or a shortcut to love.exe. Remember to drag the folder containing `main.lua`, and not `main.lua` itself.
112+
The easiest way to run your program is to drag the folder onto either love.exe or a shortcut to love.exe. You will want to add `printToScreen()` function within your setup to see the output of any `print()` commands. Remember to drag the folder containing `main.lua`, and not `main.lua` itself.
113+
114+
OR
111115

112-
However, to see print messages and error output in the console (helpful when coding and debugging), you'll want to use an IDE or run from the command line. IDEs such as ZeroBrane Studio, Sublime Text, VS Code, Notepad++, and SciTE all support launching LÖVE programs (the underlying framework used by L5), though may require some configuration.
116+
IDEs such as ZeroBrane Studio, Sublime Text, VS Code, Notepad++, and SciTE all support launching LÖVE programs (the underlying framework used by L5), though may require some configuration.
113117

114118
Alternatively, you can launch from the command line with the `--console` flag:
115119
```

0 commit comments

Comments
 (0)