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 Discussion / Scripting...

Author
Message
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 12th Jul 2009 22:25
Is it possible in DBC?

If so, how would i go about doing it?

-DD

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 12th Jul 2009 23:32
So you want to script? Doesn't Dark Basic already do that? I don't think I quite understand your question, sorry...

TheComet


Make the path of your enemies easier with Waypoint Pro!
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2009 00:18
Its sort of like a way to set an 'object' - whatever it may be - to behave a certain way during certain situations using a scripting langauge. I've been *looking at* other "stuff" like C, and was wondering if it were possible in DBC.....

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
wickedly kick it
17
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 13th Jul 2009 00:20 Edited at: 13th Jul 2009 00:25
I know its possible in DBP, but i suppose if you can access files and read variables you can One way i suggest it is writing variables to a file, just have the variables determine behaviour, the only way i can think of without LUA

Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2009 00:31
hmmmm............i'll give that a try.

Quote: "the only way i can think of without LUA"


LUA? Whats that?

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Brick Break
User Banned
Posted: 13th Jul 2009 00:40
LUA is a universal scripting language, available as a plugin for DBPro. It's also used in a lot of games like Half-Life 2.

WINNER list:
Latch, Lee Bamber, TDK
Thanks for the help!
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2009 00:43 Edited at: 13th Jul 2009 00:45
Oh, i feel slow now
............Does universal mean....DbC...?

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Brick Break
User Banned
Posted: 13th Jul 2009 00:58
Well, I don't see why not. You might have to look into that. Currently, I don't think there are any LUA libraries for DBC, but it would certainly be possible. However, you have to understand that LUA is just another language. You should write your own script loader for your own unique set of commands. That's what I'm doing for my game engine. Here, I'll whip up an example:

The above example fills an array with each line of a file. From there, you can do something like this:


WINNER list:
Latch, Lee Bamber, TDK
Thanks for the help!
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2009 01:05
Ah. I see.

Is that all Lua is?


If so, i wont be needing it. I'll write it myself.

If not, what makes Lua so.......speshal?

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Brick Break
User Banned
Posted: 13th Jul 2009 01:13
Well, I suppose some people just like LUA for its syntax. Personally, I could care less. If I were writing my own language (which I am) I would make it easier. You should try to aim for that, too. For instance, why does DarkBASIC have COLOR BACKDROP an FOG COLOR? Why isn't it one command? Also, why doe SET CAMERA FOV use radians? Just stuff like that. Fix DarkBASIC's problems with your own script loader, then build your game around that.

WINNER list:
Latch, Lee Bamber, TDK
Thanks for the help!
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2009 01:17 Edited at: 13th Jul 2009 01:19
Quote: " Fix DarkBASIC's problems"

Impossible.

Yeah, Thanks BB. (DD - BB = LOL!? > WTF!?!)

Quote: "Also, why does SET CAMERA FOV use radians?"


You gotta ask Lee.

Quote: "writing my own language (which I am) "

Really? Gotta see it.

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Brick Break
User Banned
Posted: 13th Jul 2009 01:22
Quote: "You gotta ask Lee."

Rhetorical question.
Quote: "Really? Gotta see it."

The language itself isn't the problem, it's the underlying work. All in due time.

WINNER list:
Latch, Lee Bamber, TDK
Thanks for the help!
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2009 01:28
tch, still.....that be awsome, if you came out wth that.

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 13th Jul 2009 14:42
Quote: "Ah. I see.

Is that all Lua is?


If so, i wont be needing it. I'll write it myself.

If not, what makes Lua so.......speshal? "


Lua is actually pretty juicy. It can allow you to make a bridge between your machine and your program, checking internal memory, registers, pointers, processes, all kinds of stuff. In fact, you could even decompile a DB exe while it's running with lua - you'd really have to know what you were doing though. But like Brick Break said, it's an entire language. If you only need some specific controls for your apps or games, write your own script system or batch file system. But if you want to learn a new language, go for it - lua's portable across multiple platforms and it's syntax will be the same from one app to the next - so once you learned it, it would always be useful no matter what language your program is written in - and it's well respected and used professionally.

Enjoy your day.
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 13th Jul 2009 15:08
Quote: "Lua is actually pretty juicy."




Alright. I only need a small system for my games, but i still am gonna look into Lua.........

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 13th Jul 2009 20:07 Edited at: 13th Jul 2009 20:09
I have never looked at LUA does it have it's own website?

Does the dbp plug-in use dbp stuff or can i use it with dbc by calling the "Call dll" command?


Nevermind:

http://www.LUA.org

Is it a dll or a set of dll's or what? i am kinda interested.

i have tried making my own scripting stuff before. but still.

New Site! Check it out \/
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 15th Jul 2009 19:26
Quote: "Is it a dll or a set of dll's or what? i am kinda interested"


It's pretty flexible. It has a standalone interpreter that you can send commands to on the command line or a lua script. It has a compiler to build callable lua binaries. It also can be embedded into a C program so you could build your own custom DLLs with lua calls in them. There are a lot of options, that's one of the reasons it's such a great scripting language. There are many ways to add lua functionality to your programs.

Enjoy your day.
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 16th Jul 2009 03:04
Quote: "There are many ways to add lua functionality to your programs."

I see, lua looks cool. but i wont be needing it....

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 18th Jul 2009 00:46
Ok so it's a exe that you run kinda like running db like this (From Command Line)

Db.exe -x c:/Test.dba

I will look into it. sounds usefull.

New Site! Check it out \/

Login to post a reply

Server time is: 2024-05-20 12:23:38
Your offset time is: 2024-05-20 12:23:38