Rapid Programming and Iteration

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Rapid Programming and Iteration

Post by Inny »

A few days ago, the Lua Mailing List had a thread in praise of Lua game development because of the reduced code-compile-test iteration cycle. Specifically, the game author called out performing live code injection as the big thing that he really liked. And in today's Reddit AMA with Notch, he calls code hot swapping as his favorite feature in Java/Eclipse. So, I feel like raising the discussion here: does anyone use this technique, and if so, how?

A very long time ago, I wrote a game engine in C and Lua, and would kind of perform this technique. Specifically, I wasn't using require to load code, I was nil'ing out variables between level loading, and using dofile (we would use love.filesystem.load). In my current stuff, I'm not doing any form of hot-swap.

What does everyone else do?
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Rapid Programming and Iteration

Post by slime »

My data files auto reload in-game when changed (e.g. weapon stat definitions). I don't like doing real live code changes (aside from minor things, which can be accomplished using debug.debug()) in Lua, especially because it tends to be really fast already just to quit the game and reload after making a change.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Rapid Programming and Iteration

Post by bartbes »

I agree with slime, I'm more of a "clean testing environment" guy, though I'd like to make some stuff hot-swappable. Another thing I generally do, is make the game read its starting gamestate from the command line, that way I don't have to navigate menus, or sit through intros (though those should always be skippable, imo).
User avatar
OmarShehata
Party member
Posts: 259
Joined: Tue May 29, 2012 6:46 pm
Location: Egypt
Contact:

Re: Rapid Programming and Iteration

Post by OmarShehata »

Bret Victor shows how brilliant such a technique can be here:

http://www.wimp.com/videogames/

And has a 1 hour long presentation talking about how crucial this is as a design principle here: http://vimeo.com/36579366
User avatar
nate8nate
Prole
Posts: 3
Joined: Tue Jan 03, 2012 9:27 pm
Location: Iowa

Re: Rapid Programming and Iteration

Post by nate8nate »

LICK is a library that allows you to do something similar to hot code swapping, although it is a bit limited.
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Rapid Programming and Iteration

Post by Inny »

nate8nate wrote:LICK is a library that allows you to do something similar to hot code swapping, although it is a bit limited.
Interesting design there. I'm going to have to give it a try, or see if I can do something similar.
bartbes wrote:I agree with slime, I'm more of a "clean testing environment" guy, though I'd like to make some stuff hot-swappable. Another thing I generally do, is make the game read its starting gamestate from the command line, that way I don't have to navigate menus, or sit through intros (though those should always be skippable, imo).
I generally do this in vim, :!love, so that would totally be doable :P
paulclinger
Party member
Posts: 227
Joined: Thu Jun 28, 2012 8:46 pm

Re: Rapid Programming and Iteration

Post by paulclinger »

OmarShehata wrote:Bret Victor shows how brilliant such a technique can be here:

http://www.wimp.com/videogames/

And has a 1 hour long presentation talking about how crucial this is as a design principle here: http://vimeo.com/36579366
I also got inspired by Bret Victor's presentation and added something similar to the Lua IDE I've been working on: http://notebook.kulchenko.com/zerobrane ... ctor-style. There is also Love2d support in the IDE and live coding works for love2d scripts (although I don't have a screencast with that functionality, only with love2d debugging: http://notebook.kulchenko.com/zerobrane ... -debugging).

Paul.
Last edited by paulclinger on Fri Sep 21, 2012 3:06 am, edited 1 time in total.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Rapid Programming and Iteration

Post by T-Bone »

While I always want to be able to start my game straight from the text editor (like gedit allows) I would never want something like that. You want to look at every iteration of your program as a program of its own, and see its shortcomings and problems, and then work on them.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 70 guests