Love Example Navigator

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
monolifed
Party member
Posts: 188
Joined: Sat Feb 06, 2016 9:42 pm

Love Example Navigator

Post by monolifed »

An example browser for love2d
You can currently select between 4 examples
You can click on them, see the code then run them by pressing the run button
Press "escape" button or close the window to exit the example and restart the example navigator
Note: this is a re-release. I removed experimental code and fixed the license.

github repo:
https://github.com/monolifed/lovexnav
Last edited by monolifed on Mon Jul 19, 2021 3:26 pm, edited 3 times in total.
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Love Example Navigator

Post by grump »

When I select the one example folder in this and click run, nothing happens. Maybe show only buttons that actually do something?

The example code:

Code: Select all

-- Load an image and display it

local image

function love.load()
    image = love.graphics.newImage("assets/chest.png")
end

function love.draw()
    love.graphics.draw(image, 20, 20)
end
Better code, because the above is cargo cult programming:

Code: Select all

local image = love.graphics.newImage("assets/chest.png")

function love.draw()
    love.graphics.draw(image, 20, 20)
end
monolifed
Party member
Posts: 188
Joined: Sat Feb 06, 2016 9:42 pm

Re: Love Example Navigator

Post by monolifed »

Currently:
You have to click on "loading_image.lua"
Read it for a while
Press run
Note: Log tells you why nothing happened when you clicked run
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Love Example Navigator

Post by grump »

I'm not asking for help on how to make it work, I'm giving suggestions on how to make it better. If there's nothing to run, don't show a run button. A basic UX principle.
monolifed
Party member
Posts: 188
Joined: Sat Feb 06, 2016 9:42 pm

Re: Love Example Navigator

Post by monolifed »

Added 3 more examples
User avatar
pgimeno
Party member
Posts: 3541
Joined: Sun Oct 18, 2015 2:58 pm

Re: Love Example Navigator

Post by pgimeno »

Are you aware of the classic https://love2d.org/wiki/examples.love ?
monolifed
Party member
Posts: 188
Joined: Sat Feb 06, 2016 9:42 pm

Re: Love Example Navigator

Post by monolifed »

Yes, I wrote some parts of the browser and a few of examples
monolifed
Party member
Posts: 188
Joined: Sat Feb 06, 2016 9:42 pm

Re: Love Example Navigator

Post by monolifed »

Added a repo
Placed run option to the end of runnable examples
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests