| |
burton1 Account closed
Registered: Dec 2005 Posts: 3 |
c64 for arts sake
i am using the c64 for an art work which i am making at present, as such i am having to teach myself from scratch to operate and program the c64. i am still struggling with the technical aspects of the project so any help would be muchly appreciated. the project goes a little something like this;
4 c64s are to be networked.
each c64 is to run a program which randomly selects a piece of info from a list (at present i am trying to write this program and utilize the random number generator built into basic however the command which looks a little like this,
1 X=INT(RND(1)*(20-3)+3)
2 GOTO X
3 PRINT"...
4 PRINT"...
does not want to work) and then the data is to be sent over the network to the 4th c64 which compiles the data and prints it out on my printer as well as dropping it into an e-mail which will then be sent out to set addresses.
i am at the moment hoping to build "the final ethernet" from the schematics on the TFE website and use contici as my server and e-mail client.
if anyone has any advise to do with any aspect i would be extremely, extremely grateful.
thanks |
|
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Looks like lots of technical hassles without much gain. Why send random numbers over a network? Why ethernet? Why e-mails? I don't get it. :D |
| |
VanessaE
Registered: Jan 2005 Posts: 3 |
The problem here is that C64 BASIC doesn't allow you to use a variable with the GOTO command. Rather, you probably need to use an ON/GOTO command instead. For example, your code would probably read more like this:
1 X=INT(RND(1)*(20-3)+1)
2 ON X GOTO 3,4,5,6,7,...
3 PRINT"...
4 PRINT"...
Alternatively, a better method is to use an array, for example:
10 DIM X$(20)
20 FOR X=1TO20: READ X$(X): NEXT: REM FILL THE ARRAY FIRST
30 :
40 X=INT(RND(1)*20+1): REM NOTE THE CHANGE HERE.
50 PRINT X$(X)
60 ... do whatever else you need, loop, etc.
99 END
1000 DATA "This is the first line to be selected from"
1010 DATA "This is the second..."
1020 DATA "This is the third..."
And so on for however many lines you need to select from.
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Hmmm, dim x$(20)? When I did my BASIC twister on LCP I couldn't have more than 10 entries for an array of strings. Is 20 actually possible? |
| |
ready.
Registered: Feb 2003 Posts: 441 |
This thread has alread been started as the discussion "Help me create something special!!!". |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
jackasser: ROTFL :) ofcourse c64 basic is not that lame, only the memory limits the arrays :) |
| |
iopop
Registered: Dec 2001 Posts: 317 |
Interesting, this thread was also started at lemon64.com. The very same suggestions was made there, ie. ON GOTO and using arrays instead.. |
| |
Slartibartfast Account closed
Registered: Jul 2002 Posts: 230 |
Hrm. Seems more like "C64 for insanity's sake".
Burton: You'd be best posting something like this on comp.sys.cbm |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
I remember that in one issue of the 64'er magazine there was a description how to do a GOTO X. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
@Oswald: Sorry man, but hey I'm not the BASIC coder, YOU are!! (ProjectOne =) ) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
jackasser: hehe, ok I have to admit, I first learned c64 basic, and been coding stuff in it for years before going for asm. |
| |
burton1 Account closed
Registered: Dec 2005 Posts: 3 |
sorry if people keep seeing this same question pop up all over the place but i have had so little luck so far that i hit every c64 forum i could find with the same question hoping to get a responce that worked. as for this having already been answered on lemon64 it was and i tried it and i could not get it to work, and as for the answer on lemon64 about arrays; I AM A BIT SLOW (ie i didnt know what they where on about as i am very new to all the jargon). sorry for being a bit slow in that respect, as someone said to me today "you are on the steep part of the learning curve".
cheers for all the help so far please keep hitting me with your ideas.
p.s the reason the ethernet conection is there is that i am hopeing to use contici to email out the information compiled from the other machines that are networked to allow a basic random art generator. which if you like may be C64 for insanity's sake but it is bloody good fun learning how to do it, and surely that is the point of the forum.
thanks again |
| |
iopop
Registered: Dec 2001 Posts: 317 |
You dont happen to have a website with project info etc as I guess you're into "New Media". Or just a webpage with your other stuff would be kinda interesting to see aswell..
The reason why Im asking is that I made a similar tool some week ago, but in c. Using lyrics from serveral different groups, breaking on "\n" and compiliing into a long text. Gives very interesting results. Another fact that this program uses "illegal information", if Lauren Keiser has his/her will, makes it even more interesting. |
| |
Slartibartfast Account closed
Registered: Jul 2002 Posts: 230 |
Quote: sorry if people keep seeing this same question pop up all over the place but i have had so little luck so far that i hit every c64 forum i could find with the same question hoping to get a responce that worked. as for this having already been answered on lemon64 it was and i tried it and i could not get it to work, and as for the answer on lemon64 about arrays; I AM A BIT SLOW (ie i didnt know what they where on about as i am very new to all the jargon). sorry for being a bit slow in that respect, as someone said to me today "you are on the steep part of the learning curve".
cheers for all the help so far please keep hitting me with your ideas.
p.s the reason the ethernet conection is there is that i am hopeing to use contici to email out the information compiled from the other machines that are networked to allow a basic random art generator. which if you like may be C64 for insanity's sake but it is bloody good fun learning how to do it, and surely that is the point of the forum.
thanks again
Actually, the point of this forum is coding for the c64 demo scene. Not BASIC programming, not wacko "arty" over ambitious projects made in BASIC, sorry man but that's not what these forums are for.
Ok, it just had to be said!
On the other hand, I think there's another forum perfectly suited to your thing. It's called "The Secret Society of Commodore Coders" and a few BASIC programming experts hang out over there, as well as those interested in expanding basic with ML.
http://ssocc.proboards45.com/
Enjoy ;) |
| |
TNT Account closed
Registered: Oct 2004 Posts: 189 |
Quoting SlartiActually, the point of this forum is coding for the c64 demo scene. Not BASIC programming ...
What about those 52 BASIC Demos in CSDb? |
| |
Slartibartfast Account closed
Registered: Jul 2002 Posts: 230 |
Quote: Quoting SlartiActually, the point of this forum is coding for the c64 demo scene. Not BASIC programming ...
What about those 52 BASIC Demos in CSDb?
Ah well, they should never have been included here, but then so much that shouldn't has been, so it's almost not even a scene database anymore.
Hrm, no need for a flame war about that, been done before. |
| |
bugjam
Registered: Apr 2003 Posts: 2589 |
I would actually be very much interested in the progress of your project, burton, I think C64 is a very good tool to do art. And the more "insane" the better! :-) Hope you get your problems solved, good luck anyway! |