Knuckle Cracker

Particle Fleet => Map Makers, Ship Builders, and Coders => Topic started by: bluebolt on October 03, 2016, 06:07:21 PM

Title: PRPL coding
Post by: bluebolt on October 03, 2016, 06:07:21 PM
Where should I begin to learn PRPL? The wiki isn't finished yet, but I want to get started ASAP
Title: Re: PRPL coding
Post by: Sorrontis on October 03, 2016, 06:13:38 PM
Hi bluebolt.

Many of us are working figuring out everything, and we plan to start adding to the wiki.
If you have some experience with CRPL, I would advise you to extract PRPL from the Main Mission maps, and try to learn what virgil did from there. Also, look at any Planetfall maps for intensive PRPL.
Title: Re: PRPL coding
Post by: Prof on October 03, 2016, 07:15:33 PM
Quote from: Sorrontis on October 03, 2016, 06:13:38 PM
I would advise you to extract PRPL from the Main Mission maps, and try to learn what virgil did from there.

After looking through the wiki I saw the 'examine map resources' but couldn't actually find how to.. find.. the Main Mission maps to examine them. Is there an easy way that I just can't seem to find?
Title: Re: PRPL coding
Post by: Sorrontis on October 03, 2016, 07:21:42 PM
To extract. Take your save.pf1 for that mission and place it in a new editor map folder.
Title: Re: PRPL coding
Post by: bluebolt on October 04, 2016, 01:53:05 PM
I do not have a background in CRPL, i want to know the basics of whatever language this is(i'm assuming CRPL and PRPL are versions of a language).
Title: Re: PRPL coding
Post by: Sorrontis on October 04, 2016, 02:05:01 PM
Hi Bluebolt. CPRL/PRPL are languages used for Creeperworld & Particle Fleet (respectively). My understanding is that Virgil made them for these games specifically. They use the Reverse Polish Notation (https://en.wikipedia.org/wiki/Reverse_Polish_notation).

Here is the introductory guide to CRPL. PRPL has the same syntax, but some new functions.

Overview to CRPL: http://knucklecracker.com/wiki/doku.php?id=crpl:overview
Tutorial to CRPL: http://knucklecracker.com/wiki/doku.php?id=crpl:crpltutorial
Title: Re: PRPL coding
Post by: GoodMorning on October 04, 2016, 07:11:31 PM
PRPL Wiki: Coming Soon*


*"Soon" here being defined as sometime after those with wiki admin powers have time to restructure it and the rest of us have time to build it. Current estimates range from this afternoon to shortly after the heat death of the universe.
Title: Re: PRPL coding
Post by: Oblivion on October 04, 2016, 07:52:53 PM
Good thing that nothing will ever happen again after the heat death of the universe, and the wiki getting updated will be the first thing to ever happen in a new universe.
Title: Re: PRPL coding
Post by: GoodMorning on October 04, 2016, 09:04:26 PM
Not quite:
Wiki completion can be assumed for all commands at that point, as there will be exactly zero commands implemented.
Title: Re: PRPL coding
Post by: bluebolt on October 04, 2016, 10:12:30 PM
In that case, how would i go about making a laser turret? I think the best way currently would be having a particle beam in the center of said turret, hidden... I guess I could wait for the code to be categorized and make more map outlines. Thanks for the help so far.
Title: Re: PRPL coding
Post by: GoodMorning on October 04, 2016, 10:28:30 PM
Laser turret:
Images: Turret, beam, "gun" (optional)

GetEnemyUnitsInRange (or some relative). Pick closest target, position beam image, deduct health until it moves out of range or is destroyed. Retarget and repeat. If no target, make beam invisible.

The only changes in PRPL (from CRPL) for this will be in the target finding code and the syntax for health deduction.