Results 1 to 10 of 10

Thread: Pascal Script Interpreter

  1. #1

    Pascal Script Interpreter

    Small script interpreter (*Keep it simple stupid*) for freepascal/delphi/kylix
    its already functional but needs a lot of rework in order to become more professional.

    any interested should contact me.

    https://opensvn.csie.org/PascalScript/

  2. #2

    Pascal Script Interpreter

    What I would really like in a Pascal script is an ability to use classes, perhaps even some export/import support. Another desirable thing would the performance.

    The link you gave shows some folders, can you provide some zipped package? Perhaps a supported feature list too.

    Anyway, I wish you luck with this project! Also, you may want to check "Pascal Script by RemObjects", which is similar project (even same name )

  3. #3

    Pascal Script Interpreter

    I'll try and get a news post about your project in the next day or so.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  4. #4

    Pascal Script Interpreter

    i really like the style! i think this shows a great potential!
    i'm a delphi person however and my naive tries to convert it to use in delphi didn't succeed
    in your test example it fails on write('stack overflow');

    i'll surely keep an eye on this!
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  5. #5

    Pascal Script Interpreter

    It looks quite well done from just having read the readme.

    Lifepower: That's the Subversion source control repository that link points to. That is the default view given if you browse the repository with a web browser.

  6. #6
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Pascal Script Interpreter

    I have used some sort of Pascal based scripting in a number of games (and indead other work based projects). To me the use of Classes is not key to making a scripting language. The key things required are

    :arrow: Control Structures (For, While, If)
    :arrow: Procedures and Functions
    :arrow: Integration from Script into application
    :arrow: Script Persistance

    Using this you can write complete scripted AI into games.

    Using Script Persistence you can make 'objects' that have their own variables and methods inside the script. (ie if you have 10 ants each has its own instance of the Ant script).

    I will give this new scripting a try when I have time.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  7. #7

    ...

    I don't own a Delphi licence right now

    but i can test it against kylix (i will download the educational license version)

    the idea is to have a limited set of features that we can play with and make a FAST virtual machine, not a bloated one...

    we can add some features on the compiler side if and only if it doesn't betray the idea of having a small and fast VM...

    @cairnswm

    i really need to add data persistance, i did not thought about this before...

  8. #8

    Pascal Script Interpreter

    Quote Originally Posted by cairnswm
    I have used some sort of Pascal based scripting in a number of games (and indead other work based projects). To me the use of Classes is not key to making a scripting language. The key things required are

    :arrow: Control Structures (For, While, If)
    :arrow: Procedures and Functions
    :arrow: Integration from Script into application
    :arrow: Script Persistance

    Using this you can write complete scripted AI into games.

    Using Script Persistence you can make 'objects' that have their own variables and methods inside the script. (ie if you have 10 ants each has its own instance of the Ant script).

    I will give this new scripting a try when I have time.
    i agree with you, the most important to me are for, while loops, procedures and arrays, still a little of multithreading couldn't hurt (infact i don't think my game would as designed work without multithreading in scripting)
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  9. #9
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Pascal Script Interpreter

    Try and compile it in delphi mode in free pascal. This 'should' be good enough to make it Delphi compatible


    The reason for the persistance is that say for example I want to make an enemy AI using a script. I want it to remember what it is doing in the game. During the game loop I will call the script to check the AI (Usually I do this either 10 or 5 times a second). The script should not have to requery the main application about its state but rather just use the script persistent variables.

    Also remember that a game could be running many scripts in memory at the same time (eg one per sprite in the game). So also check that multiple different script files dont conflict with each other.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  10. #10

    Pascal Script Interpreter

    Hm, current script have a data memory area (one for each instance of TMachine) so you have data persistance, but im thinking about data persistance across .create/.free (saving tdatamemory to harddisk)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •