SDL and Qtopia's grabKeyboard

In my testing with Opie, grabbing and ungrabbing the keyboard works reliably,
at least through qcop. Perhaps this is one of the issues that the Opie team
has fixed. (Opie is a fork of Qtopia.)

Is there a compile-time option to control this behavior? i.e. could I build a
copy of libSDL that grabbed the keyboard?

-Cliff L. Biffle

Hi Gang,

I want to build a bunch (like 3-4) games for a web-site I am creating…

I thought of using SDL…and creating some simple games that could be
cross platform…

Anyway…what I want to do is code most of the game logic using and
interpreter that way I can create more than one game using the same
engine…

Does anyone have any recommendations?

What you give me the best bang for the buck?

I like Vb Script…but that is Microsoft…what other language is as
nice as VB Script…but will run on different platforms…?

Also I need something that will export/import variables (marshal)
between the interpreter and C++.

Thanks
-tl

PS

VB Script has a nice way to declare Classes…

I wonder if PHP would work?

first … my english is not good
check PHP … in experimental developement exists a SDL port - PHP-SDL
extension - i found it on www.sourceforge.net. All 1.2.4 functions are
enabled.

PHP is server side scripting language (scripts are executed on server side,
and server sends result to user - logicaly game window linked to link on
your pages is opened on server … users need to download your games) for
developement with PHP-SDL you must provide runtime (php.exe php.ini and
extension) to user, but PHP-SDL is for inet - with PHP network functions is
multiplayer game developement really easy (XML, socks, mysql … )

i use PHP-SDL to develop really portable open source software (now
multiplayer RPG)

if you want develop onpage games (no download needed)
is not PHP-SDL best, i mean, JAVA APPLET games … (borland J builder,
other compilers) or Flash is good way> ----- Original Message -----

From: tonyl@madscifi.com (Tony Leotta)
To:
Sent: Monday, September 02, 2002 2:56 AM
Subject: [SDL] I Need a Game Interpreter

Hi Gang,

I want to build a bunch (like 3-4) games for a web-site I am creating…

I thought of using SDL…and creating some simple games that could be
cross platform…

Anyway…what I want to do is code most of the game logic using and
interpreter that way I can create more than one game using the same
engine…

Does anyone have any recommendations?

What you give me the best bang for the buck?

I like Vb Script…but that is Microsoft…what other language is as
nice as VB Script…but will run on different platforms…?

Also I need something that will export/import variables (marshal)
between the interpreter and C++.

Thanks
-tl
http://www.madscifi.com/

PS

VB Script has a nice way to declare Classes…

I wonder if PHP would work?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi Thanks…

I started looking at Ruby and Python…and I know TCL/TK could work…

What I want to do is to expose the core data of the Game Engine to
Scripts…

The core game engine will written in C++, the interpreted code need to
SET/GET variables.

The Interpreter needs to be VERY fast and thread safe…also NO MEMORY
LEAKS!

Thanks
Tony

I really like Lua. I’m using it as the scripting embedder for writing
events in our games.

I understand that the garbage collection method (mark and sweep) isn’t great
for games, but I really haven’t had a problem.>From: “Tony Leotta”

Reply-To: sdl at libsdl.org
To:
Subject: RE: [SDL] I Need a Game Interpreter
Date: Sun, 1 Sep 2002 21:34:56 -0400

Hi Thanks…

I started looking at Ruby and Python…and I know TCL/TK could work…

What I want to do is to expose the core data of the Game Engine to
Scripts…

The core game engine will written in C++, the interpreted code need to
SET/GET variables.

The Interpreter needs to be VERY fast and thread safe…also NO MEMORY
LEAKS!

Thanks
Tony


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Rob Sadedin
No Substance Software (www.nosubstancesoftware.com)


MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

What games are those?

I was just looking at a C# SDL wrapper…I could use C# but then it
would only run on windows.> ----- Original Message -----

From: sdl-admin@libsdl.org [mailto:sdl-admin at libsdl.org] On Behalf Of
Robert Clayton
Sent: Sunday, September 01, 2002 10:13 PM
To: sdl at libsdl.org
Subject: RE: [SDL] I Need a Game Interpreter

I really like Lua. I’m using it as the scripting embedder for writing
events in our games.

I understand that the garbage collection method (mark and sweep) isn’t
great
for games, but I really haven’t had a problem.

From: “Tony Leotta” <@Tony_Leotta>
Reply-To: sdl at libsdl.org
To:
Subject: RE: [SDL] I Need a Game Interpreter
Date: Sun, 1 Sep 2002 21:34:56 -0400

Hi Thanks…

I started looking at Ruby and Python…and I know TCL/TK could work…

What I want to do is to expose the core data of the Game Engine to
Scripts…

The core game engine will written in C++, the interpreted code need to
SET/GET variables.

The Interpreter needs to be VERY fast and thread safe…also NO MEMORY
LEAKS!

Thanks
Tony


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Rob Sadedin
No Substance Software (www.nosubstancesoftware.com)


MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Maybe not so. See:
www.southern-storm.com.au/portable_net.htmlOn Sunday 01 September 2002 07:24 pm, you wrote:

What games are those?

I was just looking at a C# SDL wrapper…I could use C# but then it
would only run on windows.

a game. I’ve spent many painful hours with Ruby trying to stop it from
messing up my frame rate and only partially succeeded, much as I love the
language for other jobs. Once you’ve built your foundation on such a runtime
there’s very little you can do about it when you notice your game jerks every
few frames. Mark and sweep garbage collection involves forgetting about
memory that you’ve allocated and every so often traversing an enormous tree
of pointers to reclaim some memory. If you don’t do it, or delay it much,
your program will run out of memory. Do it as often as the language wants,
and you’ll never get a consistent frame rate. There’s also nothing you can
do to interrupt it-- once the recovery algorithm starts it must run to
completion or start from scratch.

Python uses reference counting to automatically free memory, and so the work
of reclaiming memory is spread evenly over execution, rather than
concentrated into long lumps as with GC. See:

http://www.gamasutra.com/features/20020821/dawson_01.htm

For how one software house’s story. This has been a public information
broadcast from someone who’s learnt his lesson with garbage collection and
games :slight_smile: I’d be intereseted to know if anyone has used a GC as the sole
storage solution for a game, or whether (as many people do) it’s just used as
a backstop between levels to tidy up loose ends.On Monday 02 September 2002 03:13, Robert Clayton wrote:

I really like Lua. I’m using it as the scripting embedder for writing
events in our games.

I understand that the garbage collection method (mark and sweep) isn’t
great for games, but I really haven’t had a problem.

From experience: don’t ever use an automatic, garbage-collected runtime for

Matthew > http://www.soup-kitchen.net/
ICQ 19482073

At 03:53 AM 9/2/02 +0100, you wrote:

Python uses reference counting to automatically free memory, and so the work
of reclaiming memory is spread evenly over execution, rather than
concentrated into long lumps as with GC. See:

How does it deal with the problem of circular references?

Garbage collection But you can disable it without too much worry, and run
it explicitly at fairly infrequent intervals, and/or explicitly break
circular references to help it along.On Monday 02 September 2002 04:02, Christopher Subich wrote:

At 03:53 AM 9/2/02 +0100, you wrote:

Python uses reference counting to automatically free memory, and so the
work of reclaiming memory is spread evenly over execution, rather than
concentrated into long lumps as with GC. See:

How does it deal with the problem of circular references?


Matthew > http://www.soup-kitchen.net/
> ICQ 19482073

Matthew Bloch wrote:

From experience: don’t ever use an automatic, garbage-collected
runtime for a game. I’ve spent many painful hours with Ruby trying
to stop it from messing up my frame rate and only partially
succeeded, much as I love the language for other jobs. Once you’ve
built your foundation on such a runtime there’s very little you can
do about it when you notice your game jerks every few frames. Mark
and sweep garbage collection involves forgetting about memory that
you’ve allocated and every so often traversing an enormous tree of
pointers to reclaim some memory. If you don’t do it, or delay it
much, your program will run out of memory. Do it as often as the
language wants, and you’ll never get a consistent frame rate.
There’s also nothing you can do to interrupt it-- once the recovery
algorithm starts it must run to completion or start from scratch.

Do it once per frame, and your frame rate will be consistent (although
possibly too slow to be useful).

Python uses reference counting to automatically free memory, and so
the work of reclaiming memory is spread evenly over execution,
rather
than concentrated into long lumps as with GC.

Note that Python still uses garbage collection to deal with cyclic
references.–
Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com

Is this off topic? Are we allowed to plow into deep Interpreter issues
on this list?

If so:

  1. I wonder how you would limit each object to just a specific time
    slice. Seems like you would have to create a better scheduling
    algorithm than more operating systems.

Also I have been thinking about ways to optimize the way time slices
would be grated…I guess more like time slice reduced based on
proximity.

So if one unit detects an close enemy unit…it is pointless to have
ALL the units do a LOS…just let all the units know…and enemy has
been detected.

Then each unit can decide if it is going to shot…no…just tell 'em
all to shot.

  1. Just creating tons of threads and having each “object” run full bore
    in a thread, that calls an interpreter seems like it would not scale.

I mean how many threads running Ruby or Python could you have?

  1. If we take a step back however…and don’t think about REAL-TIME…
    (I know, perish the thought) But what if we consider a class of games
    that does not require real-time graphics, no 3D, not even iso-hex.

No animation. No nothing. Think 1982 to 1987.

The issue should turn to one of…AGENT based AI’s based on C++ Game
Engine that use embedded interpreted language.

So now…Garbage collection is not an issue.

And now each object gets 100% CPU until it completes…

A turn could last 1 second or 3 minutes.

Think chess…deep long calculations.

  1. Where does SDL come into play?

Well…that is simple…for smooth map scrolling that is super fast.

Have you ever tried to write a game using Windows GDI? It is a joke.
And Direct X…with out the SDL wrapper is UGLY.

Ok…so now with all the parameters…I poise the question again…but
now from the point of C++ to embedded language binding…

What is the BEST scripting language that can be integrated into a C++
program that will use SDL?

The scripting language should be powerful with objects, and should be
able to be byte-code compiled for speed.

The language should support hash tables, dictionaries, and even complex
data structures.

Equally… the scripting language should be able to make calls to
functions written in C++ that provide features such as path finding,
LOS, LOF, and Global Simulation Environment data sharing.

But above all…the scripts shall be viewed as agents that have no more
or no less access to game state data as a human player. Think BOT. So
you could code up a AI that would win or lose but it could not cheat
because it has only as much data as it is allowed to view…

The data sharing between the scripting language and the C++ game engine
MUCT be fast…but is also MUST have some checks.

Example: The AI trys to access data on terrain that is hidden in a fog
of war…this is not allowed.

Thanks,
-Tony> ----- Original Message -----

From: sdl-admin@libsdl.org [mailto:sdl-admin at libsdl.org] On Behalf Of
Rainer Deyke
Sent: Sunday, September 01, 2002 11:39 PM
To: sdl at libsdl.org
Subject: Re: [SDL] I Need a Game Interpreter

Matthew Bloch wrote:

From experience: don’t ever use an automatic, garbage-collected
runtime for a game. I’ve spent many painful hours with Ruby trying
to stop it from messing up my frame rate and only partially
succeeded, much as I love the language for other jobs. Once you’ve
built your foundation on such a runtime there’s very little you can
do about it when you notice your game jerks every few frames. Mark
and sweep garbage collection involves forgetting about memory that
you’ve allocated and every so often traversing an enormous tree of
pointers to reclaim some memory. If you don’t do it, or delay it
much, your program will run out of memory. Do it as often as the
language wants, and you’ll never get a consistent frame rate.
There’s also nothing you can do to interrupt it-- once the recovery
algorithm starts it must run to completion or start from scratch.

Do it once per frame, and your frame rate will be consistent (although
possibly too slow to be useful).

Python uses reference counting to automatically free memory, and so
the work of reclaiming memory is spread evenly over execution,
rather
than concentrated into long lumps as with GC.

Note that Python still uses garbage collection to deal with cyclic
references.


Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I want to build a bunch (like 3-4) games for a web-site I am
creating…

I thought of using SDL…and creating some simple games that could be
cross platform…

Anyway…what I want to do is code most of the game logic using and
interpreter that way I can create more than one game using the same
engine…

Does anyone have any recommendations?

Try Perl (my personal choice) or Python. They are both very
cross-platform and easy to use in a C/C++ application.

Matt


Matt Spong <@Matt_Spong>
http://www.forkbomb.net
AIM: Spong1027

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (Darwin)

iD8DBQE9crzW9cWdso9liPMRAti+AJ4vFpKnyuPZCyeML/QaCzb09hkQlQCfdcpL
yKBK/vm+g/CZnqvBFZbT4Qg=
=sRT1
-----END PGP SIGNATURE-----

Is this off topic?

Yes.

Are we allowed to plow into deep Interpreter issues on this list?

Not really, there are plenty of other mailing lists and newsgroups
devoted to interpreters and the use of them in games.

Thanks,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

“Cliff L. Biffle” writes:

In my testing with Opie, grabbing and ungrabbing the keyboard works reliably,
at least through qcop. Perhaps this is one of the issues that the Opie team
has fixed. (Opie is a fork of Qtopia.)

Is there a compile-time option to control this behavior? i.e. could I build a
copy of libSDL that grabbed the keyboard?

No, you can’t but since I now have a working work-around for this, I
am going to add it. Note that it seems to work fine if you don’t use
fullscreen mode (for example). All my games work with the “grab right
before ungrabbing” workaround (but don’t work without it).–
[ Below is a random fortune, which is unrelated to the above message. ]
The soul would have no rainbow had the eyes no tears.

If you like VBscript, you should give a try to LUA.
http://www.lua.org/
see : http://www.lua.org/uses.html too

William

Tony Leotta wrote:>Hi Gang,

I want to build a bunch (like 3-4) games for a web-site I am creating…

I thought of using SDL…and creating some simple games that could be
cross platform…

Anyway…what I want to do is code most of the game logic using and
interpreter that way I can create more than one game using the same
engine…

Does anyone have any recommendations?

What you give me the best bang for the buck?

I like Vb Script…but that is Microsoft…what other language is as
nice as VB Script…but will run on different platforms…?

Also I need something that will export/import variables (marshal)
between the interpreter and C++.

Thanks
-tl
http://www.madscifi.com/

PS

VB Script has a nice way to declare Classes…

I wonder if PHP would work?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do You Yahoo!? – Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com

Matthew Bloch wrote:

I really like Lua. I’m using it as the scripting embedder for writing
events in our games.

I understand that the garbage collection method (mark and sweep) isn’t
great for games, but I really haven’t had a problem.

From experience: don’t ever use an automatic, garbage-collected runtime for
a game. I’ve spent many painful hours with Ruby trying to stop it from
messing up my frame rate and only partially succeeded, much as I love the
language for other jobs. Once you’ve built your foundation on such a runtime
there’s very little you can do about it when you notice your game jerks every
few frames. Mark and sweep garbage collection involves forgetting about
memory that you’ve allocated and every so often traversing an enormous tree
of pointers to reclaim some memory. If you don’t do it, or delay it much,
your program will run out of memory. Do it as often as the language wants,
and you’ll never get a consistent frame rate. There’s also nothing you can
do to interrupt it-- once the recovery algorithm starts it must run to
completion or start from scratch.

The simple way around that is to use static allocation. Just
pre-allocate all the structures you are going to use in advance, just
like in C/C++, and you won’t every see GC pauses.

After the initialization, do one force the GC to run to clean up the
memory footprint. Then, it you must use operations that generate
garbage at runtime monitor the growth of the heap and do a GC when it is
convenient, like when you pop up a dialog.

I’ve used this approach in Lisp and Java and it works very well. But, it
does require a great deal of discipline while writing the code.

	Bob Pendleton> On Monday 02 September 2002 03:13, Robert Clayton wrote:

Python uses reference counting to automatically free memory, and so the work
of reclaiming memory is spread evenly over execution, rather than
concentrated into long lumps as with GC. See:

http://www.gamasutra.com/features/20020821/dawson_01.htm

For how one software house’s story. This has been a public information
broadcast from someone who’s learnt his lesson with garbage collection and
games :slight_smile: I’d be intereseted to know if anyone has used a GC as the sole
storage solution for a game, or whether (as many people do) it’s just used as
a backstop between levels to tidy up loose ends.


±-----------------------------------+