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 / Can I load a file that has DBPro code in it and execute it?

Author
Message
Mudbud Productions
15
Years of Service
User Offline
Joined: 1st May 2011
Location: Cloud 9
Posted: 23rd May 2011 06:39
If so, how may I be able to achieve this?

Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/Zo04mva
You get 250MB extra by using the link ^^
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 23rd May 2011 07:25
When you compile your code it turns it into an .exe. Or are you talking about running another program like with the EXECUTE FILE command?



SH4773R
16
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 23rd May 2011 07:48 Edited at: 23rd May 2011 07:52
I think he wants to load a .txt file with dbp code in it and parse it so it is executed at runtime when his .exe is started. Basicly a dbp interpreter,( im not sure tgc would like this)
A simple way to do this would be



For paramiters it would take more, im sure with work you will get ut to work.


My software never has bugs, it just develops random features.
C4: silly putty for men.
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 23rd May 2011 09:35
You can also use the DBP compiler. I think you can find the right code to make the DBP compiler compile a .dba file on the forums.

Downside is that you can't distribute the DBP compiler with whatever you want to make.

Sven B

Mudbud Productions
15
Years of Service
User Offline
Joined: 1st May 2011
Location: Cloud 9
Posted: 24th May 2011 06:08 Edited at: 24th May 2011 06:11
well the reason why was to be able to have updates for a game. No I am not talking about compiling an exe, thanks though...

EDIT: yes, commico inc, that is exactly what I was looking for.. Thanks!

EDIT again: Wait, is this ilegal though? I don't want to do anything wrong.

Your signature has been erased by a mod - no affiliate links thanks
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 24th May 2011 15:15
If you want to update your game you can create a patch using this patch tool:
Patch tool by The Winch

You basically show it the old version of your exe and the new version and it creates an executable patch that can update the old version. The patch file is a fraction of the size of the original exe.

The only thing you have to be sure of is that you compile any required new media into the new version of the exe.

I've used it before and it works really well...

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 24th May 2011 16:59 Edited at: 24th May 2011 17:03
I think he wants to build a generic engine that houses his game engine, then script the game logic externally. There's a few LUA plug ins floating around for this. That's prolly the best option. Rolling your own scripting language is certainly doable (fun even) but using LUA will help you get something up and running quicker.

Mudbud Productions
15
Years of Service
User Offline
Joined: 1st May 2011
Location: Cloud 9
Posted: 24th May 2011 20:02
The patch idea is really cool, I will have to try that.. But originally I was checking if there was a command that executes code in a file.. The DBPro interpreter thingy sounds cool.. I think I will just stick to the patcher though. Thanks everyone

Your signature has been erased by a mod - no affiliate links thanks

Login to post a reply

Server time is: 2026-07-11 19:06:09
Your offset time is: 2026-07-11 19:06:09