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 / DarkScript (plugin) for DarkBASIC Pro

Author
Message
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 30th Dec 2005 13:41
Quote: "Why the hell does everyone keep using C-Style Structured Languages?!"

because it pwns

New site!
Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 2nd Jan 2006 09:48
Yeah, the C-Style isn't so bad. Depends on personal preference.

Over the new year weekend I was working on the help files, and also working on real os mulithreading and dbpro. After 3-4 hours of nothing but work I have came up with a safe solution for multithreading dbpro.

With the ability to multithread in dbpro you can seperate various functions of the game for example: input, sound, calculations, object movement and rendering. Each portion of code could have it's own thread boosting your games overall speed performance.

I'll post more information about this new plugin feature later, at the current time I have my hands full getting ready for the EA release of DarkScript.

Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 10th Jan 2006 09:31
Update:

Currently I am working on finishing up the scripting reference manual. This help file is a lot more technical and lengthy compared to the introduction to the language help file. The EA release should have more than enough example sources to help you understand how each command and keyword in the language works.

If any users have extra needs, or ideas for the first release, let me know within the next couple days before I do the final compile. Also if you have found any bugs submit them in this thread.

wh1sp3r
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Czech republic
Posted: 11th Jan 2006 21:27
Hey Torrey :o)
Is in your DS some commands for keys ? .. escapekey(), returnkey() atd ?

btw: very nice, i like your darkscript.

PS: Real programmers aren't afraid of math!.

☺☺ AthlonXP 2500+, Ati Radeon 9600 128MB, dualDDR 512MB 400Mhz CL3.0, SB LIVE!, monitor 19" ☺☺
Mikey P
19
Years of Service
User Offline
Joined: 23rd May 2005
Location: Manchester, UK
Posted: 12th Jan 2006 20:08 Edited at: 12th Jan 2006 20:08
Okay dokay... I started recoding my engine for my game, because now that DarkScript can use DBP Functions, alot of things change. Hit my first problem, I do 'Load Script "Ship.enemy"'. When I have this in the file:



It works perfectly... but if I use a global:



DBP freezes, and eventually crashes, producing CrashOn_x_x_x.txt:



What's odd, is if I make the global variable test in another file, then do "global test = 5" in Ship.enemy, it works fine...

Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 12th Jan 2006 21:43
Quote: "Hey Torrey :o)
Is in your DS some commands for keys ? .. escapekey(), returnkey() atd ?

btw: very nice, i like your darkscript."


The one for the return key is Key.RETURN I'm surprised I didn't throw the escape key in there, but if you use the virtual key code for that key you'll achieve the same thing. For the escape key you'd use IsPressed(27);.

Mikey P,

I tested out what you said and could not recreate what happened. The error report you get returns a line number so that would mean that the problem happened within the dbpro code. If there happens to be an error within DarkScript the plugin will report back with a detailed message, and if dbpro happens to spit out a error report it would show the error happened on line 0.

Can you post the code that this happened with? If not I can catch you on IRC and help you out more.

wh1sp3r
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Czech republic
Posted: 12th Jan 2006 23:38
Are in DS waypoints ?

PS: Real programmers aren't afraid of math!.

☺☺ AthlonXP 2500+, Ati Radeon 9600 128MB, dualDDR 512MB 400Mhz CL3.0, SB LIVE!, monitor 19" ☺☺
FXTC
20
Years of Service
User Offline
Joined: 3rd Jul 2004
Location: CzechRepublic
Posted: 12th Jan 2006 23:41
I interesing same for waypoints

AMD 2,4 512MB RAM,2x200GB hdd,GforceFX5700GT128MB
Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 13th Jan 2006 07:30 Edited at: 13th Jan 2006 08:37
A lot of people are dazzled about waypoints. Waypoints are nothing more than a reference point in a path or route.

Attached is an example I just coded tonight to show how waypoints are created. If you wanted to do something where an object follows the waypoints you simply create a loop that will point the object at the next waypoint and tell it to move foward.

Hope that helps you out!

---

DarkScript Source:


DBPro Source:


Attachments

Login to view attachments
Mikey P
19
Years of Service
User Offline
Joined: 23rd May 2005
Location: Manchester, UK
Posted: 13th Jan 2006 17:42
Quote: "
I tested out what you said and could not recreate what happened. The error report you get returns a line number so that would mean that the problem happened within the dbpro code. If there happens to be an error within DarkScript the plugin will report back with a detailed message, and if dbpro happens to spit out a error report it would show the error happened on line 0.
"


The line number in the error file is the DBP line I mentioned (sorry, I wasn't clear), 'Load Script "Ship.enemy"', and I get no DarkScript error when it crashes, which is what's odd . If I comment out the line, the program will execute past the troublesome area (it errors later, but that's not a problem). It's just odd that it quits... The exe stays open for like a minute after crashing, before finally disappearing...When it freezes my taskbar (I use LiteStep as my shell) also freezes, don't know whether this is important to say.

Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 15th Jan 2006 12:19 Edited at: 15th Jan 2006 14:01
Mikey P,

I successfully loaded all your scripts when testing them out. After taking a look at your code I noticed you called a enemy initialization from one script before loading another script. DarkScript was designed to stay in a single thread and also a single virtual machine. Calling the initalization before the finishing of loading more scripts will misalign data and memory, this is why it's important to load scripts before making changes to the virtual machine.

As a kind of preventive fix in the next update I will use a much lower level OS protection to prevent memory mishaps.

Mold Rat,

I'm not allowed to include every dbpro command because of legal reasons. There is the ability to use dbpro user functions as script commands. The command usage is as follows:

SCRIPT LOAD DBP FUNCTION function number, script command

If you check several posts above this one you'll find more information about this feature.

Mikey P
19
Years of Service
User Offline
Joined: 23rd May 2005
Location: Manchester, UK
Posted: 15th Jan 2006 23:10 Edited at: 15th Jan 2006 23:13
Torrey,

Rightio, I'll just try and change the way I do things... Shouldn't be that hard =)

Edit: Wow, seems to have worked with minimum changes to the way I do things... Thanks alot!

Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 16th Jan 2006 06:30 Edited at: 16th Jan 2006 11:37
Another new plugin will be available with the commerical release of DarkScript thanks to Oli Wilkinson. This plugin binds new script commands that allow use of SDL (simple directmedia layer).

If I get the chance tonight I'll try to whip together a quick example to show off this plugin.

Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 16th Jan 2006 10:08 Edited at: 16th Jan 2006 12:33
Here's the simple example showing off the SDL plugin for DarkScript. I created a hidden dbpro window and created a SDL window. Use the arrowkeys to move the pyramid around, press escape to exit.

Attachments

Login to view attachments
Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 20th Jan 2006 05:26
Update for commerical release:

The release of the EA version will be in less than 30 days. I'm currently having to hold off since there's a contract with GDNet tied to part of this plugin.

Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 23rd Jan 2006 14:50
Update for Jan. 23rd:

Played around with the CodeBlocks IDE some more and really liked it. It's very customizable, and I've got it working with GM scripts (it also included syntax hightlighting for GM!).

Click the thumbnail to view full size image.

This first screen shot shows the syntax highlighting and what the script looks like in CodeBlocks.


Above is a screen shot of the "new project" dialog with a GameMonkey template that I've added.

Let me know what you think, either stick with the very handy Notepad, or should I include this as an IDE for creating and editing scripts?

Mikey P
19
Years of Service
User Offline
Joined: 23rd May 2005
Location: Manchester, UK
Posted: 23rd Jan 2006 16:41
Wow, looking good =) I don't know how codeblocks handles it all, but if you could get it to debug scripts in the IDE, that would be awesome :o

Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 23rd Jan 2006 17:01
Quote: "Wow, looking good =) I don't know how codeblocks handles it all, but if you could get it to debug scripts in the IDE, that would be awesome :o"


I just started working with this IDE, so not much development has been made. Debugging scripts within that IDE is possible. To do so I'd need to create an application that uses my bindings, and also patch up dbpro calls so that the entire script can be debugged without the need for dbpro.

After EA is released, I'll start working on your idea. Thanks!

FXTC
20
Years of Service
User Offline
Joined: 3rd Jul 2004
Location: CzechRepublic
Posted: 23rd Jan 2006 20:28
wow good news IDE with Debugging
is possible use DBP and DS together?

AMD 2,4 512MB RAM,2x200GB hdd,GforceFX5700GT128MB
Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 24th Jan 2006 08:52
Quote: "wow good news IDE with Debugging
is possible use DBP and DS together?"


I'm kind of confused about your question. Do you mean can you use dbpro and darkscript in the same debugger? If so, I think that would depend on how I wrote the debugger, but unfortunetly I think it sounds difficult and very high to shoot for at this stage of development. I'll keep the idea in mind for future considerations.

Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 26th Jan 2006 09:22
I was feeling bored the last two days, and because of this another plugin was created. This time I put together a plugin for text to speech. This plugin can be found with the EA release due out soon. Here's an example of how to use it:

Source:


I'm adding in more commands than just speak so users can define the TTS properties they want. The rest of the command set will be included in an example that comes with this plugin.

Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 29th Jan 2006 15:07 Edited at: 5th Feb 2006 22:49
Currently I am at the phase where I'm trying to put the pieces together for the EA distro, and I tossed together a simple but nice protection.

If a buyer of the commerical version compiles code using DarkScript commands in their dbpro code it will compile normally. The file produced will even execute properly on another persons system.

However, if a person had the idea to rip out the plugin and attempt to use it on their system, during the compile process a dialog pops up (check the attachment), and after the dialog is closed the compiling process is killed.

The use of this protection isn't the best I could have used, but it serves its purpose well.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-17 05:15:59
Your offset time is: 2024-11-17 05:15:59