View Full Version : script in pascal ?
arthurprs
14-08-2007, 07:51 PM
I need some recomendations of scripting insine my app,
what engine i could use, what is best ?
Robert Kosek
14-08-2007, 09:18 PM
Delphi Web Script deserves a mention, but I'd also suggest a look at PaxScript (http://www.paxscript.com/). The latter is not free, but is compilable and supports 4 different languages with full intercompatibility.
NecroDOME
14-08-2007, 09:20 PM
You can also use PascalScript, its a bit slow, but I used it in my engine.
Edit: http://www.remobjects.com/page.asp?id={9A30A672-62C8-4131-BA89-EEBBE7E302E6}
Edit:
Url tags not working???
Robert Kosek
14-08-2007, 09:42 PM
I am not sure, Necro, I think it might have to do with strange symbols. Try using Tinyurl to change it to something less conspicuous and it might get through. Or URLEncode it; I had to do so with an exclamation point recently.
arthurprs
14-08-2007, 10:45 PM
Delphi Web Script deserves a mention, but I'd also suggest a look at PaxScript (http://www.paxscript.com/). The latter is not free, but is compilable and supports 4 different languages with full intercompatibility.
vry good but not free :(
arthurprs
14-08-2007, 10:46 PM
You can also use PascalScript, its a bit slow, but I used it in my engine.
Edit: http://www.remobjects.com/page.asp?id={9A30A672-62C8-4131-BA89-EEBBE7E302E6}
Edit:
Url tags not working???
I will have a look, also wainting more ones to test
You know... you could try to make your own. Maybe not the best or most efficient means to create such capability within your game, but it does have some advantages.
The primary advantage is that you will learn quite a bit from it. It would sort of be like learning how to make an interpreter or a compiler. If you are even remotely considering this I'd read up on 'Let's Build a Compiler' by Jack Crenshaw. VERY good tutorial series. And easy to follow!
Then again if you are pressed for time or aren't THAT interested a pre-made one would be the better way to go. Just offering alternatives. ;)
arthurprs
14-08-2007, 11:17 PM
You know... you could try to make your own. Maybe not the best or most efficient means to create such capability within your game, but it does have some advantages.
The primary advantage is that you will learn quite a bit from it. It would sort of be like learning how to make an interpreter or a compiler. If you are even remotely considering this I'd read up on 'Let's Build a Compiler' by Jack Crenshaw. VERY good tutorial series. And easy to follow!
Then again if you are pressed for time or aren't THAT interested a pre-made one would be the better way to go. Just offering alternatives. ;)
Good, but not now :?
Interested in finishing this project and learning 3d :)
paul_nicholls
14-08-2007, 11:59 PM
I need some recomendations of scripting insine my app,
what engine i could use, what is best ?
Personally I now use Lua (http://www.lua.org/) for my scripting :)
PS. for making your own compiler/interpreter, I also vote for 'Let's Build a Compiler' by Jack Crenshaw (http://compilers.iecc.com/crenshaw/) :)
This is excellent, and it enabled me to make my own simple interpreted pascal-like language a while ago :-)
cheers,
Paul.
JSoftware
15-08-2007, 07:43 AM
I can only recommend pascalscript. it's implementation is generally nice. Especially the unit import generator.
And it's pascal! :D
jdarling
15-08-2007, 12:34 PM
I'm with Paul here, Lua is one of the best scripting engines and its well known in the game community. Thus its more likely that you can pickup modders and scripters for it. Pascal Script for Delphi (from RemObjects) is also quite good. DWSII is just too dated to be used anymore.
Up sides of Lua:
Cross platform
Well known
Excellent documentation and support
Its the only script engine in the TIOBE top 20 languages
Down sides:
Right now you have to use a DLL version, though I'm porting to FPC :)
Anyways, I have a small "Game Engine" sample on my website that uses Lua in a Lazarus project along with SDL. I have the updated Lua headers in the project to support Lua 5.1 (latest "stable" release). I'm also working on a new version called pLua that will have better support and many bug fixes for using Lua in Pascal (more on this soon). Of course, the end goal of pLua is to completely port Lua to pascal :).
Anyways, enough rambling, download: http://eonclash.com/ViewProduct.php?ProductID=23
Robert Kosek
15-08-2007, 02:10 PM
JDarling forgot to mention the downside that Lua has a steep learning curve when working with it in your project. Not in coding in Lua, but binding things to Lua. I never could get it to work decently, which is why I prefer to avoid it altogether.
jdarling
15-08-2007, 05:42 PM
JDarling forgot to mention the downside that Lua has a steep learning curve when working with it in your project. Not in coding in Lua, but binding things to Lua. I never could get it to work decently, which is why I prefer to avoid it altogether.
Soon thats not going to be as big of a deal. I've managed to fix a lot of things with the new version. Granted I had to break it so that most of the older stuff isn't a straight conversion :(. I also discovered (while writing the articles for Lua Gems) that I was doing some things WRONG (imagine that)!
Only time, and the final release of v1, will tell though. And I have to admit that Lua isn't the easiest thing to wrap up in Delphi. Still, I'm of the opinion that if your looking for a game where players will Mod it an existing established scripting language is the way to go :).
Robert Kosek
15-08-2007, 06:02 PM
That will be nice. Mostly the problem was in both mangling the stack and in assigning function bindings. Unlike "procedure of object" for a type declaration that is passable, the functions didn't want an address. So, I got lost and it was "what learning curve?" as I walked smack into a wall. ;)
Lua is one of the most efficient and powerful of the scripting languages, but a lot of people want native pascal scripting. I can't say I blame them either. Familiarity to the programmer in charge is a very important thing.
Thanks for the link, Paul, as I have never seen that article before. I actually started cooking up my own expression engine (it was kind of like an s-expression parser minus the parentheses) awhile back. That will really help me in my understanding of scripting, etc.
paul_nicholls
15-08-2007, 10:30 PM
[quote="Robert Kosek"]Thanks for the ]
Glad I could help :)
cheers,
Paul
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.