This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
thedriver87's profile picture

Ex-Programmer in over his head (ICBM project)

Started by thedriver87, 13 January 2013 - 11:49 PM
thedriver87 #1
Posted 14 January 2013 - 12:49 AM
Hello everyone, this will be my first post here on the computer craft forums. I have used this in conjunction with many other mods for some time, and I must say its been enjoyable to be able to directly apply coding to make some cool machines and systems in the minecraft world.

I was recently poking around in the programs on the forums here looking for one that might fit a need i have for creating a launch system
using ICBM in conjunction with CC. there were a few that took a crack at it and did just fine, how ever I have a detailed idea for a functional and easy to use program that will let anyone setup a system quickly and even be able to secure it with keycards.

here is my main issue… Lua is like greek to me at this point, I programmed very little back when visual basic was up and coming ( gosh i'm dating my self huh) and some of the particular behaviors of commands and the odd syntax used for Lua is just killing me inside (mentally mostly) it is at this point I have admitted defeat and look to you pros in the hope that one of you is interested in this type of program and either might help walk me through the parts i'm missing ( which is admittedly a lot) or perhaps take up the project themselves. I have the logic and how I would like everything managed and perhaps I could even provide help in the structuring of the code, however something about starting at the IDE's blank page and trying to start the loops and write up variables is not working for me.

If someone does add their expertise to this project I would like them to take credit for the program and just mention my design help in the credits. I feel that there is a desire for this type of program by many people and it could well become an ICBM/CC add on in the future.

I have attached a notepad that outlines how the program should progress and some notes on how I was planning on writing things up. any questions are welcome and I would really appreciate being contacted if you do decide to take up the project.

Thanks in advance to anyone that decides to chip in on this!
Exerro #2
Posted 14 January 2013 - 03:10 AM
i will try to help if you want…i read through the file but way tmi. Im guessing you want remote pcs to fire the missiles and one central pc to send "fire" messages to pcs with security etc? do you have a server?
anonimo182 #3
Posted 14 January 2013 - 03:57 AM
This is your second topic, the first one is some topics below…
Cloudy #4
Posted 14 January 2013 - 04:16 AM
Yes, someone moved the old topic here, after this was already posted. I've deleted the old one.
thedriver87 #5
Posted 14 January 2013 - 01:47 PM
i will try to help if you want…i read through the file but way tmi. Im guessing you want remote pcs to fire the missiles and one central pc to send "fire" messages to pcs with security etc? do you have a server?
That would be a boiled down explanation, yes. I would like to point out that there is a group of commands to wrap the ICBM launcher as a peripheral, and send it x, z, and frequency in addition to just applying a redstone signal to fire.
I am aware this is not a simple program. I use skype and a program attached to it called idroo to communicate online with a white board. It makes designing programs and really all work on a project easier. If you would be willing to work out a time set aside we could discuss the specifics in greater detail.
however if your the type that likes to jump in head first I would say the best place to start is by writing the security portion to lock the control computer. everything else must operate within that so that regardless of where in the program you are it will lock when the disk is removed. thanks for the reply!
thedriver87 #6
Posted 14 January 2013 - 10:46 PM
after doing some further investigation I have found that the programs would best be setup like so…

Rednet listens for a message.
message will consist of the following variables that will be assembled by the controll program and sent to this computer: Countdowntime, X, Y, Z, Frequency, and Launch. ''they can be named whatever, but the idea is the same. then those variables will be applied in the following manner.
Count down (Countdowntime) seconds then setTarget(x,y,z) setFrequency(Frequency) then use the icbm.launch(Launch) obviously if its 1 then the launch will take place, otherwise only the targeting and frequency will be updated.

the controll program would be something like..
ask the user for the ID of the launch computer
ask for x,y,z coords. then ask for a launch frequency and a countdown time.
when all the information is taken it is displayed for the user to review, and one last yes no confirmation is used before sending. to my understanding all this information will be sent as a string and then placed into the propper variables on the launch computer side.

now if only i could code this ^^^ heh.
anyone that might steer me in the right direction with regards to the listening program I would appreciate it very much!
ryanhis #7
Posted 16 January 2013 - 03:05 AM
Mmh, i could help you out a bit with the coding details :P/> as far as setting up a few computers listening for directions and such, that's well within my abilities. The only thing i'm concerned with is getting XYZ coordinates into the missile launcher terminal. As far as i know (i have a little experience with ICBM mod, but not enough to be sure of this) the terminal is seperate from a computercraft computer, and i don't believe there's a way for them to communicate. You could fire pre-programmed coordinate missiles with a little redstone, but as far as inputting coordinates, i don't believe that's possible. Correct me if i'm wrong :P/>

In addition to the actual program to fire a missile, i would also suggest a mild security system. Wouldn't want others to gain access to your nuclear stockpile ;D (if you plan on using this program on a server, anyways.)

P.S. Add me on skype? My username is Ryanhis.
ryanhis #8
Posted 16 January 2013 - 03:26 AM
Ahh, small correction. Upon looking at the text file, you actually have a rather comprehensive security system in mind, so disregard my last "in addition".
theoriginalbit #9
Posted 16 January 2013 - 03:34 AM
Yes, someone moved the old topic here, after this was already posted. I've deleted the old one.
And this is why I want to tell people that I've requested a move for them, so they don't post a duplicate. But one of the mods (forget which) told me not to…
KillaVanilla #10
Posted 16 January 2013 - 10:15 AM
I think I've made something similar to this…
thedriver87 #11
Posted 17 January 2013 - 09:40 AM
thank you everyone for the posts, The program is coming along nicely thanks in large part to a new friend of mine. we hope using turtles and a few conveyor belts from the universal electricity mods the entire system will be automated, from putting items in the chests to a missile fully crafted launching. is it auto mated over kill? do we mind? will the turtles get all sky net on us and take over the launchers? I will keep you posted ;)/>
theoriginalbit #12
Posted 17 January 2013 - 12:30 PM
I'm gunna tell you now, if you want sky net turtles, you doing it. I'm not programming that, too many variables and AI!