Atom Console

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Sosolol261
Party member
Posts: 125
Joined: Wed Nov 26, 2014 6:43 am

Atom Console

Post by Sosolol261 »

So I've been trying out Atom lately and I noticed that the console won't pop up if I open my love project using a package called: Lua-Launch or something like that.. t.console IS true and it works if I open up the game manually.

Is there a way to open my project with the developer console?
Is there a built in console in Atom?
Should I use another way to launch my project? If so: Which one?

Thank you in advance :P
User avatar
radgeRayden
Prole
Posts: 29
Joined: Sun Jul 27, 2014 6:49 pm
Location: Brasil
Contact:

Re: Atom Console

Post by radgeRayden »

That is normal behaviour and seems to be associated with the fact that löve is being spawned by another process. Atom does have a built-in console, which you can open with ctrl+alt+i;It isn't very useful in this case though, as print doesn't seem to work properly.
The method I use is saving a batch file that starts love in the current directory, and then opening a windows console and calling that.
The contents of my batch file:

Code: Select all

"%PROGRAMFILES%\LOVE\love" .
There's a package called 'run-in-terminal' that is useful for this specific setup. I use the following config under "Terminal with arguments":

Code: Select all

start /D {working_directory} C:\Windows\System32\cmd.exe /u
If I placed the .bat correctly I can just run it by typing it's name (normally 'run').
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: Atom Console

Post by rmcode »

Sosolol261 wrote:Should I use another way to launch my project? If so: Which one?
Are you on OSX? I use Atom for all of my projects and simply have a terminal open on the side. I have this in my bash profile:

Code: Select all

alias love="/Applications/love.app/Contents/MacOS/love"
So when I want to run the project I simply cd into the folder when I start developing and when I want to run the project I just do

Code: Select all

love .
It's quite convenient for me because I usually am in the folder anyway for all the git stuff I am doing.

P.S.: When you run the project from the terminal all the output will be displayed in the terminal ;)
User avatar
Rucikir
Party member
Posts: 129
Joined: Tue Nov 05, 2013 6:33 pm

Re: Atom Console

Post by Rucikir »

Having a alias to the LÖVE executable is good, but if you want to make a script that uses love, an alias won't work, as *rc files are not read by the shell when executing a script. (see ShreevatsaR blog post). So you'd probably better go with a symbolic link :

Code: Select all

ln -s /Applications/love.app/Contents/MacOS/love /usr/bin/love
Then you can use the following command the same way as you would with an alias, but now you'll be able to use love in shell scripts on OS X.

Code: Select all

love .
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Atom Console

Post by Karai17 »

I really like the "Build" extension for Atom. Just drop in a proper .atom-build.json file in your root directory and it can launch any application from atom using F9.

https://github.com/excessive/ludum-dare ... build.json

Make sure love is in your system PATH.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Google [Bot], Semrush [Bot] and 7 guests