Ironic comment RE: cooperative multitasking

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

Ironic comment RE: cooperative multitasking

RLak
> You've got 64 megs, which is nice, and Win32 fibers are supported
> in the API.

> But everything on the XBox runs in ring 0, which means user code
> does *not* have a separate stack from system code and interrupts.
> So each fiber needs a big stack (I forget how much, 16k or
> something like that) to allow for interrupts.

Ooh, scarey. 16k stacks. Gosh, and you've only got 64 megs to play with.

Oops, wait. You've got to squish Windows in there, somehow, don't you?




Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Sean Middleditch
On Fri, 2002-06-07 at 16:58, [hidden email] wrote:
> 
> > You've got 64 megs, which is nice, and Win32 fibers are supported
> > in the API.
> 
> > But everything on the XBox runs in ring 0, which means user code
> > does *not* have a separate stack from system code and interrupts.
> > So each fiber needs a big stack (I forget how much, 16k or
> > something like that) to allow for interrupts.
> 
> Ooh, scarey. 16k stacks. Gosh, and you've only got 64 megs to play with.
> 
> Oops, wait. You've got to squish Windows in there, somehow, don't you?

I'd assume once all the desktop/server/component/util/aol/user/etc. crap
that the console doesn't use is ripped out, it's brought down in size
considerably - still no match for embedded Linux, I'd wager, but good
enough for the X-Box in any event.  Hell, they can get Windows onto a
hand-held.

> 
> 
> 




Reply | Threaded
Open this post in threaded view
|

RE: Ironic comment RE: cooperative multitasking

Curt Carpenter
In reply to this post by RLak
> Ooh, scarey. 16k stacks. Gosh, and you've only got 64 megs to play
with.

Yeah, it is scary. You also have to fit in all your content: terrain,
models, textures, sound, animations, screen buffers, etc.

Curt

Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Eric Tetz-2
In reply to this post by RLak
--- [hidden email] wrote:
> Oops, wait. You've got to squish Windows in there, somehow, don't you

It runs "Diet Windows 2K". Uses < 3MB.

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

Reply | Threaded
Open this post in threaded view
|

RE: Ironic comment RE: cooperative multitasking

Sean Middleditch
In reply to this post by RLak
On Fri, 2002-06-07 at 20:13, Curt Carpenter wrote:
> > Ooh, scarey. 16k stacks. Gosh, and you've only got 64 megs to play
> with.
> 
> Yeah, it is scary. You also have to fit in all your content: terrain,
> models, textures, sound, animations, screen buffers, etc.

The advantage of a console is that you can do all that easily within
64MB.  Especially given that consoles tend to have lower quality
texture/sound files, simply because today's TV's can't really support
much better.  Maybe once HDTV hits off...

This is why I'll always prefer PC gaming.  Not to mention consoles' best
RPG is the FF series (New in version XI - *less* gameplay than FMV!!)
while computers are constantly churning out top-quality games, like
Baldur's Gate series.

Which use Lua.  ~,^

> 
> Curt



Reply | Threaded
Open this post in threaded view
|

RE: Ironic comment RE: cooperative multitasking

Joshua Jensen
> > Yeah, it is scary. You also have to fit in all your 
> content: terrain, 
> > models, textures, sound, animations, screen buffers, etc.
> 
> The advantage of a console is that you can do all that easily 
> within 64MB.  Especially given that consoles tend to have 
> lower quality texture/sound files, simply because today's 
> TV's can't really support much better.  Maybe once HDTV hits off...

It's not as easy as you think... today's console games have a huge
amount of content, like mountains that don't have fixed runs and you can
roam all over.

> This is why I'll always prefer PC gaming.  Not to mention 
> consoles' best RPG is the FF series (New in version XI - 
> *less* gameplay than FMV!!) while computers are constantly 
> churning out top-quality games, like Baldur's Gate series.
> 
> Which use Lua.  ~,^

So do some console games I know of...

Josh


Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Cameron Kaiser-2
> So do some console games I know of...

My CD of MDK2 for the Sega Dreamcast says clearly on the label, "LUA
(C)1994-2000 TeCGraf, PUC Rio."

-- 
----------------------------- personal page: http://www.armory.com/~spectre/ --
 Cameron Kaiser, Point Loma Nazarene University * [hidden email]
-- TRUE HEADLINE: Miners Refuse To Work After Death ---------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Cameron Kaiser-2
In reply to this post by Eric Tetz-2
> > Oops, wait. You've got to squish Windows in there, somehow, don't you
> 
> It runs "Diet Windows 2K". Uses < 3MB.

My gosh, that's positively anorexic. I thought that was barely enough for
the OS loader.

-- 
----------------------------- personal page: http://www.armory.com/~spectre/ --
 Cameron Kaiser, Point Loma Nazarene University * [hidden email]
-- Experience varies directly with amount of equipment ruined. ----------------

Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Christopher S. Charabaruk
In reply to this post by Cameron Kaiser-2
Hrm... Wasn't aware that MDK2 was a console game...

Cameron Kaiser wrote:
So do some console games I know of...


My CD of MDK2 for the Sega Dreamcast says clearly on the label, "LUA
(C)1994-2000 TeCGraf, PUC Rio."



--
Chris 'coldacid' Charabaruk <ccharabaruk [at] meldstar [dot] com>
Meldstar Studios <http://www.meldstar.com/> - Creation, cubed.


Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Sean Middleditch
MDK2 was made by BioWare too, wasn't it?  Same company as Baldur's Gate
series... they must like Lua.

Why they made their own NWNScript for NWN is beyond me - the "features"
of that language just plain suck, from what I've read.  I don't imagine
they made it too much faster than Lua (it is statically typed, which can
lead to some more powerful stack/call optimizations).

The fact that enough game companies don't find languages like Lua useful
says that there is something Lua is missing that it shouldn't be.  All
that I can really think of tho is a) *real* multi-tasking, and b) a more
newbie-friendly syntax.

I used to think a syntax like Python/Ruby/Lua/etc. was great for
newbies, but then it turns out for certain tasks, such as game
scripting, the community tends to be more familiar with C/C++/Java,
etc.  Which ends up meaning that a C-like language is actually easier to
those poor fools who hate learning anything new.  This is one reason I
up and changed the syntax on Scriptix to be C-like.

So, speaking of that, does anyone have other examples of where a simple
syntax isn't a good as a common syntax?  And, would it be easy/possible
to seperate the Lua interpreter from the parser to allow different
parsers to be used with the same core backend?  (Similar to what I've
tried to do with Scriptix).

On Sat, 2002-06-08 at 12:23, Christopher S. Charabaruk wrote:
> Hrm... Wasn't aware that MDK2 was a console game...
> 
> Cameron Kaiser wrote:
> >>So do some console games I know of...
> > 
> > 
> > My CD of MDK2 for the Sega Dreamcast says clearly on the label, "LUA
> > (C)1994-2000 TeCGraf, PUC Rio."
> > 
> 
> 
> -- 
> Chris 'coldacid' Charabaruk <ccharabaruk [at] meldstar [dot] com>
> Meldstar Studios <http://www.meldstar.com/> - Creation, cubed.
> 



Reply | Threaded
Open this post in threaded view
|

RE: Ironic comment RE: cooperative multitasking

Sean Middleditch
In reply to this post by Joshua Jensen
On Sat, 2002-06-08 at 01:25, Joshua Jensen wrote:
> > > Yeah, it is scary. You also have to fit in all your 
> > content: terrain, 
> > > models, textures, sound, animations, screen buffers, etc.
> > 
> > The advantage of a console is that you can do all that easily 
> > within 64MB.  Especially given that consoles tend to have 
> > lower quality texture/sound files, simply because today's 
> > TV's can't really support much better.  Maybe once HDTV hits off...
> 
> It's not as easy as you think... today's console games have a huge
> amount of content, like mountains that don't have fixed runs and you can
> roam all over.

Ya, but that kind of thing uses relatively low memory, especially if
coded cleverly.  To be honest, 64MB would be just fine for most PC games
today, if you had a leaner OS (i.e., a Linux kernel stripped of all
background daemons, X server, etc - just the core stuff needed for the
game).

Not to mention that all the game content won't be loaded at once.  A
clever resource management system with either a broken up world or
cleverly partitioned world would be able to keep a relatively small
amount of data in memory.

In addition, the consoles models and whatnot tend to be a lot lower
quality than what we see in the newer PC games, which are just now
starting to actually *need* 128MB+ of RAM.  The newest console is
out-dated by the PC within a week, generally - the graphics hardware
stuffed in those things is usually fairly weak.  Especially given that
consoles are sold at a loss of profit as is, makers can't afford to put
the hardware of a $2,000 PC and sell it for $300.

I think the only thing a console does pull off better than the PC
(besides being cheaper for the children/students who want to buy them)
is multiplayer - 4 people on the same console generally don't lag.  ~,^

> 
> > This is why I'll always prefer PC gaming.  Not to mention 
> > consoles' best RPG is the FF series (New in version XI - 
> > *less* gameplay than FMV!!) while computers are constantly 
> > churning out top-quality games, like Baldur's Gate series.
> > 
> > Which use Lua.  ~,^
> 
> So do some console games I know of...

Ya, so do some hand-helds.  I wasn't making the argument that PC games
were better because they had Lua.  Just trying to pretend I was still on
topic.  ^,^

> 
> Josh
> 



Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Christopher S. Charabaruk
In reply to this post by Sean Middleditch
Yeah, why build your own when you can build upon Lua, like what I'm doing for my game projects? I have Meldlua which is extensions on Lua and such, and then I extend Meldlua further for the final scripting language used by my games.

Sean Middleditch wrote:
MDK2 was made by BioWare too, wasn't it?  Same company as Baldur's Gate
series... they must like Lua.

Why they made their own NWNScript for NWN is beyond me - the "features"
of that language just plain suck, from what I've read.  I don't imagine
they made it too much faster than Lua (it is statically typed, which can
lead to some more powerful stack/call optimizations).

The fact that enough game companies don't find languages like Lua useful
says that there is something Lua is missing that it shouldn't be.  All
that I can really think of tho is a) *real* multi-tasking, and b) a more
newbie-friendly syntax.

I used to think a syntax like Python/Ruby/Lua/etc. was great for
newbies, but then it turns out for certain tasks, such as game
scripting, the community tends to be more familiar with C/C++/Java,
etc.  Which ends up meaning that a C-like language is actually easier to
those poor fools who hate learning anything new.  This is one reason I
up and changed the syntax on Scriptix to be C-like.

So, speaking of that, does anyone have other examples of where a simple
syntax isn't a good as a common syntax?  And, would it be easy/possible
to seperate the Lua interpreter from the parser to allow different
parsers to be used with the same core backend?  (Similar to what I've
tried to do with Scriptix).

On Sat, 2002-06-08 at 12:23, Christopher S. Charabaruk wrote:

Hrm... Wasn't aware that MDK2 was a console game...

Cameron Kaiser wrote:

So do some console games I know of...


My CD of MDK2 for the Sega Dreamcast says clearly on the label, "LUA
(C)1994-2000 TeCGraf, PUC Rio."



--
Chris 'coldacid' Charabaruk <ccharabaruk [at] meldstar [dot] com>
Meldstar Studios <http://www.meldstar.com/> - Creation, cubed.









--
Chris 'coldacid' Charabaruk <ccharabaruk [at] meldstar [dot] com>
Meldstar Studios <http://www.meldstar.com/> - Creation, cubed.


Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Bret Mogilefsky-3
In reply to this post by Sean Middleditch
On Sat, 2002-06-08 at 09:38, Sean Middleditch wrote:
> The fact that enough game companies don't find languages like Lua useful
> says that there is something Lua is missing that it shouldn't be.  All
> that I can really think of tho is a) *real* multi-tasking, and b) a more
> newbie-friendly syntax.

You're writing as if every game company out there with a scripting
language of their own has evaluated Lua and passed on it.  I honestly
don't think game developers are saying "Lua's got no *real*
multi-tasking?  Screw that, I'm going to go write my own language from
scratch!"  I'd say the number one thing missing from Lua is *exposure*.

There's a tendency among all programmers, and especially game
programmers, to rewrite what came before assuming they'll save time by
not trying to customize something written by people who didn't have your
needs in mind.  

I know I did that for my first game (previous technology was more
trouble to improve than to replace), but I was lucky enough to have
heard about Lua first, so I replaced what came before, all right... with
Lua.

(And by the way, Lua's syntax is incredibly forgiving... That was
actually the first reason I chose it, before knowing anything about all
of the other benefits of size, speed, flexibility, etc.)


Bret
-- 
Bret Mogilefsky * Mgr. SCEA Developer Support * [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Sean Middleditch
On Sat, 2002-06-08 at 14:13, Bret Mogilefsky wrote:
> On Sat, 2002-06-08 at 09:38, Sean Middleditch wrote:
> > The fact that enough game companies don't find languages like Lua useful
> > says that there is something Lua is missing that it shouldn't be.  All
> > that I can really think of tho is a) *real* multi-tasking, and b) a more
> > newbie-friendly syntax.
> 
> You're writing as if every game company out there with a scripting
> language of their own has evaluated Lua and passed on it.  I honestly
> don't think game developers are saying "Lua's got no *real*
> multi-tasking?  Screw that, I'm going to go write my own language from
> scratch!"  I'd say the number one thing missing from Lua is *exposure*.

I was actually looking at the number of companies that *have* looked at
Lua, or even previously used Lua, and passed on it.  Check out the dev
forums or developer updates of some games, you'll notice the designer
will go over various features, touch on various languages (I've Lua
mentioned a number of times, although not as often as one would like)
and pass them up in favor of a commercial package (Java was popular for
a while, then seemed to die off as a game scripting language) or a
in-house tool.

One advantage Lua has over Java/Perl/Python/etc. is being *designed* for
embedding.  Any developer not thinking they can easily embed Lua is on
crack... I had a full Lua interpreter running flawlessy in MUDix (when I
was working on it) in a couple hours.

Given the license confusion people kept having with Lua, that may have
been a turn-off as well...  That is fixed now tho, yes?

> 
> There's a tendency among all programmers, and especially game
> programmers, to rewrite what came before assuming they'll save time by
> not trying to customize something written by people who didn't have your
> needs in mind.  
> 
> I know I did that for my first game (previous technology was more
> trouble to improve than to replace), but I was lucky enough to have
> heard about Lua first, so I replaced what came before, all right... with
> Lua.
> 
> (And by the way, Lua's syntax is incredibly forgiving... That was
> actually the first reason I chose it, before knowing anything about all
> of the other benefits of size, speed, flexibility, etc.)
> 
> 
> Bret
> -- 
> Bret Mogilefsky * Mgr. SCEA Developer Support * [hidden email]
> 



Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Bret Mogilefsky-3
On Sat, 2002-06-08 at 11:08, Sean Middleditch wrote:
> I was actually looking at the number of companies that *have* looked at
> Lua, or even previously used Lua, and passed on it.  Check out the dev
> forums or developer updates of some games, you'll notice the designer
> will go over various features, touch on various languages (I've Lua
> mentioned a number of times, although not as often as one would like)
> and pass them up in favor of a commercial package (Java was popular for
> a while, then seemed to die off as a game scripting language) or a
> in-house tool.

It's funny you should mention Java... Rob Huebner gave a talk at GDC
around 1998 about the rolled-from-scratch scripting language in Jedi
Knight to a packed house... This was just when people were turning onto
scripting languages (a result of QuakeC), and people seemed quite
intimidated by the effort involved in doing their own.  When he
mentioned we were also using the off-the-shelf Lua on another game,
everyone swiveled and focused intently and immediately on it.  There was
a surge of popularity immediately thereafter.

A year or two later, Rob gave another talk at GDC, this one on the
engine used in Vampire: The Masquerade.  A big portion of the talk
focused on the use of Java as their scripting language... Again, people
grabbed onto that, and tried to follow the example.  A year or two ago,
there was a panel on scripting languages, and I believe one of the
people on the panel was using Java after Rob's example... Lua came up
during the Q&A again as well.  Then the new consoles came out, and the
lack of Java on those platforms precluded it as a choice if you were
looking to make money in console-land.  This series of events might
explain the rise-and-fall of Java as a game-scripting language...
Whatever's talked-about at GDC in the last year or two is the first
thing people try.  Someone (John Belmonte, a mental picture of you is
forming in my head!) should do a talk next year featuring Lua
exclusively... 

As for why some companies my use Lua once, then not again... Lua is
still gaining steam. I think people like Lua, but at the point where you
find yourself hacking the interpreter you wonder if you might not be
better off on your own.  5.0 appears to have just about everything
everyone (well, game developers) have clamored for, and should stop a
lot of the custom hacking of the interpreter... or maybe it's just that
the focus will shift from multi-tasking to garbage collection now.  =)  

That, and the fact that some projects are done by totally different
design teams who don't communicate, means some companies might put out
games without Lua after using it in one of them.  Eg. Obi-Wan rolled its
own scripting language even though Grim Fandango used Lua, while Escape
>From Monkey Island stuck with Lua.  Totally different code bases,
totally different teams, totally different scripting language used in
the same company.

Again, at this point the thing missing is exposure.  If you use Python
or something that looks like C or Java, you can hand your scripters any
one of a number of books on the language and there are a million
tutorials and other resources to help them.  Similarly, your consumers
don't need hand-holding or documentation from you when they want to mod
your game because the resources are all out there.  Lua's limited
exposure means that even though the language is great in so many ways,
it's hard to pick it when you're looking for something lots of people
already know how to program.

Once there's, say, an O'Reilly book on Lua in front of people when
they're browsing the shelves, and just one very successful title that
uses Lua for mods, you can bet that we'll see a lot more people jumping
all over it.

Speaking of which... Luiz, who is publishing your book?  =)


Bret
-- 
Bret Mogilefsky * Mgr. SCEA Developer Support * [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Cameron Kaiser-2
In reply to this post by Sean Middleditch
> MDK2 was made by BioWare too, wasn't it?  Same company as Baldur's Gate
> series... they must like Lua.

Yep.

-- 
----------------------------- personal page: http://www.armory.com/~spectre/ --
 Cameron Kaiser, Point Loma Nazarene University * [hidden email]
-- The fastest way to fold a map is differently. ------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Diego Nehab-3
In reply to this post by Eric Tetz-2
On Fri, 7 Jun 2002, Eric Tetz wrote:

> --- [hidden email] wrote:
> > Oops, wait. You've got to squish Windows in there, somehow, don't you
> 
> It runs "Diet Windows 2K". Uses < 3MB.

Can I install that on my regular PCs? ;-)

[]s,
Diego.


Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Thatcher Ulrich
In reply to this post by Sean Middleditch
On Jun 08, 2002 at 12:38 -0400, Sean Middleditch wrote:
> 
> The fact that enough game companies don't find languages like Lua useful
> says that there is something Lua is missing that it shouldn't be.  All
> that I can really think of tho is a) *real* multi-tasking, and b) a more
> newbie-friendly syntax.

Eh, IMHO "real" multitasking in a game scripting language is more bug
than feature.  Less deterministic, and thus harder to debug than
cooperative multitasking.  Thread synchronization is difficult -- no
point in inflicting it on scripters any more than necessary.

Back to the issue of why or why not game companies select Lua, I can
comment briefly on Oddworld's recent decision to roll our own for the
next game.  The decision was more or less in the hands of the team
member responsible for scripting & AI, with approval from the lead.  I
threw in my 2 cents including Lua advocacy during the selection
process, but the result came out in favor of homemade.  The main
reasons were:

1. no equivalent of yield() at the time of evaluation

2. general worries about GC

3. desire to roll-your-own

Reason 3 is pretty endemic in the game industry, populated as it is by
hard core hackers.  The first time I embedded a scripting language in
a game, in '97 or '98, I rolled my own and had a great time doing it.
It was certainly educational, but I would have saved a ton of time and
had a better system had I just used Lua (I had heard it mentioned on
Usenet, but never looked into it).  I've since wised up (a little),
but I'm an old fart by game industry standards.

I think the days of roll-your-own are numbered though, due to
competitive & economic pressure.  Once a few off-the-shelf options are
well known to be good & flexible enough, responsible leads won't
allocate resources to roll-your-own.  As Bret points out, this process
is as much marketing & political as technical.

-- 
Thatcher Ulrich
http://tulrich.com

Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

John Belmonte-2
In reply to this post by Sean Middleditch
Sean Middleditch wrote:
The fact that enough game companies don't find languages like Lua useful
says that there is something Lua is missing that it shouldn't be.  All
that I can really think of tho is a) *real* multi-tasking,

nope

and b) a more newbie-friendly syntax.

you must be joking?

In my case Lua finds itself only being used for configuration, and only in the one-third of the game I coded. The reason we don't use it in the main loop is lack of a gc suitable for real-time apps. The reason the other programmers don't use it is a little stubbornness mixed with lack of Japanese documentation :-). The Lua manual is short but essential reading nonetheless!

-John



--
OpenPGP encrypted mail welcome.


Reply | Threaded
Open this post in threaded view
|

Re: Ironic comment RE: cooperative multitasking

Sean Middleditch
On Sat, 2002-06-08 at 22:56, John Belmonte wrote:
> Sean Middleditch wrote:
> > The fact that enough game companies don't find languages like Lua useful
> > says that there is something Lua is missing that it shouldn't be.  All
> > that I can really think of tho is a) *real* multi-tasking,
> 
> nope
> 
> > and b) a more newbie-friendly syntax.
> 
> you must be joking?

No.  Game modders generalyl aren't coding newbies - they're newbies to
the language itself tho.  A syntax more similar to what they may have
picked up in gaming books, other game moding, or school (which is almost
always C/C++/Java), is more "newbie-friendly" in this case.

> 
> In my case Lua finds itself only being used for configuration, and only 
> in the one-third of the game I coded.  The reason we don't use it in the 
> main loop is lack of a gc suitable for real-time apps.  The reason the 
> other programmers don't use it is a little stubbornness mixed with lack 
> of Japanese documentation :-).  The Lua manual is short but essential 
> reading nonetheless!
> 
> -John
> 
> 
> 
> -- 
> OpenPGP encrypted mail welcome.
> 



12345