Posted: 15th Mar 2007 1:53
EDIT: Look at last post for new question.

I am trying to convert my functions into commands that Dark Basic Professional can reconize, or a way to some how convert the commands that the compiler doesn't reconize to something it will.

Example Function:
+ Code Snippet
Function move_object_using_arrowkeys(obj)
`source code to move object
endfunction


Example Code:
+ Code Snippet
move object using arrowkeys object_number


I have thought of several ways of doing this I just need redirection to a thread that would cover these things.

I though of using a dll file to point to a structure where my functions would be stored and compile that data. (Make Commands that compiles data in a different format)

I also though of a "pre-compiler" which would reconize my commands and replace the commands with the source code to the commands in Dark Basic Professional code sent to the compiler.

Shelling is another way to send data to the compiler. I am just having a hard time finding threads that tell what you would put for parameters, so the compiler would load the .dba file and spit out and .exe or executable.

I don't want to copy and paste from Dark Basic Pro dlls. I just want a way to convert data over without the user seeing the source.

Any of these concepts would work I just need resources or someone to explain what I could do for my problem.

Check out my thread for Dark World: http://forum.thegamecreators.com/?m=forum_view&t=96546&b=8
Posted: 15th Mar 2007 16:06
I was playing around with this the other day. I wanted my functions to be recognized by the compiler.

Go into the keywords in the editor folder and open a file to see the format. Just make a ini file using notepad and save it in keywords. The compiler will recoginize it and it will show up in the editor as a command. You can even make htm files if you wish.
Posted: 15th Mar 2007 16:36
You'll still need underscores using that method. The only way to bypass the requirement of underscores and paranthesi is to make a dll.
Posted: 17th Mar 2007 17:11
How would you do this in a dll, without using a command table just using Dark Basic Pro code if possible.

If this wouldn't work then what other methods to include functions in a project without the user having access to them. (The .dba files would have it embeded into it)

How would I keep the user from viewing it in the state of a .dba file. I can't encrypt it because I think it would run then.
Posted: 20th Mar 2007 1:55
To make this more clear:

I need to pass a parameter of the .dbpro file to the compiler.

Would you use execute file "compiler.exe",".dbpro filepath",""?

Can you do this in Visual Basic .Net, or another language?

I need to send the .dbpro file to the compiler to compile the .dba that the .dbpro file is for. I also need to compile and run it.

Any idea, suggestions, or code snippets anywhere in the forums?
Posted: 24th Mar 2007 19:31
Is there a way include the file in the source and distribute it without the user being able to view the included file?

Is there a command to compile and put embed the file in the executable?
Posted: 7th Apr 2007 0:43
I should of put it in Dark Basic Pro instead of Dark Basic, so I am double posting it here. Check back at my thread to read all the details:

http://forum.thegamecreators.com/?m=forum_view&t=86737&b=10

It is one of the last posts..

Question for mods or any one else who would know how this high end concept would work:

It is for Dark Basic Pro

How can you include the Dark Physics and Dark AI dll file in a gaming engine, use it and allow users to have it in a final exe without giving them the dll.

I want users to create there world and the program to take the files from the game engines internal media and add it to another exe program in its internal media.

How can this be done?
Posted: 7th Apr 2007 2:35
From what I understand out of all of this...
You're going to have some legal issues if you keep this up o_o;
Posted: 7th Apr 2007 3:26
How can this be done?


It can't be done legally. If I understand correctly, your program generates source code that relies on the compiler to generate an EXE - the only way that will work for others is for them to already own DBPro and all the required plug-ins - you can't just give them the plug-ins.

If you are really serious about this, then you need to contact Rick@thegamecreators.com and work out a deal. If your program is workable then Rick may offer you some kind of deal. Or then again, he might not.
Posted: 7th Apr 2007 8:31
I would guess not.

@Gamers for sale -
You should probably create a scripting engine. It seems kind of pointless to have your program compile code, because DBP already does that.

How can you include the Dark Physics and Dark AI dll file in a gaming engine, use it and allow users to have it in a final exe without giving them the dll.

The only way to do this is through scripting. Your engine can have DarkPhysics and AI capabilities, and users can access that through script. It is impossible to use those DLLs in the exact manner that you describe, because you'd have to give them to the user in order to compile DBP code.

You can't embed or hide the dba code if you distribute that. In order to encapsulate code, you need to put it into a DLL. So, you either need to make a DLL, or a scripting engine, or both. As a compiled engine, the DLLs would be protected. This is what I'm doing with the Geisha House engine. People will be able to create their own RPGs through the use of a world editor. The world that they create will be interpreted by the RPG Engine.
Posted: 8th Apr 2007 4:12
@IanM

To make this clear. I have a program that would gather information like for a path using Dark AI. Then I would use this data to generate a .dbpro file and a .dba file and included in the internal media would be the plugins. Then instantly it would send the .dbpro file as a parameter, it would create an exe file, then delete any source code. I was wondering if I could get rid of the in between step of having the .dbpro and .dba files and just sending the data directly to the compiler as a string.

Everything is in theory so, I don't know about actually having this program done would be possible.

Another way of doing this is having a program that would be a big select, case function for all the commands in them. I just want to find a way around this and have the code that was used in the exe to make it smaller instead of the large program with all the commands there.

I was also thinking of is creating a real time coding engine that would automatically run a line of code once it was typed out. It's like a scripting engine that would execute commands that the user was typing in while looking at the results...it would be very handy.

I found out some sort of way to do this in Dark Basic, but Dark Basic Pro is a little more complicated.


What is the make game batch file and dll in the plugins-users for???

Would that be a way to communicate to the compiler?
Posted: 5th May 2007 5:45
Where can I find the documentation for the command line arguments?

For Dark Basic Classic it is in the help files, but I can't seem to find it for Dark Basic Professional.

I thought I saw it somewhere on the forums.

EDIT: An example would be: execute file "/p mytext.txt","",""
something like that. This would print...I think. I just want to find a way to compile a .dba file.

Thanks in advance!
Posted: 5th May 2007 8:59
CL$

This command will return the string passed in as a command line when the program is run as a standalone
executable. When this program is created as an executable file, any additional parameters entered after
the executable name are treated as a single command line string. You can use this string to control how
your executable behaves based on the contents of the string.

Syntax

Return String=CL$()


Hope that helps.
G2L
Posted: 5th May 2007 15:35
I have a program that would gather information like for a path using Dark AI. Then I would use this data to generate a .dbpro file and a .dba file and included in the internal media would be the plugins. Then instantly it would send the .dbpro file as a parameter, it would create an exe file


I too am a little confused as to what you are doing.

Are you going to be giving/selling this program to others?

If so, then surely you would need to supply elements of the DBP compiler and plug-ins with your program. (A compiled DBP exe doesn't include the compiler).

As already mentioned, this cannot be done legally without an arrangement with TGC.

TDK_Man
Posted: 6th May 2007 22:42
I am using the execute file command to execute the compiler, sending the file as a parameter.

This is just something else:
I have a program that would gather information like for a path using Dark AI. Then I would use this data to generate a .dbpro file and a .dba file and included in the internal media would be the plugins. Then instantly it would send the .dbpro file as a parameter, it would create an exe file


I just want a way for my program to have a compile and run feature.

My program generates code, creates a file or sends it as a string to the compiler, and runs the program.

Yes, I know that it can't be done because of crossing illegal bounds. I was just looking into using a DBPro program as the compiler and lua as the scripting language calling the dbpro commands.

I found it can't be done, so I am just going to require the user of my program to have unity and Dark Basic Professional to use my program.
Posted: 6th May 2007 23:00
I belive the guy who wrote Unity LUA was severly restricted in the number of DBP commands he was allowed to return in order to stop people recreating the compiler. He could have allowed them all!
Posted: 6th May 2007 23:22
There is someone who created a lua plugin that has all of them that I was learning to use. (Don't remember the name of the plugin)

It used something like db.call(command).
Posted: 7th May 2007 1:17
Yeah it's LUA 5.1 by Barnski. I'm surprised TCG haven't jumped on it to try an kill it's "call all DBP commands" feature because it could mean somone cloning it.
Posted: 7th May 2007 1:52
Anyone know how?

I am using the execute file command to execute the compiler, sending the file as a parameter to compile and create an exe file out of it. I just don't know what parameters to send to the compiler to get it to compile and create an exe.
Posted: 26th Jul 2007 1:02
I was wondering if directx 9.0 would have a way to offset the objects origin. I know by default it is in the center. I am trying to work this command into my plugin and can't find any source to changing the origin when using the search feature on this site.

Let me know if you have any idea of where to obtain this information.

Thanks

GFS