Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Here's the challenge (1st post edited)
#1
Script Engine Challenge. (edited this to be easier to understand)
Porpuse: To code script engine in qbasic that can run several scripts at the same time (aka "multitask")

Ground Rules:
  • * Must be coded in QBasic/VBforDOS (any version)
    * No External Libraries are allowed (Such as FFix, FL, UGL, and etc)
    * Can use Call Absolute as much as you desire (but too much isn't good either)
    * Must be able to hanle at least three scripts
    * Scripts must be hanled AS Scripts
    * Expression handling would be good, but not necassery (just estra points)
    * Must have at least these commands: Print, For...Next, If...Then, Color, Sleep, Locate
    * DeadLine is 12th August 2004
    For Extra points:
    * Nested For ... Next, Do ... Loop(Loop Until), Graphics, and what ever you desire and let your imagination fly...
Well that's mostly civers it...

Points:

Points total 100 + Bunus
Speed - 0 ... 20
Stability -0 ... 25
Easy to use -0 ... 15
Size -0 ... 5
Power (how many scrpits, variables, For - Next, If -Then cycles and such is able to handle) -0 ... 30
Cleannes of the code -0 ... 5

Bonus:
Depending on a feature. For eatch 0 ... 5 (on extra cases 0 ... 20)
IVA LA QBASIC
Reply
#2
Quote:To make a script engine what would be capable of running several scripts at the same time.
*Cough*
Multitasking in QB? Errr...no. And that is really the only definition of "at the same time" in programming terms.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#3
must it be able to do nested if's/for's? if so how many?
or is stuff like that just for bonus points?

Edit: When must it be finished?
/post]
Reply
#4
It can be done.

It's not harder than running a single task. I just don't have the time Sad

But I can share my ideas with those who have it Smile
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#5
You know... Gimi (gui made with QB) is basically a program that runs multiple scripts. So could I enter that (even though I didn't make it) and win? Big Grin

On a more serious note this sounds like a fun challenge. A few questions do pop up though.

1) Do I have to process the scripts as strings or can I convert them to bytecode and process that each cycle?

2) Does it have to support graphics?

3) Does it need to have expression handling? This is probably going to be yes.
Reply
#6
http://www.Novix.tk

Novix Script v5.x:
Supports up to 255 scripts running "at the same time" (alhough it's painfully slow with that many, poor QB)

It has bytecoded scripts and custom variables, no need to predefine.

With v2.5.0.4 it will also have:
Memory allocation up to: TotalMemory+FreeDiskSpace of memory for your program.
VESA SVGA Graphics

Hopefully, by v2.5.0.5 it will have:
A nice looking GUI, programmed in NS5x (The script language)

And if everything works out fine, in later versions (lot later) it might even have network and some internet support (Still looking into it, having problems with routers, and firewalls, meeeh)



Example of a NS5x program:
Code:
%set myvar, 100       //set integer myvar to 100
&set othervar, 5000   //set long integer othervar to 5000
#add myvar, othervar  //add the value of integer myvar,
                      //to the value of long integer othervar, result in
                      //DOUBLE othervar

shw othervar          //Show the value of the DOUBLE othervar on
                      //screen


This is not an entry, just showing it can be done.
Reply
#7
Just don't try what I am, unless you want to have a well interestig time. Making a scripts which runs most commands through calls abs, but few are filtered to make it work correctly.
atos-Software
http://www.datacentertalk.com - interested in how web hosting works? Here the place to go to find out.
[Image: 42-r]
Reply
#8
Hya,

Yeah "multitasking" is what I meant. And no FroBozz you can't put other people's work.

I think It certanly MUST have commands what I said before, but every other command and possabilitie would be for extra points.

1) It can Support graphics -yes, but doesn't have to (extra points)

2) It have to process scripts AS scripts

3) Yes, Expression handling is a MUST

4) It should be able to handle at least one FOR...NEXT cycle inside another, (more would be for more points)

5) Finishing date -late say one month from today 12th July 2004. It would be enought time.

Also who would like to be a referee (I'd like to be, but I want to compete also)

Who would like to take a part in it just send a private message to me, or write here in the forum.

Points total 100 + Bunus:
Speed - 0 ... 20
Stability -0 ... 25
Easy to use -0 ... 15
Size -0 ... 5
Power (how many scrpits, variables, For - Next, If -Then cycles and such is able to handle) -0 ... 30
Cleannes of the code -0 ... 5

Bonus:
Depending on a feature. For eatch 0 ... 5 (on extra cases 0 ... 20)


Well anyone who have better ideas for rules and such please write here. Okay... Let it begin
IVA LA QBASIC
Reply
#9
Progress reposrt of my script lang.

Code:
Rem QBGuru's Script engine demo. Made for Script lang challange.
Rem It should be like qb in most cases. Except variables
Rem must be defined in the beginning.
Rem actual program starts after Begin command

Dim i% As Integer
Dim Text$ As String
Begin
   Let Text$ = "to QBGuru script Engine demo!"
   For i% = 1 To 15
      Locate i%, 1
      Print "Hello " + Text$
   Next
End

Rem Well nothing diffifult I think
Rem -Like QBasic. Almost...
about:
You can define as meny variables of String or Integer type as you desire. Only limit is memory. With Let statament you can either assign values like in the deme, or calculate different values like:

Code:
Dim Value% as Integer
Dim StringValue$ as String
Begin
   Let StringValue$ = "17"
   Let Value% = 12 + 43 - 45 + Val(StringValue$)
   Print Value% + StringValue$ + " <- I'm not kidding"
End

I'm not kidding, it's true. I'll post demo soon (as soon as Print statament is finished) :wink:
IVA LA QBASIC
Reply
#10
Well, now that you have that interpreter working you can get the multi tasking so easily, just ... well, I better don't ruin the compo Big Grin

To me, the most difficult task in this compo is having the parser/interpreter working. The multitasking part is somewhat straight-forward.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)