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.

Work in Progress / Transform-i Scripting Engine

Author
Message
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 2nd Apr 2004 18:55
Hello everyone. For the past few days I have been hard at work on my new project called Transform-i (i pronounced "one"). Transform-i is a TPC DLL which provides C-style scripting to DarkBASIC Pro. It will allow you to control the various aspects of you DarkBASIC application, including object, music, etc... (special thanks to IanM for his wonderful C++ interface library).

Although still early in development, Transform-i currently supports the follow core commands and features:

- IF (basic syntax. will expand in future)
- WHILE
- FOR (not like C. More like BASIC here...)
- VAR (for declaring variables. only floating point now. may add string support if there high demand)
- Complex Expression evaluation: can evaluate expression with variables, numbers, and all of the DarkBASIC functions.

I have begun support for the DarkBASIC command set, and have completed most of the "core" commands (i.e. COS, SIN, ATANFULL, CLS), as well as a few image commands (i.e. LOAD IMAGE).

The language also supports the ability for your DarkBASIC application to define what I call a "crossover" variable that can be referenced and changed in both your app and your script. This allows for greater flexibility and control.

The engine is still early in development, but I have a small sample for download. Nothing impressive, but just a small taste. Visit [href]www.mighty-atom.com/d-zone[/href] and visit the Projects section for the project notes and the download.

Let me know what you guys think!

Cheers
MiR
20
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 3rd Apr 2004 01:07
Could be interesting if I only knew what C-style scripting was. I should know what it means by now but I´m an ignorant bast$%d.

Libera tu mente y te liberaras a ti.
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 3rd Apr 2004 02:13
Its a scripting language based on the programming language C++. This, however, you create scripts that manipulate your DarkBASIC creations.
Rpg Cyco
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Australia
Posted: 3rd Apr 2004 04:51 Edited at: 3rd Apr 2004 04:52
Awesome. Incredibly useful. Will you be charging a fee for this? I would surely pay it.

l8ter

Rpg Cyco

TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 3rd Apr 2004 22:48
Initially I will release this for free. The thought of charging has crossed my mind, but until its the best product possible, it will be free.
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 4th Apr 2004 01:23
I do need, however, people to test this thing out as I develop. Testing each command out as I add its functionality slow me a bit. Anyone interested in testing the scripting language let me know (leave an email as well) and I'll send information that you need to get started. Just one or two people will be fine.
Rpg Cyco
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Australia
Posted: 5th Apr 2004 10:15
I'd be happy to test it out for you. I've sent an email as well.

l8ter

Rpg Cyco

TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 7th Apr 2004 04:45
Ok. Update.

I've updated the IF command to add ELSE support. Just driving me nuts without it! Finished adding the DarkBASIC Input Commands, some Basic3D Commands, and Sprite Commands. Found that using the script engine with more than about 5 sprites slowed my FPS down below 20 FPS. However, I then did a test with a DBO object, cloned 20 times, and all being rotated via a script. No FPS lost. So this could just be sprites being slow? More testing is needed to determine what needs optimizing.

I'll be posting regular updates here, and on the website http://www.mighty-atom.com/d-zone/transform-i/. There you will find project notes, and downloads for the newest TPC DLL, Help File (still very incomplete), and test DBP projects.

Cheers!
Ian T
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 9th Apr 2004 22:12
Does this really mean true variable variables ? It looks fantastic... my only question... can it set flags that DBP can read?

TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 10th Apr 2004 00:47
Yes. I've setup a mechinism call "crossover variables". You define these vars in your DBP app. They then can be read/set in either your DBP app or your script. At this time, they work well, but they seem to slow things down after many references. I need to find a good way to optimize them.
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 10th Apr 2004 06:16 Edited at: 10th Apr 2004 06:17
I've changed the way the "crossover variables" work, seeing as how they were too slow. You are now not able to refrence them via name, seeing that the Standard Template Library list class is just a little too slow for this project. You now reference them by number. I also made the number of crossover variables available static (1,024 total available). This posed a speed increase, which is always good.

I also updated the sample application. The original used sprites, and I discovered that after about 7 sprites, things got slow. The new example uses 3D plains textured with the ship images. Added the same amount of enemies on the screen and no slowdown so far... Haven't tested very much, however. Too busy with the script lanaguge .

Again, the link is at http://www.mighty-atom.com/d-zone/transform-i/
mm0zct
20
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 13th Apr 2004 03:30
this looks very interesting, i'll test it but it's late now so i can't start 'till tomorrow

http://www.larinar.tk
AMD athlon thoroughbred 2200, 512Mb ram, 40Gb HD, ati saphire radeon 9600 atlantis w/128mb ddr ram, good creative-labs soundcard, cd-rw + dvd drives.
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 13th Apr 2004 04:35
Update:

Added more DarkBASIC commands. Running into memory assertion crashes when called the DBPro:eleteObject command using IanM's interface library. This occurs after many subsequent calls.

@IanM... Any ideas. If necessary, I can show the code. I'll be checking back at this thread tomorrow. (7:30 PM here right now..., USA Central Standard Time)
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 30th Apr 2004 22:57
Hasen't been an update in a while due to the fact that I've gone and made a major overhaul to the script engine. The engine now "compiles" the script to a byte-code for faster processing. Working quite well so far...

I also added support for STRING variable types which will allow me to include the DarkBASIC commands that return string values. I've also made the syntax of the script files more strict for better type checking. Right now, the compiler does very little error/type checking, but I'll add that soon.

I haven't got a new download up just yet, but I'll post an update when I do.

An example of a script using Transform-i:



More updates soon.
M00NSHiNE
20
Years of Service
User Offline
Joined: 4th Aug 2003
Location: England, UK
Posted: 1st May 2004 04:23
This is the sort of thing I wanted to make, but C++ is way beyond me. Does anyone know if this sort of thing could be done in PureBASIC?

MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 1st May 2004 04:28
Yup it's possible. I started making a language(It's still in development, but not priority) in PB.
------------------------

Looks really nice TheOneRing. I think you've encouraged me to take a look at IanM's interface also.



A book? I hate book. Book is stupid.
(Formerly known as Yellow)
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 1st May 2004 06:50
I'm glad to inspire . I'm sure it is probably possible to do an intrepreter in PureBasic. I've never used it, but I'll bet I could port mine over as long as PB has pointer support...

However, IanM's interface only works with VC++ 6/.NET and Dev C++ at the moment, I believe. He appears to have plans for a Delphi port and possibly others. Could be pretty cool!

Login to post a reply

Server time is: 2024-05-09 04:39:11
Your offset time is: 2024-05-09 04:39:11