Hello!

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Hello!

Dave Bollinger
   I've just joined the list and wish to say "Hello!" to my fellow Lua
fanatics!  This really looks cool, and I'm excited about it!  :-)

   I went back and read the entire mail archive (whew!) and it's very
encouraging to see how the language and tools have developed and matured
over such a short timeframe.  I've been researching possible candidates for
an embedded scripting language for a short while now, and was becoming
disheartened, until I (almost accidentally) stumbled across Lua.  The
language syntax is clean, the code is small and portable, the interface is
well thought out ... what more could I ask for?

  Some of the "tricks" in the mail archive, like the
table-full-of-functions switch statement, are oh-so clever!  Could I stick
lambda/anonymous functions in there?  (I'll get the correct Lua terminology
sorted out eventually)  And the whole tables+tagmethods concept, I think I
"get" this, seems _very_ powerful.


   I'll respond to some of the questions posed in the archive, in case
they're still "active":

   I can do without a "for" loop, "while" works fine.  I can do without a
native "switch" keyword, if/else plus the table trick ought to handle
anything I'm likely to require.  I appreciate the work put into wrapping
the stdio "printf's" - that was a BIG problem in one of the other scripting
languages I investigated.  I'll need a debugger, but the odds are that I'll
build my own because of the environment I expect to be using Lua in, which
is...

   My intended application is with a children's "Edutainment" title, a
"learning game", Windows environment.  There will be a number of discrete
mini-games with different categories of problems (math/word,
matching/choosing/etc) each of which I intend to script with Lua, with
extensive links into the core of the game "engine".  I intend to have a
separate Lua code module for each mini-game which will define a predefined
set of "event handlers" - basically just functions that will be called (for
example) "OnGameSetup", "OnGameLoop", "OnProblemSetup", "OnProblemLoop",
"OnProblemFinish", "OnGameFinish", etc.  Hopefully there will be no trouble
simply redefining the function names with each load of a new module.  (?) 
Or I'll set the old func defs to nil before redefine, whatever.


   I'd like to send specific greets out to Bret Mogilefsky (and your whole
GF team), I really enjoyed the game!  :-)  Especially Tony Plana's
over-the-top voice acting!  <grin>

   I'd also like to forewarn Michael T. Richter that I might have some
Windows DLL build questions for him.  ;-)

   Cheers,

   Dave

Reply | Threaded
Open this post in threaded view
|

RE: Hello!

Samson
	While the discussion pointer rests on the use of LUA in games, I
think I noticed a lua.dll in Baldeurs Gate(sp?), can anyone confirm this? I
didn't see any mention of tecgraf in the BG manual.

	lyndon

>    I'd like to send specific greets out to Bret Mogilefsky (and your whole
> GF team), I really enjoyed the game!  :-)  Especially Tony Plana's
> over-the-top voice acting!  <grin>
> 
> 

Reply | Threaded
Open this post in threaded view
|

RE: Hello!

Jeroen Janssen
In reply to this post by Dave Bollinger
At 05:41 5/26/99 -0300, you wrote:
>> 	While the discussion pointer rests on the use of LUA in games, I
>> think I noticed a lua.dll in Baldeurs Gate(sp?), can anyone 
>Baldur's Gate
>> confirm this? I
>> didn't see any mention of tecgraf in the BG manual.
>
>In the credits part, at the end of the manual (the part nobody reads :))
>it is mentionned that Lua is used.
>I did not see TecGraf though. But since my manual was translated to
>French, maybe some parts were skipped. Or I did not look enough :)
>
>
>Vincent Penquerc'h

I had a look at http://www.bgchronicles.com/ and I found the "Baldur's Gate
Script Compiler" that contains some documentation and also mentions Lua as
well as TecGraf.

I find it interesting to know that Lua has been used by different game
companies, that shows it can be put to good use in games. Does anybody know
any other game that uses Lua & what versions are used? 

Jeroen Janssen

Reply | Threaded
Open this post in threaded view
|

RE: Hello!

Vincent PENQUERC'H
> 	While the discussion pointer rests on the use of LUA in games, I
> think I noticed a lua.dll in Baldeurs Gate(sp?), can anyone 
Baldur's Gate
> confirm this? I
> didn't see any mention of tecgraf in the BG manual.

In the credits part, at the end of the manual (the part nobody reads :))
it is mentionned that Lua is used.
I did not see TecGraf though. But since my manual was translated to
French, maybe some parts were skipped. Or I did not look enough :)


Vincent Penquerc'h

Reply | Threaded
Open this post in threaded view
|

RE: Hello!

Vincent PENQUERC'H
In reply to this post by Dave Bollinger
> I find it interesting to know that Lua has been used by different game
> companies, that shows it can be put to good use in games. 
> Does anybody know
> any other game that uses Lua & what versions are used? 

Mine ;)
As a hobby, though, so it can't be compared :)
I was quite sad when I BG was released, because it featured many
of what I had planned... Too bad. I guess I'll have to think of
something more...
But this is off topic. I now shut my mouth :)

Others, I heard of Grim Fandango, by LucasArts.


Vincent Penquerc'h

Reply | Threaded
Open this post in threaded view
|

RE: Hello!

Jeroen Janssen
At 06:33 5/26/99 -0300, you wrote:
>> I find it interesting to know that Lua has been used by different game
>> companies, that shows it can be put to good use in games. 
>> Does anybody know
>> any other game that uses Lua & what versions are used? 
>
>Mine ;)

any information available on a website yet?

>As a hobby, though, so it can't be compared :)

ah, but that doesn't matter... I am interested in scripting languages &
(game) coding as a hobby.

>I was quite sad when I BG was released, because it featured many
>of what I had planned... Too bad. I guess I'll have to think of
>something more...
>But this is off topic. I now shut my mouth :)

maybe we can talk somemore (of the list)

>Others, I heard of Grim Fandango, by LucasArts.

yep, I heard about that one too... 

Jeroen Janssen

Reply | Threaded
Open this post in threaded view
|

Re: Hello!

David Jeske-3
On Wed, May 26, 1999 at 07:56:19AM -0300, Jeroen Janssen wrote:
> ah, but that doesn't matter... I am interested in scripting languages &
> (game) coding as a hobby.

I also have a game engine based on Lua. It's a 2d sprite based engine
which runs under Windows directdraw and linux/X. It does not "play"
yet, and my recent switch into "internet startup" life has left me
with much less time to work on it than I had hoped.

There are definetly some things in it I like alot. The windows
executable and lua code for a somewhat older version are available on
my webpage. If anyone is interested, I'd be glad to send them the C++
source for the other half, and I'd be delighted to have someone else
work on it. I've done most of the coding so far, with a close friend
doing the X port.

http://www.chat.net/~jeske/Projects/HZ/

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hello!

Jeroen Janssen
At 10:11 5/26/99 -0300, you wrote:
>On Wed, May 26, 1999 at 07:56:19AM -0300, Jeroen Janssen wrote:
>> ah, but that doesn't matter... I am interested in scripting languages &
>> (game) coding as a hobby.
>
>I also have a game engine based on Lua. It's a 2d sprite based engine
>which runs under Windows directdraw and linux/X. It does not "play"
>yet, and my recent switch into "internet startup" life has left me
>with much less time to work on it than I had hoped.

doesn't that sound familiar :)
are you planning to work on it anyfurther?

>There are definetly some things in it I like alot. The windows
>executable and lua code for a somewhat older version are available on
>my webpage. If anyone is interested, I'd be glad to send them the C++
>source for the other half, and I'd be delighted to have someone else
>work on it. I've done most of the coding so far, with a close friend
>doing the X port.

I had a look at a snapshot a time ago and I liked the gfx console part of
your engine (haven't got the time yet to figure exactly how I could that
myself). I'd be interested in any (example) source code you have available
on using lua in your game engine. (both lua as 'normal' c/c++ code).

>http://www.chat.net/~jeske/Projects/HZ/

what are your main ideas about using Lua in your game engine? AI? what do
you currently have implemented with lua?


Jeroen Janssen

Reply | Threaded
Open this post in threaded view
|

RE: Hello!

Paul Bleisch-3
In reply to this post by Jeroen Janssen
> I had a look at http://www.bgchronicles.com/ and I found the 
> "Baldur's Gate Script Compiler" that contains some documentation 
> and also mentions Lua as well as TecGraf.
> 
> I find it interesting to know that Lua has been used by different game
> companies, that shows it can be put to good use in games. 
> Does anybody know any other game that uses Lua & what versions 
> are used? 

We use Lua 3.1 internally for some tools and will possibly use it in
the future as the base of our animatics system.

For our tools, we use Lua as:

a) Configuration.  Everything from paths to component definitions
   are defined on the lua side.  For instance

   Components = {
       SimpleComponent1 = {
           CLSID = "SimpleComponent1",
           Implementation = "SimpleComponent.dll",
           Defaults = {
             SomeDefault = 1,
             SomeDefault2 = 2
           }
       },

       SimpleComponent2 = {
           CLSID = "SimpleComponent2",
           Implementation = "SimpleComponent2.dll",
       },   

       ComplexComponent = {
           CLSID = "ComplexComponent",
           Aggregates = {
               "SimpleComponent1",
               "SimpleComponent2"
           }
       }
    };

    So from the C++, we can do:

    daCoCreateObject( "ComplexComponent", &complex );


b) UI resource layout.  i.e.

   AlphaPropPage = uiBoxLayout{ 
                      uiDropDownList{
                          Label = "Supported Compare Functions",
                          Data = BuildSupportedAlphaCompareTable
                      }
                   }

    And then from C++ code, we call:

    daCoCreateObject( "DALibs_Dialog", &modaldlg );
    modaldlg->CreateFromResource( "AlphaPropPage" );
    modaldlg->DoModal();

c)  We also have a tool that loads data files and visits every 
    node in some internal data structures, calling Lua code at
    every node.  It is a simple tool, but useful for collecting
    information about different models (like average triangles per
    material, etc...)


Currently, nothing we are using for Lua will ship with any of our
games, but will be used in the production of the games.

Paul



                       

Reply | Threaded
Open this post in threaded view
|

Re: Hello!

David Jeske-3
In reply to this post by Jeroen Janssen
On Wed, May 26, 1999 at 11:11:34AM -0300, Jeroen Janssen wrote:
> >I also have a game engine based on Lua. It's a 2d sprite based engine
> >which runs under Windows directdraw and linux/X. It does not "play"
> >yet, and my recent switch into "internet startup" life has left me
> >with much less time to work on it than I had hoped.
> 
> doesn't that sound familiar :)
> are you planning to work on it anyfurther?

I guess I was a bit misleading. You can fly around and shoot at stuff,
and if you hit it enough, it will die, and there will be a little
explosion. However, that's the sum total of the game logic, and all
the collisions are based on very poor bounding boxes right now. (I
keep stalling on that pixel perfect collision detecter). :)

I certainly plan to work on it further. There are several ideas I have
brewing in my head. We'll see when I can find the time.

> I had a look at a snapshot a time ago and I liked the gfx console part of
> your engine (haven't got the time yet to figure exactly how I could that
> myself). 

Actually, the overlay is the biggest hack in there. The artist (Barry
Gillhespy) came up with that console, and I just slapped it in on
top. It actually reblits the whole console every frame. Quite a
testament to the speed of hardware blitting. :)

If you mean the text-console, yeah, it turned out okay. I'm not too
happy about offloading the font rendering to GDI on windows, because
it leaks memory too much (or at least you have to be really careful
with your GDI handles to get it not to). 

> I'd be interested in any (example) source code you have available
> on using lua in your game engine. (both lua as 'normal' c/c++ code).
> 
> >http://www.chat.net/~jeske/Projects/HZ/

Sure, I'll make up a tarball for interested parties. It compiles out
of the box on Linux/X. Windows is, of course, a bit more of a
challenge. I'm using MSVC 4.0, and I use its makefile system.

> what are your main ideas about using Lua in your game engine? AI?
> what do you currently have implemented with lua?

I implement object physics, AI (of which there isn't any), key
handling, Sprite definition, and all Sprite state changes from Lua.

I'm actually really happy with how all the Lua code works. The C++
side to support it is a little nasty because I started it back in Lua
2.1, before some of the nicer C-side hooks. Namely, it all deals with
a single "userdata" type because that's all that was available back
then. I'd really like to update it to use tags.

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [hidden email]