Love2D

Install Love2D and SublimeText Love editor in Windows 8

13 Jul , 2013  

Here is a quick guide to setup Love2D in Windows 8 and SublimeText as IDE. First, we can go to the official website of Love2D at https://love2d.org/ and choose installer 32/64bit installer (depend on your OS).

Executable Love in CommandLine
Add LOVE path into Environment variables by : “Window Key” + W and type “edit environment”, select edit system environment.

Go to environment variables -> System variables -> Path. Append “C:Program Files (x86)LOVE;” and save. Now, “love” can run under DOS.

Install IDE
I suggest using SublimeText2. Make sure we already have Git installed.
After download, don’t forget to using “Sublime Package Control”. Press “CTRL” + “`” (backtick) and add this:

1
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'

After restart your SublimeText, we can install “SublimeLove” from https://github.com/minism/SublimeLove by adding into Package Control -> Install.

To be able running Love2D projects from SublimeText in Windows 8, we need to modify the build. Go to Preferences -> Browser Packages -> SublimeLove -> Love.sublime-build and change it content into:

1
2
3
4
5
{
    "cmd": ["love", "$file_path"],
    "selector": "source.lua.love",
    "shell": true
}

Before build the projects, select build -> Love first. Then we’re ready!

Love2D

Love2D with SublimeText in Mac OS X

13 Jul , 2013  

I’m not often using SublimeText, but seems it’s very good for Love2D development. Here is my configuration, first we need to install SublimeText2 / 3 in our Mac OS X.

Then, we need to install SublimePackageManager (http://wbond.net/sublime_packages/package_control/installation).

Then here is the cure, add this github repo on Package Settings -> Install

1
https://github.com/minism/SublimeLove

Then we’re ready to development Love2D. Here is some tricks to solve the problem that might occurs.

Run love in command-line Mac OS X:

1
sudo ln -s /Applications/love.app/Contents/MacOS/love /usr/local/bin/

Run love in SublimeText, edit build (you can find-e via Browse Package -> SublimeLove -> Love.sublime-build

1
2
3
4
5
{
    "cmd": ["for depth in {0..0}; do if [ -f main.lua ]; then /usr/local/bin/love .; fi; done;"],
    "selector": "source.lua.love",
    "shell": true
}

That’s it!

,