Live Coding

anyone heard of this?? check out nebogeo:

http://www.pawfal.org/index.php?page=NeboGeo

ive been trying to figure if blender is posible for live coding visuals. ie. having the python code up on screen and re-hacking it live…

i thought it wouldnt work but looking through the API i had some ideas…

in theory using the open/write command you could write a .py file[rahter than .txt --am i right here]
then using SCA_PythonController setScript you could load it back up.

so if you could display and edit text on an alpha plane using a string property, you could then hit a key which would save this as a .py file then open this up and run it…

hence livecoding :smiley:

this all seems to simple to be true- what am i getting wrong here
:slight_smile:

Will

that page look useful at all here [opera 8.5 windows]

python as far as I know isn’t very good at this… unlike lisp

i thought it wouldnt work but looking through the API i had some ideas…

seems like it would be better to have as a feature in blender, if you script gets into an infinite loop when you do this you’re hosed… [okay you have to hit control+c in the console window and hope the script doesn’t run the next frame]

hi zero_d,
i didnt understand the first part of you’re reply if you couldnt get anything up in youre browser try this link
http://www.pawfal.org/dave/
it what i meant to post in the first case[ it work in opera 7]

It would be awesome to have this as a feature in the GE if anyone else feels this way please say so in this thread, then we could approach the BLender people, whoever they might be.

As for now is this idea gonna work i.e:

  1. can write, write a .py as opposed to an .txt —thats the only bit that i can see not working.

  2. is there a better way to do this than an alpha plane with text on it, they always seem a bit dodgy to me?

Zero_d could you explain an infinite loop to me or give an example, i dont understand what you mean.

I guess if something was wrong in the script you could have a get out clause i.e. another script running which if you hit a key would revert the buggered script back to an earlier stable version…

What d’ya reckon???

I think it wouldn’t be worth the effort using only what is currently available from the game engine. It would be very difficult to create resonable text, and it would be not really possible to debug [because you’d have to pause the script over several frames]

it is apparent you haven’t used a real IDE [like visual studio or eclipse] to program, what you describe is only a tiny step above the features that exist now [where you have to exit/start the game engine to change a script]…

What would be useful is to be able to edit the script while the game engine is paused, and [highly unlikely in python] even mid-execution of the script itself.