Interactive Löve?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- parallax7d
- Citizen
- Posts: 82
- Joined: Wed Jul 02, 2014 11:44 pm
Interactive Löve?
Is there a way to load love in the Lua interactive interpreter, and run run, so you can basically play with love in real time? Or something? I love being able to test things rapidly in the Lua command line, was hoping to do something similar with Love?
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: Interactive Löve?
You mean changing the main.lua and then the game would reload itself ?
If so the there are a bunch of options you can choose from, one of them is the LoveDebug library.
If so the there are a bunch of options you can choose from, one of them is the LoveDebug library.
- slime
- Solid Snayke
- Posts: 3162
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Interactive Löve?
There is also the debug.debug() Lua function, which will pause the game and let you use stdin from your terminal to execute Lua, until you type 'cont'.
Re: Interactive Löve?
ZeroBrane Studio has support for this: http://notebook.kulchenko.com/zerobrane ... -with-love
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Interactive Löve?
I remember a similar topic was previously discussed on these forums. Find it here : hot reload. It contains some interesting links and resources.
But The great Murks is right, live coding is probably what you are seeking for.
But The great Murks is right, live coding is probably what you are seeking for.
-
- Prole
- Posts: 49
- Joined: Thu May 29, 2014 10:56 am
Re: Interactive Löve?
Not quite what you are asking about but I like Love Fiddle to quickly test stuff:
http://lovefiddle.com
http://lovefiddle.com
--
My OOP implementation:
https://github.com/stefanstr/class-by-gestaltist.git
My dungeon / tiled map generator:
https://github.com/stefanstr/lua_maps_by_gestaltist
My Love2D experiments:
https://github.com/stefanstr/Small-Love2D-Projects
My OOP implementation:
https://github.com/stefanstr/class-by-gestaltist.git
My dungeon / tiled map generator:
https://github.com/stefanstr/lua_maps_by_gestaltist
My Love2D experiments:
https://github.com/stefanstr/Small-Love2D-Projects
Re: Interactive Löve?
Simple:parallax7d wrote:Is there a way to load love in the Lua interactive interpreter, and run run, so you can basically play with love in real time? Or something? I love being able to test things rapidly in the Lua command line, was hoping to do something similar with Love?
1) Tie reload of the code to some key = e.g. space or enter
2) Put this code into your Love file:
Code: Select all
package.loaded[state]=false
require(state)
call that after some keypress, eg. in
Code: Select all
function love.keyreleased(key)
end
i have used this approach in my state manager (one file = one state):
http://www.ambience.sk/love2d-a-state-s ... class-lua/
this will reload the code on space / enter key press (if there are any other require statements in the main.lua, then you need to re-require them as well)
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Interactive Löve?
And there's repler.
You could also start a lua interpreter and load love from it, but that's a more advanced topic..
You could also start a lua interpreter and load love from it, but that's a more advanced topic..
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests