Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New script lang
Author Message
Danny Offline
Young User
*

Posts: 36
Joined: Nov 2009
Reputation: 0
Post: #1
New script lang
I've been working on a new script lang the past month and it's finished. Needs bug testing of course but so far not many problems at all.


I also would love it if someone would help me with the help wiki to accompany it, it's located at: http://pop3ai.dmkp.co.uk
One thing in particular that I cannot do myself, is create a logo for the wiki.

and you can get the scripter at: http://dev.dmkp.co.uk/?p=151


My aim was to make the language easier to type, easier to read and easier to understand. It's also more flexible in how you type it out.
It follows the C/C++ syntax rules, so more than one function can be typed per line if you want.
02-19-2010 03:44 PM
Find all posts by this user Quote this message in a reply
Storm Offline
Young User
*

Posts: 10
Joined: Nov 2009
Reputation: 0
Post: #2
RE: New script lang
impressive :o
02-20-2010 04:05 AM
Find all posts by this user Quote this message in a reply
DAroo Offline
Administrator
*

Posts: 326
Joined: Nov 2009
Reputation: 3
Post: #3
RE: New script lang
Good work with scripts compiler. Would be great if you could post here some screen from the code and explain what this code is doing. Some equivalent in alacn script would be also welcome to compare differences and eventual advantages of your scripts.

About a wiki - are you sure you need seperate wiki for it? There is one populous wiki hosted by popre and i think that informations about your scripts should suit there.

[Image: daroo.jpg]
02-20-2010 01:58 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Danny Offline
Young User
*

Posts: 36
Joined: Nov 2009
Reputation: 0
Post: #4
RE: New script lang
(02-20-2010 01:58 PM)DAroo Wrote:  Good work with scripts compiler. Would be great if you could post here some screen from the code and explain what this code is doing. Some equivalent in alacn script would be also welcome to compare differences and eventual advantages of your scripts.

About a wiki - are you sure you need seperate wiki for it? There is one populous wiki hosted by popre and i think that informations about your scripts should suit there.

Here's a simple comparison:
[Image: popscriptcomparisonz.jpg]

Syntax is more robust (i.e. each command can go on the same line if you really wanted) like:

Code:
if(iGameTurn == 0) { //do something
}
else {
set($some_var, fs);
}

every(1024) { set($ran_num, rand); }
I made it easier to type, no more REALLY_LONG_CAPITALISED_WORDS_SEPARATED_BY_ENDLESS_UNDER_SCORES!!
I renamed a lot of the vars too, they're shorter but still meaningful.
There are also some aliases for a few of the variables. i.e.: you can type "firestorm" or "fs". For the spell identifier for firestorm.

Attributes start with a small case 'a' and internal game vars start with a small case 'i'. Some of which also have aliases, like iRand100 can be typed as just rand.

I've also thought about adding in preprocessor stuff like in C/C++.
So you could create your own pseudo vars.
Like:
Code:
#define bcost iBlastCost
So it would then treat (after this has been read, not before) any instances of bcost, as iBlastCost. Might be more complicated to implement but it's a thought for later. For now, the set command can be set to these vars as an alternative. Like:
Code:
set($bcost, iBlastCost);


The aims I had for this project have mostly been fulfilled. (Robust, easy to read/understand etc). The other aim was to hopefully revive an interest in creating new SP maps. Will have to wait and see if this helps.

About the wiki: I have put a link in the app to that wiki, it's the documentation really. I don't much like Popre anyway, and would much rather not get it all muddled up on the popre wiki anyway.

Hope this helps!
(This post was last modified: 02-20-2010 04:06 PM by DAroo.)
02-20-2010 03:44 PM
Find all posts by this user Quote this message in a reply
DAroo Offline
Administrator
*

Posts: 326
Joined: Nov 2009
Reputation: 3
Post: #5
RE: New script lang
I've checked program and i have few suggestions to user interface. Tabs would be more comfortable than new window for each script:

[Image: tabsg.png]

"Do you wish to save.... ?" dialog shouldn't appear when script wasn't edited and it should contain filename. "Saved!" dialog is annoying. It doesn't allow to decompile scripts does it? Schouldn't option "build" be "compile & build" or "compile & save" ? Did you think about opensource license for this program or/and compiler library?

Apart from this it seems to work fine (didn't test compiled scripts in populous). About wiki - i'm considering seperate wiki for popms but first i'm going to talk with Inca. Keep in mind that wiki on the popre is hosted by popre but it's populous wikipedia not popre wikipedia. Wiki should be neutral so after few changes i think there would be chance to make this wiki 100% neutral. Inca is protecting this wiki from devastation so one wikipedia for all populous services would be also good for popre - less work for them.

[Image: daroo.jpg]
(This post was last modified: 02-20-2010 05:26 PM by DAroo.)
02-20-2010 05:17 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Danny Offline
Young User
*

Posts: 36
Joined: Nov 2009
Reputation: 0
Post: #6
RE: New script lang
Yeah there's some polishing to do with the saving of txt files Tongue

Not sure how to use tabbed interfaces, are there any libs for this? The tab control build into .net is ugly looking by itself anyway.


I included the Bullfrog scripts already decompiled. Didn't see any need to add an option to decompile others. :/ But I might add it to the menu for the next edition.

And a single wiki for all the Populous services would be nice yes, but the wiki for PopCScript is only for that.. if it were to be put into another wiki with other topics, things would be a mess!
Couldn't have a page about the various types of keywords, the functions, etc etc. Would all have to be in one page.
02-20-2010 05:33 PM
Find all posts by this user Quote this message in a reply
DAroo Offline
Administrator
*

Posts: 326
Joined: Nov 2009
Reputation: 3
Post: #7
RE: New script lang
Add possibility to open these compilled *.dat files and save as a *.dat . I guess this will be more logical and easy in use than some strange options like build / decompile. Do populous script files have some magic number to identify them?

It doesn't look like this program needs hundreds pages with documentation so why you want seperate wiki so much? Few pages about script syntax is not a problem i think. Single one would be definatly messySmile

[Image: daroo.jpg]
(This post was last modified: 02-21-2010 01:40 AM by DAroo.)
02-20-2010 10:15 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Danny Offline
Young User
*

Posts: 36
Joined: Nov 2009
Reputation: 0
Post: #8
RE: New script lang
Well I was more thinking about the wiki page that shows all the other pages.. picture this:

Bloodlust
Building Bridges
countAtMarker
convert
....
Solo
setReincarnation



So muddled! How do you know whether Bloodlust or convert are talking about just the spell in the game or the script identifier?
02-21-2010 01:52 PM
Find all posts by this user Quote this message in a reply
DAroo Offline
Administrator
*

Posts: 326
Joined: Nov 2009
Reputation: 3
Post: #9
RE: New script lang
What about script section on each spell description? Spells descriptions aren't too big so there is plenty space to add AI script informations and examples. Would be also handy to have sites dedicated only to scripts where these all hints will be displayed.

[Image: daroo.jpg]
02-21-2010 05:03 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Danny Offline
Young User
*

Posts: 36
Joined: Nov 2009
Reputation: 0
Post: #10
RE: New script lang
Has anybody tried out the scripter yet?
03-13-2010 03:12 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


Contact Us | Populous Mana Source | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication