PureBasic and Scripting engines

Advanced game related topics
juankprada
User
User
Posts: 62
Joined: Tue Mar 18, 2014 4:25 pm
Location: Bogotá, Colombia

PureBasic and Scripting engines

Post by juankprada »

Hi all, I am new here as well as new with PureBasic, my name is Juan Prada. So far what I have seen from PB has convinced me to use it for my project (which is a game) I am planning on moving from BlitzMax to PureBasic and so far it seems that everything I need can be found within PB. Except for one thing. Lua support.

I really need scripting in my engine, and BlitzMax had a fairly good implementation of a lua scripting engine. My intention here is not just compare but I would like to know if there is already a user lib for lua scripting that works in all three platforms that are supported by PB (win, linux, mac)

If there is not, how easy would it be to create my own engine in C and use it from PB? As I said I am really new with PB. Also other scripting engines would be good (I just mentioned Lua for it is the one I know but I am open to other alternatives as long as they work on all platforms)

Thank you
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: PureBasic and Scripting engines

Post by ts-soft »

Welcome :D

A bit old, but is a starter: http://www.realsource.de/downloads/doc_ ... pb-include
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
juankprada
User
User
Posts: 62
Joined: Tue Mar 18, 2014 4:25 pm
Location: Bogotá, Colombia

Re: PureBasic and Scripting engines

Post by juankprada »

hi ts-soft, thanks for your quick answer. Please correct me if I am wrong, but I read here on the forums that the user lib you pointed me to is actually Windows only. I am looking for a multiplatform solution.

thanks
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: PureBasic and Scripting engines

Post by ts-soft »

You have to look for the static libs from lua.org by yourself. Only some small changes required to work crossplattform.
(I think you have only to change the path and name of lib in Import statement).
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: PureBasic and Scripting engines

Post by Kuron »

Welcome, Juan!!

SROD has a BASIC-like scripting solution that may or may not meet your needs. There is also an old product floating around called DracScript, but it would need a little bit of work to get it working with the current version of PB. But, it was good back in the day.

Like, you, I am looking for a scripting solution for a gaming related project. I am not sure what I am going to use. I might just roll my own. Dunno at this point, but I have moved to Linux only.
Best wishes to the PB community. Thank you for the memories. ♥️
juankprada
User
User
Posts: 62
Joined: Tue Mar 18, 2014 4:25 pm
Location: Bogotá, Colombia

Re: PureBasic and Scripting engines

Post by juankprada »

Hi Kuron, thanks for the info, If you ever decide on what scripting language to use, let me know. If you are planning on rolling your own (and if it is not too specific for your needs) we can work on it together if you are ok with that.

On the mean time I am trying to install the lua userlib ts-soft pointed me to, but, I am having a hard time trying to make it work. Also, I couldn't find any docs about how to install user libs, so I dont know if I am doing it right or wrong.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: PureBasic and Scripting engines

Post by ts-soft »

This is not a userlib. Is a static lib with IncludeFile. The includefile imports the static lib from Lua (can you found on the internet),
and have some wrapperfunctions in it. The include depends on version 5.1.2 from Lua, for newer Versions some changes required.

The includefile should help you, with small changes, to import any version of lua.lib (Win/Lin/Mac).

But at first, you should learn purebasic, this make something easier :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
juankprada
User
User
Posts: 62
Joined: Tue Mar 18, 2014 4:25 pm
Location: Bogotá, Colombia

Re: PureBasic and Scripting engines

Post by juankprada »

ts-soft, of course First I will learn everything needed to start working with PB. The thing is I am evaluating the environment (core libs, user libs, community, etc) before investing time and money in working with PB.

So far it looks like a great tool for game development (I really dont know why it is not more popular compared to BlitzMax for example). And using the Runtime module could be a good option for a lack of lua interaction. At least for my needs.

Thank you guys for your help
Post Reply