An entire game written in Lua is possible?

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

An entire game written in Lua is possible?

jose marin2
Hello.

I would like to know your oppinion about that.

Is possible to create an entire game written in Lua?

Of course, it would be an library for the game engine,
but the entire logic/menus/etc of the game would be
written in Lua.

Why? Portability.

If wyou ant to port the game to another platform, just
change the game engine, and the whole game would be
ported to the new platform!


What your oppinion about that?

The pro's and con's.

Thanks for your oppinion!




       



       
               
_______________________________________________________
Yahoo! doce lar. Faça do Yahoo! sua homepage.
http://br.yahoo.com/homepageset.html 

Reply | Threaded
Open this post in threaded view
|

Re: An entire game written in Lua is possible?

Joseph Stewart
Just as a point of comparison, Adobe/Macromedia's Flash engine is used for MANY nice-quality games on the web. Certainly Lua could give similar performance if wired to the right graphics/sound libraries?

-j

On 1/20/06, Jose Marin <[hidden email]> wrote:
Hello.

I would like to know your oppinion about that.

Is possible to create an entire game written in Lua?

Of course, it would be an library for the game engine,
but the entire logic/menus/etc of the game would be
written in Lua.

Why? Portability.

If wyou ant to port the game to another platform, just
change the game engine, and the whole game would be
ported to the new platform!


What your oppinion about that?

The pro's and con's.

Thanks for your oppinion!










_______________________________________________________
Yahoo! doce lar. Faça do Yahoo! sua homepage.
http://br.yahoo.com/homepageset.html




--
If it ain't broke, break it.  How else are you going to figure out how it works?
Reply | Threaded
Open this post in threaded view
|

Re: An entire game written in Lua is possible?

Framework Studios: Hugo
In reply to this post by jose marin2
Hi,

At Framework Studios 'engine code' and 'game code' is seperated like that.
The "Framework Engine" itself is written with C++, all game- or application
code is Lua.

For example, check out http://www.fastlanepinball.com/ , all game-specific
code for it is in Lua. All our products (not all games) are running on the
exact same engine (same executable) without any product-specific
modifications. It works like a charm!

When actually porting to a different platform however, it is not just the
engine code that needs to move. For example HLSL shaders might need some
rewriting when moving from DirectX to maybe OpenGL. When going to a platform
like PSP usually a lot of the art assets also need to be touched and
platform-specific stuff like networking usually needs to be redone. So, a
Lua game engine can make a big difference for porting products but it is not
all there is to it.

Anyway, Lua for game-development is great! Not just for portability but
because you can get things done much easier and faster (=cheaper) with Lua
than with C++. I would say C++ for the time-consuming and generic tasks, Lua
for game-specific coding.

    Best regards,

                Hugo

> Hello.
>
> I would like to know your oppinion about that.
>
> Is possible to create an entire game written in Lua?
>
> Of course, it would be an library for the game engine,
> but the entire logic/menus/etc of the game would be
> written in Lua.
>
> Why? Portability.
>
> If wyou ant to port the game to another platform, just
> change the game engine, and the whole game would be
> ported to the new platform!
>
>
> What your oppinion about that?
>
> The pro's and con's.
>
> Thanks for your oppinion!
>
>
>
>
>
>
>
>
>
>
> _______________________________________________________
> Yahoo! doce lar. Faça do Yahoo! sua homepage.
> http://br.yahoo.com/homepageset.html
>

Reply | Threaded
Open this post in threaded view
|

Re: An entire game written in Lua is possible?

jose marin2
In reply to this post by Joseph Stewart
Good point!

I think that, following the good programming rules for
Lua, it could be possible to make similar games.

Maybe this thread should become "What the good
programming rules for Lua", or "What's your perfomance
tips for Lua"?

--- Joseph Stewart <[hidden email]>
escreveu:

> Just as a point of comparison, Adobe/Macromedia's
> Flash engine is used for
> MANY nice-quality games on the web. Certainly Lua
> could give similar
> performance if wired to the right graphics/sound
> libraries?
>
> -j



       



       
               
_______________________________________________________
Yahoo! doce lar. Faça do Yahoo! sua homepage.
http://br.yahoo.com/homepageset.html 

Reply | Threaded
Open this post in threaded view
|

Re: An entire game written in Lua is possible?

jose marin2
In reply to this post by Framework Studios: Hugo
Hi, Hugo.

Do you use an in-house solution to bind the C++ code
to Lua, ou some
available tool (tolua, etc)?


       



       
               
_______________________________________________________
Yahoo! doce lar. Faça do Yahoo! sua homepage.
http://br.yahoo.com/homepageset.html 

Reply | Threaded
Open this post in threaded view
|

Re: An entire game written in Lua is possible?

Framework Studios: Hugo
Hi Jose,

Since a lot of the functionality in our engine does not actually require OOP
and usually we implement game objects fully with Lua, we chose to only use
direct binding to functions (the usual 'C'-way to interface with Lua).

To solve the cases where we do need objects, we use user-data to point to
the instance and have functions manipulate those instances directly. Besides
that, we're using a (small) collection of pointers always available we call
the 'state' (like a render-state). For example, to render a 3D scene first
seek the scene, then seek the camera and then every frame call render().
Since this 'state' can be stored, it is only needed to seek for scene and
camera once; just calling 'render' per frame seems quicker than using
tolua(). Down side of course is no garbage collection (but it is possible to
work around that and still use the Lua gc).

    Best regards,

                Hugo

----- Original Message -----
From: "Jose Marin" <[hidden email]>
To: "Lua list" <[hidden email]>
Sent: Friday, January 20, 2006 4:19 PM
Subject: Re: An entire game written in Lua is possible?


> Hi, Hugo.
>
> Do you use an in-house solution to bind the C++ code
> to Lua, ou some
> available tool (tolua, etc)?
>
>
>
>
>
>
>
>
> _______________________________________________________
> Yahoo! doce lar. Faça do Yahoo! sua homepage.
> http://br.yahoo.com/homepageset.html
>

Reply | Threaded
Open this post in threaded view
|

Re: An entire game written in Lua is possible?

Hugh O'Byrne
In reply to this post by jose marin2
Jose Marin wrote:
> Is possible to create an entire game written in Lua?

Of course, Lua is such a wonderful language, writing in Lua could be
considered itself a game. :)

Hugh O'Byrne.
Reply | Threaded
Open this post in threaded view
|

Audio Recordings from the 7/28/2005 Lua Conference available

Shannon Bailey
All Lua enthusiasts,

At the request of Eric Wing, I finally transferred and hand processed the 7
audio recordings I made while attending the Lua Conference last July.  They
were made with an IPod so there is some hard drive noise that I have hand
filtered out using WavePad http://www.nch.com.au/wavepad/ as best I
could.  I also eliminated some dead air, quieted the applause (so we don't
go deaf) compressed and normalized the sound and eliminated some stuttering
and stammering.

The 7 files were recorded at 8khz, 16bit mono and encoded at 24kbps by Lame
into .mp3 files.  They are hosted on one of my web servers linked off my
main web page at: http://www.simmunity.com  or can be found directly at
http://www.shamanicvision.org/LuaConference/

The 7 files I recorded are:

GenomicsWithLua.mp3  - The presenter demonstrated a sophisticated Gene
sequencing database application in Lua
HowLuaBroughtTheDeadToLife.mp3  -  The lead developer discusses one of the
first commercial games to use Lua (+)
LinuxEmbeddedLua.mp3  -  discusses using Lua as a shell extension and
scripting language in embedded devices
LuaByteCodeDecoder.mp3  -  discusses a project to reverse engineer the Lua
VM object code back into source code
PsychoNaughts.mp3  - Paul Dubois presents the new PsychoNaughts console
game and its design and usage of Lua (+)
RobertoLuaOverview.mp3  -  Roberto discusses various aspects of Lua
including its internal structures (+)
SoundGenerationWithLua.mp3  -  presents a sound synthesis project using Lua
for effects and synthesis as a plugin

I did not record the presentation on Yindo and one or two other presentations.

These are provided for informational and educational use only and can be
redistributed by anyone for non-commercial purposes or as the Lua
development deems appropriate.  The recordings marked with (+) are my
favorites.

Enjoy,

Shannon Bailey

CTO Simmunity Corporation
Engineering Manager Loyalty Ventures Inc.
San Francisco, CA
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: An entire game written in Lua is possible?

Antoine Chavasse
In reply to this post by jose marin2
On 1/20/06, Jose Marin <[hidden email]> wrote:

> Hello.
>
> I would like to know your oppinion about that.
>
> Is possible to create an entire game written in Lua?
>
> Of course, it would be an library for the game engine,
> but the entire logic/menus/etc of the game would be
> written in Lua.
>
> Why? Portability.
>

I won't mention which one as it could give bad ideas to some people,
but I know that one major (and quite good looking too) MMORPG has its
client written mostly in python.
Basically, as far as I could tell, the rendering engine and resource
management/streaming (and probably the collision code too) are in C++,
and everything else (including even the directx initialisation code,
the UI toolkit, and the network code) is written in python.

So, the same approach in Lua is most certainly possible, as long as
you're careful to implement everything that is time consuming as
native code.
Reply | Threaded
Open this post in threaded view
|

Re: An entire game written in Lua is possible?

Paweł Różański
In reply to this post by jose marin2
2006/1/20, Jose Marin <[hidden email]>:

> Hello.
>
> I would like to know your oppinion about that.
>
> Is possible to create an entire game written in Lua?
>
> Of course, it would be an library for the game engine,
> but the entire logic/menus/etc of the game would be
> written in Lua.
>
> Why? Portability.
>
As a proof look at http://www.nongnu.org/enigma/download.html (this
game actually answered your question for me some time ago:) )

Actually C + Lua rocks for me. I have somewhat complicated engine in C
(almost ansi:>). With SDL libs I just compile it on Linux & Win32 (No
code change).

Lua gives me OOP for my game :> and C gives good portability and
performance. In one sentence:

I can live without closures in low level engine but I can't live
without them in game objects definitions :>
--
Paweł Różański
Reply | Threaded
Open this post in threaded view
|

Re: An entire game written in Lua is possible?

Jens Alfke

2006/1/20, Jose Marin <[hidden email]>:

Hello.


I would like to know your oppinion about that.


Is possible to create an entire game written in Lua?


Of course, it would be an library for the game engine,

but the entire logic/menus/etc of the game would be

written in Lua.


Sure — Lua is quote popular in the game industry and has been used this way in a number of commercial games for PCs and consoles. One recent example is the PS2 and Xbox game "Psychonauts" (one of the developers of which gave a talk at the 2005 Lua Workshop, which unfortunately I missed.)

Some amount of the UI code of World Of Warcraft is written in Lua (or maybe just extensible in Lua) ... if you google for just "Lua" you'll find several of the top hits are WoW message boards with people talking about modding the game.

Amazon.com has several books covering game programming in Lua.

--Jens
Reply | Threaded
Open this post in threaded view
|

Re: An entire game written in Lua is possible?

Shawn Kirst
In reply to this post by jose marin2
A friend of mine has done just that.  Twice.   All game logic and UI
interaction was written in Lua.  Here's the links:
http://www.bioscythe.com
http://www.kerzoids.com
I had the pleasure of helping him out on some parts of these games ;) (Not a
whole lot, mostly linux porting, low-level and rendering code).  Basically
he's made a game engine you can take and write a complete game with without
ever having to fuss with the C++ code.  I've learned a lot from him :)

On Friday 20 January 2006 09:45, Jose Marin wrote:

> Hello.
>
> I would like to know your oppinion about that.
>
> Is possible to create an entire game written in Lua?
>
> Of course, it would be an library for the game engine,
> but the entire logic/menus/etc of the game would be
> written in Lua.
>
> Why? Portability.
>
> If wyou ant to port the game to another platform, just
> change the game engine, and the whole game would be
> ported to the new platform!
>
>
> What your oppinion about that?
>
> The pro's and con's.
>
> Thanks for your oppinion!
>
>
>
>
>
>
>
>
>
>
> _______________________________________________________
> Yahoo! doce lar. Faça do Yahoo! sua homepage.
> http://br.yahoo.com/homepageset.html

--
Shawn Kirst
http://nifelheim.dyndns.org/~cocidius
http://ignh.dyndns.org/
Reply | Threaded
Open this post in threaded view
|

RE: An entire game written in Lua is possible?

Søren Gammelmark
In reply to this post by jose marin2
Hi

Correct me if I'm wrong, but isn't the game FarCry written in Lua that
way? Personally I like FarCry, and I think the quality af the
game/graphics/audio and all that would put you question down to a very
solid yes.

/Søren Gammelmark

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jose Marin
Sent: 20. januar 2006 15:45
To: [hidden email]
Subject: An entire game written in Lua is possible?


Hello.

I would like to know your oppinion about that.

Is possible to create an entire game written in Lua?

Of course, it would be an library for the game engine,
but the entire logic/menus/etc of the game would be
written in Lua.

Why? Portability.

If wyou ant to port the game to another platform, just
change the game engine, and the whole game would be
ported to the new platform!


What your oppinion about that?

The pro's and con's.

Thanks for your oppinion!




       



       
               
_______________________________________________________
Yahoo! doce lar. Faça do Yahoo! sua homepage.
http://br.yahoo.com/homepageset.html