Suggested Scripting Language

Member
Posts: 215
Joined: 2008.06
Post: #1
I'm looking to expand my game engine to scripted objects and have been considering using Lua. Does anyone have a better language to use and if so, why and where?

On a related note, been having some trouble getting LuaCore to work. Keeps giving me a SIGTRAP error for "Reason: image not found". Unsure what this could be referring to, please let me know if you have gotten LuaCore to work on your setup, thanks.

Mac users swear by their computers, PC users swear at their computers. ~Unknown

iSayz
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #2
If you use Objective C, there's also MacRuby or Python, which are both bridged and relatively easy to use.
Quote this message in a reply
Member
Posts: 715
Joined: 2003.04
Post: #3
Did you try to get help from the LuaCore person?
I like Lua. I just made a Dungeon Master
level reader/to-be-editor/3D map maze maker using about 98% pure Lua.
With a touch of FLTK and iGame3D.
Yay Lua!
[Image: dm4b.png]
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #4
If you're using C++, boost::python is fantastic.
Quote this message in a reply
Member
Posts: 215
Joined: 2008.06
Post: #5
Talyn Wrote:I'm looking to expand my game engine to scripted objects and have been considering using Lua. Does anyone have a better language to use and if so, why and where?

On a related note, been having some trouble getting LuaCore to work. Keeps giving me a SIGTRAP error for "Reason: image not found". Unsure what this could be referring to, please let me know if you have gotten LuaCore to work on your setup, thanks.

More info on my LuaCore issues. Apparently it's not liking trying to import the framework. It gives me the following error in full:

dyld: Library not loaded: @loader_path/../Frameworks/LuaCore.framework/Versions/A/LuaCore
Referenced from: <Project Path>
Reason: image not found

The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).

Not sure where to go from here. It let me do a code completion for #import <LuaCore/LuaCore.h>, so I don't know what could be happening. Any insight would be great.

And yeah, I'm probably going to send the creator a message asking what's happening and how to fix it. Thanks guys.

Mac users swear by their computers, PC users swear at their computers. ~Unknown

iSayz
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #6
LuaCore.framework you have is built for the wrong arch?
Quote this message in a reply
Member
Posts: 215
Joined: 2008.06
Post: #7
DoG Wrote:LuaCore.framework you have is built for the wrong arch?

That's entirely possible. Hadn't considered that... I am running on Intel, so that may be issue.

Mac users swear by their computers, PC users swear at their computers. ~Unknown

iSayz
Quote this message in a reply
Member
Posts: 567
Joined: 2004.07
Post: #8
Lua is definitely the way to go for scripting unless you have another language in mind; it's small, fast, written to be embedded, etc.

It's not magic, it's Ruby.
Quote this message in a reply
Member
Posts: 215
Joined: 2008.06
Post: #9
Boy, I feel a little silly. I figured out my issue with LuaCore: I was adding the framework from a folder on my Desktop. Apparently, Xcode will only look in designated framework folders unless you tell it otherwise. So, I just had to move the framework to one of these folders and it works like a charm.

Mac users swear by their computers, PC users swear at their computers. ~Unknown

iSayz
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #10
Be careful not to set up your program so that it can only run on computers with the framework installed in a standard location. This is very easy to do if you have external dependencies that aren't completely encapsulated in your application bundle. Try your app on another computer and see if it still runs.
Quote this message in a reply
Member
Posts: 215
Joined: 2008.06
Post: #11
ThemsAllTook Wrote:Be careful not to set up your program so that it can only run on computers with the framework installed in a standard location. This is very easy to do if you have external dependencies that aren't completely encapsulated in your application bundle. Try your app on another computer and see if it still runs.

Thanks for the heads up TAT, but I'm just running some prelim experiments and getting familiar with the Lua language. I will definitely have to remember your advice when moving forward, though.

Say, does anyone use LuaCore here? I can't figure out how to read data from a Lua script. Can anyone help me out? Thanks.

[EDIT] Nevermind, found the info I was after.

Mac users swear by their computers, PC users swear at their computers. ~Unknown

iSayz
Quote this message in a reply
Founder
Posts: 1,138
Joined: 2002.04
Post: #12
igame3d Wrote:Dungeon Master
Might be top 10 game of all time.

Carlos A. Camacho,
Founder
iDevGames
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Scripting Language Woes (Lua) Bachus 2 3,663 Oct 14, 2008 09:48 AM
Last Post: Blacktiger
  Looking for a compilable scripting language BinarySpike 8 5,219 Apr 24, 2007 09:59 AM
Last Post: BinarySpike
  Scripting Language: Rolling Your Own Emehr 14 5,471 Feb 10, 2007 08:14 AM
Last Post: IBethune
  Scripting language recommendation? WhatMeWorry 6 3,363 Nov 11, 2006 10:09 AM
Last Post: Duane
  Embedding Scripting Languages Tutorials Nick 18 7,532 Apr 13, 2006 09:53 PM
Last Post: kelvin