Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Dark World: Converting commands into functions

Author
Message
Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 15th Mar 2007 01:53 Edited at: 7th Apr 2007 00:44
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:


Example Code:


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

wildbill
18
Years of Service
User Offline
Joined: 14th Apr 2006
Location:
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.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
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.

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
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.

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 20th Mar 2007 01: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?

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
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?

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 7th Apr 2007 00:43 Edited at: 7th Apr 2007 00:44
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?

Essence
21
Years of Service
User Offline
Joined: 12th Oct 2002
Location: The Netherlands
Posted: 7th Apr 2007 02: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;

Current project: MiRevu Visual Gaming Engine
thread: http://forum.thegamecreators.com/?m=forum_view&t=103073&b=8
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Apr 2007 03:26
Quote: "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.

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 7th Apr 2007 08: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.

Quote: "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.


Come see the WIP!
Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 8th Apr 2007 04: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?

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 5th May 2007 05:45 Edited at: 6th May 2007 22:46
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!

MartinS
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Rochester, NY
Posted: 5th May 2007 08:59
Quote: "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

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 5th May 2007 15:35
Quote: "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

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 6th May 2007 22:42 Edited at: 6th May 2007 22:45
I am using the execute file command to execute the compiler, sending the file as a parameter.

This is just something else:
Quote: "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.

GatorHex
19
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
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!

http://www.KumKie.com http://bulldog.servegame.com
Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
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).

GatorHex
19
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 7th May 2007 01: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.

http://www.KumKie.com http://bulldog.servegame.com
Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 7th May 2007 01: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.

Gamers for sale
18
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 26th Jul 2007 01: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

Dark World Website Launched! http://www.darkworldengine.co.nr
[/href]Blog with updates of Dark World Launched! http://www.darkworldengine.blogspot.com
Xolatron
18
Years of Service
User Offline
Joined: 12th Mar 2006
Location: The Star Forge Language: DBpro
Posted: 26th Jul 2007 03:49
If you only intend this app to be useable by DBpro users (i.e. use the compiler), then look at http://forum.thegamecreators.com/?m=forum_view&t=56639&b=1

But it's illegal to redistribute the DBpro compiler with your program, even if it's attached media or something.

-Xol

Login to post a reply

Server time is: 2024-04-23 15:21:21
Your offset time is: 2024-04-23 15:21:21