dos-man 64 wrote :
Hmmm, the name torrent is already associated with a distributed file
transfer process.
I think you would be better off having your program generate a data
file which contians the commands to reproduce the image, rather than
actual source code. Then you write a plugin which reads the data file
and generates the image.
That way (if it ever becomes popular) others could write plugins in
other languages to read the data file.
You're talking about something like a generic bytecode or a simple
programming function that could be rewritten in another language?
Something like this maybe
type, shape, rgb(rgb) x, x1, x2, y2, radius
solid, square, red, green, blue, 0, 0, 100, 100, 0
It could work. I've been having thoughts about the program spitting
out a long function call. The user would then need to have the
function in his or her program in order to use the generated code.
This would remove a lot of redundant code (which there is a lot of.)
Unfortunately, It would also make it more difficult to edit the code
(which needs to be done for the purpose of animation.)
Instead of this:
drawwidth = 1
backcolor = 0
circle(0, 10), 0, 0
Would have this
private sub(shapetype, solid, color, x, y, x2, y2, drawwidth)
if shapetype = 1 ' its a square
if shapetype = 2 ' its a circle
if shapetype = 3 ' its a line
if shapetype = 4 ' its text
if solid = 1 its transparent
form1.drawwidth = drawwidth
form1.forecolor = color
' rest of the code for drawing the shape goes down here
end sub