Btw, thanks for all your answers to far ;)

> I have no idea. What language? Using system() in C and Perl, I'm
> sure you could concoct something. Why would you want to do that?


A move recently being made by game programmers has been to move an
increasing amount of work into a scripting engine. My idea is to jump ahead
of the slow move, so that the program is far more abstracted.

The program, written in C/C++ (or Java, or any language really), is
basically turned into a dumb bot. It's a mindless intermediary. The outer
layer is the Display Engine, which could be a Quake Engine or an MFC style
GUI, which takes all of it's commands from the intermediary layer.

The final layer is the scripting engine. In the script if a move_elevator()
function is called, the script interpreter bundles up some commands and
passes it over to the intermediary layer. The intermediary looks at the
display engine, figures out what commands must be called to fufill the
wishes of the script, and passes over the commands.

This would allow the vast majority of the real "content" of a game or
application to be written in a scripting language, much like web apps are
now. The script would run just as well on Linux as it would on windows.

The intermediary understands the universally written script, and figures out
how to actually do what the script asks it to. So an entire application
could be written to run using OpenGL, DirectX, and a selection of different
engines. So you could switch from using a Quake engine to a Midtown Madness
engine for maximum effectiveness, only by tweaking the intermediary level.
Since there are only so many ways to "rotate camera", code could be reused
to the point that the intermediary level comes packaged with all it needs to
know. And thus the sheer amount of people who have the ability to run such
applications skyrockets.


The creators of the Dark Forces star wars game (correct name?) created a
specific programming language for doing things like moving elevators,
dialog, etc. Now adays everyone has their own script.

Asheron's Call has their own little internal quest scripting, and Ever Quest
made their own, Doom has one, Daggerfall has some, et al. But why go to the
trouble of making a whole stinking language, reinventing the wheel, when
thousands of people have spent years to develop a versitile and extensible
scripting engine in PHP?


Anyway, that's my idea. I'd just be happy to outsource some of my C++ work
to PHP. If I use MFC, goodbye platform independence. If I don't use it, it's
a huge pain in the butt to do heavy string manipulation. So I figure, why
not just have PHP do it, since I already know the language?



--
Plutarck
Should be working on something...
...but forgot what it was.



"Brian Clark" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Plutarck,
>
> @ 2:40:28 PM on 4/14/2001, Plutarck wrote:
>
> > Ahh, so it's the location of the script that get's passed.
>
> Yes:
>
> % cat test.php
> <?php
>
> while(list($i,$arg) = each($argv))
> {
>   print "$i: $arg\n";
> }
>
> ?>
>
> % php -q test.php a b c d e f g
> 0: test.php
> 1: a
> 2: b
> 3: c
> 4: d
> 5: e
> 6: f
> 7: g
> %
>
> > Now, if the script was coming from a program, is there a way to hand the
> > file directly to PHP, or will a temporary file have to be used?
>
> I have no idea. What language? Using system() in C and Perl, I'm
> sure you could concoct something. Why would you want to do that?
>
> > So if a user filled in a form and clicked a button in the program, the
> > program would toy with the form a little, then send the form to PHP. Is
that
> > possible using the CGI executible?
>
> I have no idea what you're talking about here, but if you're wanting
> to build some type of GUI based application you might as well either
> use PHP-GTK (http://gtk.php.net) or just use a HTML, PHP and a web
> server.
>
> -Brian
> --
>  PGP is spoken here: 0xE4D0C7C8
>  Please, DO NOT carbon copy me on list replies.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to