Scripting Engine - test proggie

This is a discussion on Scripting Engine - test proggie within the Game Programming forums, part of the General Programming Boards category; I've been working on this scripting engine for an upcoming game. It's syntax is heavily based on lisp/scheme. I'll post ...

  1. #1
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Scripting Engine - test proggie

    I've been working on this scripting engine for an upcoming game. It's syntax is heavily based on lisp/scheme. I'll post it here in hope for thoughts/suggestions/bug reports/etc... (and to show it off of course :P)

    http://magos.thejefffiles.com/ScriptSyntaxTester.zip

    (No source code available at this point)

    Sample 1:
    Code:
    (function fac (n)
     (if (<= n 1)
       1
       (* n (fac (- n 1)))))
    
    (fac 5)
    Sample 2:
    Code:
    (function Create ()
     (locals ((Counter 0))
       (lambda () (set Counter (+ Counter 1)))))
    
    (globals (Object (Create)))
    
    (Object)
    (Object)
    (Object)
    (Object)
    (Object)
    Sample 3:
    Code:
    (globals
     (Var1 123)
     (Var2 456)
     (Var3 789))
    
    (function GetRandomVar ()
     (eval (reference (+ "Var" (RandomInt 1 3)))))
    
    (GetRandomVar)
    EDIT: If you downloaded this within the first 5 minutes it was uploaded, please download again, especially if you experience horrible crashes sometimes ^^.
    Last edited by Magos; 07-23-2005 at 04:41 PM.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Did you write the parser from scratch or use an existing Lisp type framework. I assume its a windows executable so I didn't download it but it looks pretty cool from the examples!

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    From scratch
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Well, i tried to run your app with wine because i was curious but...

    "fixme:d3d:IWineD3DImpl_GetDeviceCaps Caps support for directx9 is nonexistent at the moment!"

    doh!

  5. #5

    Join Date
    May 2005
    Posts
    1,041
    Looks good.
    I'm not immature, I'm refined in the opposite direction.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help needed to verify a new on-line C test
    By JanHruska in forum Projects and Job Recruitment
    Replies: 15
    Last Post: 06-20-2009, 07:48 AM
  2. Creating C/C++ Unit Test Cases
    By chiefmonkey in forum C++ Programming
    Replies: 1
    Last Post: 04-28-2009, 09:29 PM
  3. Scripting
    By loopshot in forum Game Programming
    Replies: 2
    Last Post: 03-24-2006, 06:29 PM
  4. test scores
    By ucme_me in forum C Programming
    Replies: 4
    Last Post: 11-14-2001, 01:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21