First thoughts on PRPL environment.

Started by GoodMorning, September 23, 2016, 10:23:00 PM

Previous topic - Next topic

GoodMorning

Having come straight from the CRPL scripting environment, I am feeling the change. Sadly, some of it is backward.

The features that are not yet "mature":
1. Debug/trace window:
-"Clear" button has no effect.
-Window fills rapidly when I attempt to debug.
-I suggest CRPL-style trace windows, auto-hidden while not in editing mode. These to be in addition to the existing panel. GlobalTrace to write to the central panel. Alternatively, allowing the debug window to be extended would help.

2. Script list does not update to show new script in the folder until the panel is refreshed, again unlike CW3.

3. The "N" key allows time to pass while Cores think that pause is active.

4. The entire interface feels cramped on my screen (1366x768). If I am reading script-related text, the odds are that I do not need sixty-plus percent of the screen to be showing the map.

5. I'll request this now, while I'm making requests and suggestions: A UID-showing mechanism, for use in-game. Perhaps not for particles, but for anything selectable, perhaps left of the menu panel.

I won't ask for the docs, because I know they're coming, but it is ... difficult ... to write scripts without knowing what the commands will achieve or require.

As a language, PRPL is a jump up from CRPL, but the editor and environment need fine-tuning.


In the interim:
Could someone who has access to the PRPL docs please instruct me on the arguments that the SetParticlePosition command uses? The wiki currently has the following:
Spoiler


case STATEMENT.SETPARTICLEPOSITION:
                    f2 = GetFloatFromStack(); //y
                    f1 = GetFloatFromStack(); //x
                    i1 = GetIntF

No, that isn't my copy/paste truncation, it is what the wiki page has.

Notation:
i1 i2 f4 f3 f2 f1 –
[close]
A narrative is a lightly-marked path to another reality.

knucracker

SetParticlePosition(UID x y) where x and y are pixel coordinates.

For debugging there are now these commands (along with the old trace commands).
PRINT, PRINT2, PRINT3, PRINT4, PRINT5, PRINTALL, PRINTALLSP, PRINTSTACK,

The prints are the same as Trace statements, but append to PRPL.txt file in game's dir ("c:\Users\USER\Documents\My Games\particlefleet\PRPL.txt"  on windows).

I like to constantly 'tail' the log file.  I use baretail from here:
http://www.baremetalsoft.com/
But there are other options, including just loading the log file in any editor or file viewer.

As for #2, the script list, if you are talking about the list of scripts I always just hit "compile".  If I have copied a script into the scripts dir manually, I have to compile it anyway.

For #3, give me more detail on that or a simple way to reproduce it and I'll be able to take a look.


GoodMorning

Thanks for that. I'll see about creating a script which will show the behaviour reliably. (And if I can't, that's one of the easiest fixes to any problem: discover that it doesn't exist)
A narrative is a lightly-marked path to another reality.

GoodMorning

#3
I've found a script combination, which this map shows. To demonstrate, pause. Take one "LASERSWORD" ship (provided), wait for the blade (particle grid), and then command a movement. Turning is what I used, but any movement will do. Pressing "N" repeatedly, the ship will move, the particles will not. Unpausing, the particles will move.

If no blade shows after a few seconds, recompile, as I haven't fixed that one yet. Alternatively, rebuild the ship.

Blade particle life is finite.

Hope this helps.

Edit: Updated the script, it should work as expected now, save for the issue. The energy comes from the global store, however, as I don't know of a ship energy API...
A narrative is a lightly-marked path to another reality.