What software/methods do you use to edit/run your code?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: What software/methods do you use to edit/run your code?

Post by ljdp »

TextMate on OSX ^.^

Using a TextMate Love bundle I found here some time ago I can press command-R to run, command-B to build a .love file,
when I want a specific color i press a hotkey and a color wheel pops up, press ok and it inserts into the document as r,g,b.
I also have a git bundle so when I press control-shift-G a menu pops up with commit, push, merge, new branch, visualize in gitk etc.. reaaally useful.
User avatar
pygy
Citizen
Posts: 98
Joined: Mon Jan 25, 2010 4:06 pm

Re: What software/methods do you use to edit/run your code?

Post by pygy »

ljdp, How do you debug your code on OS X?
Hermaphroditism is not a crime. -- LSB Superstar

All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: What software/methods do you use to edit/run your code?

Post by ljdp »

I just run it and check for errors.
I overwrite the print() function to push the string to a stack so I can show various message throughout the code.
I also keep the project version with a local git repository if I need to go back to a stable state etc.
User avatar
pygy
Citizen
Posts: 98
Joined: Mon Jan 25, 2010 4:06 pm

Re: What software/methods do you use to edit/run your code?

Post by pygy »

Ok, thanks :-)

You may find this useful: http://love2d.org/forum/viewtopic.php?f=4&t=1144

Basically, replace the "Run" command in the Love bundle with xterm -e love $TM_DIRECTORY .

It opens a terminal to display the printed messages. No need to overwrite print :-)

Also, to make this work, you'll need to:
1) add the love to your path (/Applications/love.app/Contents/MacOS/love) or something similar
2) install X.org from the dev tools on your MacOS X install DVD (if it's not done already).

Very handy.
Hermaphroditism is not a crime. -- LSB Superstar

All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
JamesFlamingo
Prole
Posts: 1
Joined: Sun Nov 27, 2011 7:09 pm

Re: What software/methods do you use to edit/run your code?

Post by JamesFlamingo »

I put the following command in Geany>Build>Set Build Commands>text box to the right of Execute

zip -r Working_Game.love *; love Working_Game.love

There should be a better way to do this with 'PWD' but i never got it to work. : :monocle:
User avatar
Kazagha
Prole
Posts: 40
Joined: Tue Oct 04, 2011 7:05 am

Re: What software/methods do you use to edit/run your code?

Post by Kazagha »

I have been using gvim; as people have already said it has Lua highlighting out of the box plus I have added a love2d specific highlighting file additional to the Lua highlighting.

I am using the command line version of 7zip (7za.exe) and a batch file (zip.bat) to create the .love file.

Then using a shortcut to the love executable inside the 'love2d' folder, so I can click and drag the .love file onto the shortcut to run it.
love directory.gif
love directory.gif (2.23 KiB) Viewed 3970 times
zip.bat

Code: Select all

cd H:\love-0.7.2-win-x86
del test.love
7za.exe -tzip a H:\love-0.7.2-win-x86\test.love H:\love-0.7.2-win-x86\game\*
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: What software/methods do you use to edit/run your code?

Post by Taehl »

Windows, using Notepad++:

1) Keep my project in a folder, instead of a .love
2) Edit code in N++
3) Hit F5 to test, with the command "D:\Dev\Love\love.exe D:\Dev\Love\whatever"
4) Iterate!
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: What software/methods do you use to edit/run your code?

Post by josefnpat »

I use gimp, gnome-terminal, nautilus and gedit on Ubuntu.

Seeing this thread, made me want to streamline my gedit'ing. Wrote a quick script that you can bind to F5 with gedit's "external tools" plugin.

Code: Select all

#!/bin/sh
SERVICE=' love '
killall love 2> /dev/null
gnome-terminal -e "love $GEDIT_CURRENT_DOCUMENT_DIR"
https://gist.github.com/1402851

edit: Forgot to remove errors with

Code: Select all

2>
so the bottom pane doesn't appear at the bottom of gedit.
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
Kazagha
Prole
Posts: 40
Joined: Tue Oct 04, 2011 7:05 am

Re: What software/methods do you use to edit/run your code?

Post by Kazagha »

Taehl wrote:Windows, using Notepad++:

1) Keep my project in a folder, instead of a .love
2) Edit code in N++
3) Hit F5 to test, with the command "D:\Dev\Love\love.exe D:\Dev\Love\whatever"
4) Iterate!
It's pretty cool that you can run it directly from a directory without needing to package it into a .love file. I didn't know that. I think I will be doing it this way in the future.

-Kazagha
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: What software/methods do you use to edit/run your code?

Post by Robin »

Kazagha wrote:It's pretty cool that you can run it directly from a directory without needing to package it into a .love file. I didn't know that. I think I will be doing it this way in the future.
Interesting. You're not the first to be surprised this is possible. Why would so many people not know this?
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 2 guests