# Who here is afraid of some typing?

I'm working out the details of Lithoclast's (My upcoming game engine, due in about 2 years... ) scripting language. I'd like to know if what I have so far seems reasonable to the dedicated game developers here.

The language - which I don't have a name for yet - has some C influence, but it uses reverse-polish notation rather than the algebraic notation most languages use. The reason for this is mostly for speed, but also for simplicity of implementation. (Particularly doing away with bothersome algebraic oddities like parenthesis and operator precedence while not giving up the ability to do things that would require them. )

If you don't know how RPN works: (url="http://"http://www.wikipedia.org/wiki/Reverse_Polish_Notation")http://www.wikipedia...Polish_Notation(/url)

The little bitty script below does something simple - puts the characters the player designed for their party (The number of which is up to the developer) into the starting world of the game. Please tell me you think you could handle it... (With a manual, of course...)
The // and open and close comments, { and } designate code blocks, and a ' tells the interpreter to store the top value on the stack in the variable marked with the '.
Commands have colons in them, so the interpreting can be much more efficient.
Hopefully the UBB won't mess this code all up...

---------------

``````// A Simple Game Initialization Script
Š 4/2003 Bryce Schroeder. Run only when there is a new game started.
The invisible construction object on the inital map we'll use for the coordinates is ID 42.
Remember, the scripting language is in reverse polish notation,
so that is why it may look funny to you. It is also somewhat whitespace-sensitive.

# 42 = Target_Object
// Defines a constant by replacing the text to the right to the text on the left in the code at compile-time.

# get:varible:int 1 . = Count
# set:varible:int 1 . = Count'
// Variables for scripts are all identified numerically, but since referring to them as 'get:varible:int 1' or
whatever would be confusing, you can give them names in the same fashion as constants are defined. At no
time should you think that the varible is actualy called by that name, as the compiler just subsitutes the original
text back in when in runs.

main
{

// Semicolons separate multiple augments, periods end a series of augments.
control:loop:for 0 Count'; Count get:init:CTotal <=; 1 Count + Count' .  // For Loop
{

get (img)http://www.AmbrosiaSW.com/webboard/redface.gif(/img)bjects:location:xyz Target_Object .
// Places the X, Y and Z coordinates on the stack

Count +
// Puts the current value of Count on the stack and then adds it to the previous number - our Z coordinate - and then puts the increased Z on the stack.

set:characters:location:xyz get:init:CMaker Count . .
// Reads the top three numbers off the stack - the ones we just put there - and sets the position of the character identified by CMaker to them.

} // Closes for loop
} // Closes main function

// The End result here will be our new characters lined up in a row along the Z axis next to our construction
object we used for positioning. It could do it in a fancier way, putting the characters in a square formation or
checking for walls in the way,  but it doesn't     (img)http://www.AmbrosiaSW.com/webboard/smile.gif(/img)
``````

------------------
Programming is an art form that fights back.
- Unknown

Where do you want to (url="http://"http://www.macclassics.com/cythera/tricks/rJade.htm")teleport(/url) today?

(edit) fixed formating to apease celchu.
(edits) Urrg! Formatting woes...
(edit) Urrg! Syntax error!...
(This message has been edited by Bryce (edited 04-08-2003).)

(This message has been edited by Bryce (edited 04-08-2003).)

(This message has been edited by Bryce (edited 04-08-2003).)

(This message has been edited by Bryce (edited 04-08-2003).)

(This message has been edited by Bryce (edited 04-08-2003).)

(This message has been edited by Bryce (edited 04-08-2003).)

(This message has been edited by Bryce (edited 04-08-2003).)

(This message has been edited by Bryce (edited 04-08-2003).)

(This message has been edited by Bryce (edited 04-09-2003).)

Naw dude, you gotta stick to algebra, it might be weird but
its all we know, besides all your doing is making your product
carry more baggage, the user gets to learn a new form of notation
that they'll likely never see again....

most of your users will range from the age of 12-13 and have
some experience with algebra as an 8th grader or soon to be HS freshma
n...(and possibly some limited/advanced exposure to HTML)

and not to make it sound like a mission of benevolence but it
would defnitely enhance the users math skills, and they can
thank you for giving them a practical head start.

(((If it won't derail you or if someone else with similar
intentions/ambitions is listening then it would advantageous to
make your system/coding a combination of HTML(4.01+ with CSS)
and C++....of course this might already exist, but i'm a purist, i keep
my basic, html and c++ separate.)))

Two other things it might be advisable to get a dev diary at idevgames...
perhaps set up a forum outside of this one...

Basically you're scripting scares the HeLL' out of me and its far away
from what i know and would introduce a conflicting auxillary thought
process to my already busy brain.
-----
I thought you were gonna come with something like Breezy GUI Java coding
high end objects capable of accepting numerous behaviors/refinements/classifications
------------------

... That staples it.
( EDIT ) Added line breaks

(This message has been edited by ellrx (edited 04-09-2003).)

Quote

Originally posted by ellrx:
**
-----
I thought you were gonna come with something like Breezy GUI Java coding
high end objects capable of accepting numerous behaviors/refinements/classifications**

Oh yes yes, don't worry, the langauge will have a graphical front-end. You probobly won't have to see any of this code, since the game engine will include many premade scripts and the aforementioned graphical editor.
Don't worry. I was just wondering if the actual scripting language was too intimidating in its present form. (evedently so). However, a hacker comrade of mine seems unworried. But he says the commands look hard to remember. At any rate, there will be a graphical editor, so don't you worry.

------------------
Programming is an art form that fights back.
- Unknown

Where do you want to (url="http://"http://www.macclassics.com/cythera/tricks/rJade.htm")teleport(/url) today?

Oh yes and I will be sticking to reverse polish notation, for the reasons mentioned in my post. But the graphical front-end should make it transparent to the user. And I'll look into that iDevGames journal thing.

------------------
Programming is an art form that fights back.
- Unknown

Where do you want to (url="http://"http://www.macclassics.com/cythera/tricks/rJade.htm")teleport(/url) today?

I have decided to make some chages to the syntax to make it more consistant and freindly.
Please move on, you didn't see anything here

------------------
Programming is an art form that fights back.
- Unknown

Where do you want to (url="http://"http://www.macclassics.com/cythera/tricks/rJade.htm")teleport(/url) today?

Bryce: You say this will have a graphical front-end. Will I as a developer be able to make my own scripts, like the one you have above? Because when I'm working on CS, I have a lot of "I wish this were more like C or Java moments." Especially with the global modifications.
Edit: By the way, your immense line of code, when put in a {code} tag, is messign with my formatting. Please fix.

------------------
A tomb now suffices for him for whom the world was not enough.

(This message has been edited by Celchu (edited 04-09-2003).)

Quote

Originally posted by Celchu:
**Bryce: You say this will have a graphical front-end. Will I as a developer be able to make my own scripts,
**

Yes, I envision a tabbed window where you have a simple graphical editor on one tab and on the other you can alter the raw code. Now, the graphical editor may not be able to read your code after you changed it, if you changed it in a way the graphical editor dosen't understand...

------------------
Programming is an art form that fights back.
- Unknown

Where do you want to (url="http://"http://www.macclassics.com/cythera/tricks/rJade.htm")teleport(/url) today?

Quote

Originally posted by Bryce:
** <snip>
**

To what extent will this code be similar to C, as that seems to be your primary language? The thing I'm most interested in is arrays; will these be included or easily programmable? (for someone with experience, I mean)

------------------
A tomb now suffices for him for whom the world was not enough.

Quote

Originally posted by Celchu:
snip(Celchu,1,2);

Yeah, C is my main language.
How similar? Well, it includes support for user-defiened local functions, and that sott of thing, but varibles are a little tricky. At present, all the local script varibles are stored in an array that is initalized at startup and cleared for each script. It's size can be defined by the developer, say 512 elements, but it can't change while the game is running.
As long as you only need a one-dimensional array, you'll be fine, but if you need 2d then you've got problems.
Can you explain why you need an array? It would stand a good chance of motivating me to implement a more flexible system for this.

------------------
Programming is an art form that fights back.
- Unknown

Where do you want to (url="http://"http://www.macclassics.com/cythera/tricks/rJade.htm")teleport(/url) today?

Quote

Originally posted by Bryce:
**I have decided to make some chages to the syntax to make it more consistant and freindly.
Please move on, you didn't see anything here

**

Btw, this change will involve making functions read their augments off the stack, rather than as statements following them.

------------------
Programming is an art form that fights back.
- Unknown

Where do you want to (url="http://"http://www.macclassics.com/cythera/tricks/rJade.htm")teleport(/url) today?

I think i need to speak up for the programer invilids in the room. my progroming experience extends to BASIC/RealBASIC and a bit of HTML. Consider if it isnt too late to give BASIC a bit of precident in the design, i read that block of...what is it...code?
its a nightmare. U need to think of everybody when u do this.

------------------
Humanity will crumble under tides of blood.

If you're deficient in coding skills then I'd think you'd correct the problem. I mean this project is 2 years away. Try looking at those old RoT code bases, or the Torque engine. Comparatively they're a quantum leap in complexity.

Now that being said, I have no grudge against the non programmer. Heaven knows that I have more to learn than I'd like. Yet in order to provide the necessary flexibility that the general public craves, intricate and detailed coding is needed. Now this doesn't mean that you can't provide some sort of RAD tools to shield the novice or save the user from doing the same thing over and over. HyperCard was actually pretty good at that IMHO. I'd just be concerned with that old adage about trying to please everyone.

Bottom line a learning curve will occur. Bryce have you looked at the Aleph One scripting language that the Folks at the Open Source Bungie group came up with? It's actually a lot like XML. It might give you some ideas about implementation for non coders.

------------------
-Joseph
"The Cruelest Lies Are Told in Silence"

(This message has been edited by joseph (edited 04-20-2003).)

(This message has been edited by joseph (edited 04-20-2003).)

Quote

Originally posted by joseph:
**Bryce have you looked at the Aleph One scripting language that the Folks at the Open Source Bungie group came up with? It's actually a lot like XML. It might give you some ideas about implementation for non coders.

**

Bryce will examine the possibility.

------------------
Programming is an art form that fights back.
- Unknown

Where do you want to (url="http://"http://www.macclassics.com/cythera/tricks/rJade.htm")teleport(/url) today?

perfect example, btw, i love the marathon series.
their mark up language is exellent and ez to use, the phfortran langage just as ez.
Just take a look the diff between pre aleph one marathon and marathon:rubicon.

------------------
Humanity will crumble under tides of blood.

Does anyone here know FORTH?
And can someone give me a link to a page on this Marathon scripting language? I'm a little busy and my internet connection is slow.

------------------
Programming is an art form that fights back.
- Unknown

Where do you want to (url="http://"http://www.macclassics.com/cythera/tricks/rJade.htm")teleport(/url) today?

From someone who knows nothing about coding:

Can you code on a mac the same as on a pc? I mean, if I want to learn coding, can I pick up any book on learning C and try it on my mac?

------------------
-- Debra
Danillitphil Productions

Quote

Originally posted by Debra:
**From someone who knows nothing about coding:

Can you code on a mac the same as on a pc? I mean, if I want to learn coding, can I pick up any book on learning C and try it on my mac?

**

For the most part, yes...however graphic routines will vary the most, and libraries will change, however if you select a book based on learning ANSI (insert programming language here) you'll have little or no problem going in between any tool/platform.

Other suggestion...CodeWarrior in general. MacZoop ...

------------------

... That staples it.

Thanks!

------------------
-- Debra
Danillitphil Productions