ID:180674
 


I have about 300 pages of code that i have to convert into byond.. INCLUDING a space system that gives you text baced courds for your spot in space... this will be killer hard but i already have the C code for it. i can alter that so it will work as a CGI but i need to know how byond can tap into it... the space system would run almost like an entirely differant game exept it would get its imput from the usr in byond and that would be where the output would go. i would also need byond to recognize setain commands.. like if the ship your in is blow up in the CGI then you also die in the byond code.. it shouldent be that hard but i have no examples of byond useing another program to do its calculations. i can fix the CGI to work from what byond would give it but i cant fix byond to send and receve from it... i think that CGIs in byond will make a new age of killer games. i am just not sure if it can do it or if anyone has done it yet... well i should be posting this in geniral but its going to be my first byond game.... let me know what you think.
On 4/3/01 7:20 am jobe ritez:
I have about 300 pages of code that i have to convert into byond.. INCLUDING a space system that gives you text baced courds for your spot in space...

duede! this soundz wicked kewl... text baced courds?!? nice!!

this will be killer hard but i already have the C code for it. i can alter that so it will work as a CGI but i need to know how byond can tap into it...

easy. check out the referance (in dm infocentar) n look 4 file2text, shell and text2file. u can basicly output you're CGI program to a text file and then load it on up in byond. and when you need 2 send stuff to the cgi just do the opposet! couldnt be eazier. althogh i wander if byond supportes bi-derectionle pipes for output as that woud faster?

go for it dude, i cant wait to see what you do with it!!!!

--air.m.<font size="-2">(wondering if I communicated more effectively that way)</font>
Hi Jobe,

It sounds like a pretty big project! But I think you might be able to "hack" a working version with BYOND.

I am a bit puzzled with some of the details, though. This C program-- is it supposed to run as a web-based CGI? Such CGI programs are "one-shot" deals-- booting up, doing something, and closing-- every time the user makes a request. That's pretty inefficient. If your program is a bunch of utility routines that you want to use in BYOND, you could use the shell() command to boot up your C program (with some arguments) and have that program return data (either directly or in a file) to the BYOND program.

On the other hand, your C program might be meant to run in the background, in which case you don't want to boot it up and close it for every little user operation. In this case, you could keep both the BYOND and C programs running and have them share data by, say, reading and writing to a common file. This might get a little tricky (since you'll have to write a routine in C to write and retrieve data as well), but it would be more efficient.

I would suggest first exploring BYOND a bit more before delving into this major project, though. Get familiar with the syntax and we can help you out with the strange situations!
In response to Tom
On 4/3/01 2:10 pm Tom wrote:
I am a bit puzzled with some of the details, though. This C program-- is it supposed to run as a web-based CGI? Such CGI programs are "one-shot" deals-- booting up, doing something, and closing-- every time the user makes a request. That's pretty inefficient. If your program is a bunch of utility routines that you want to use in BYOND, you could use the shell() command to boot up your C program (with some arguments) and have that program return data (either directly or in a file) to the BYOND program.

its not like a CGI that you use for the web.. it IS part of the game.. it has to be running all the time becase it is set up so the MOB ships can interact with each other. haveing a common file is the tricky part becase in space combat situations you have to be able to mave dissions VERRY quickly. that is you have to fire a missle as soon as you type fire missle. same thing with changing your current heading. it all as to run VERRY quickly and VERYY smothly. allso it would be verry laggy to have all your skills uploaded into a text file and then have the CGI comeup with a respose baced on those skills, ship stats, and above all currnt situation and course. it is going to be veryy hard indeed. (NOTE: This project is VERRY confidential untill the final alfa version is out.. And even then it is still going to be in closed testing. i cannot tell you the plot behind it or anything. the only reason i have said this much is becase i need help. oh yeah also we could use some killer coders.... someone who works well with alot of others). the ting about the text shell() thing is that it will turn this almost turn table stile... but the other C part of it will run in realtime... so if you targets a ship.. it may be 2 secnds befor you realize youve been hit 15 times by every mob ship within range. (Well ive said 20x too much already please post if there is any way to DIRECTLY link byond ot another code). If you wish to join my team on this you are going to have to have something verry uniqe you can bring... (Like MAJOR KILLER codeing or THE BEST ICONS YOUVE EVER SEEN. we will have only 2 of every position. oh yeah and mapmakeing and bug testing are NOT going to get you in... sorry) we do need coders and stuff so give me an email at [email protected] DO NOT POST THAT YOU WOULD LIKE TO JOIN SEEING AS IF YOU DO YOU WONT GET IN! (We have to keep EVERYTHING verry confidential)



In response to jobe
its not like a CGI that you use for the web.. it IS part of the game.. it has to be running all the time becase it is set up so the MOB ships can interact with each other. haveing a common file is the tricky part becase in space combat situations you have to be able to mave dissions VERRY quickly. that is you have to fire a missle as soon as you type fire missle. same thing with changing your current heading. it all as to run VERRY quickly and VERYY smothly.

I realize that it's a daunting prospect to convert a bunch of working C code into BYOND code... but I think that would probably be the best way to approach this. If you just had a couple CGI scripts here and there, I'd say go ahead, but this sounds like an invitation to misery. On the other hand, if you're conversant enough with C to integrate the scripts with BYOND, you may be better off writing a C wrapper for all of them (though I hate to steer anyone away from BYOND!).

Anyway, I'm not trying to discourage you... just putting in my two cents' worth!

In response to Gughunter
On 4/4/01 10:32 am Gughunter wrote:
I realize that it's a daunting prospect to convert a bunch of working C code into BYOND code...

Gug, I think your post just violated the secrecy agreement. Prepare to be anillated.