View Full Version : Question in PawnScripting pdf
DragonGirl
02-18-2008, 03:48 PM
I'm reading thru the PawnScriptingInLifeOS.pdf and I'm missing something.
I get to the section on "scripts" which describe the pawn script with a .p extension.
Then later looking at the sections on the VM there is a reference to a *.amx scripts, but
no clear definition of what those are.
I've gone and checked the Pawn documentation to find an AMX is the compiled script,
but I'm still not finding a full description of what it is on the CompuPhase website.
I assume it's buried in the pdf documentaton but I couldn't find it.
I did find a reasonable overview at:
http://www.sourcemod.net/devlog/?p=58
Tracking a little further it appears that AMX stands for Abstract Machine eXecutive
from wikipedia's explanation of AMX-Mod for Half-Life.
I'm still open for additional information that can be provided. Did I find the right info?
Feedack to the writers - it would have been a good idea to at give a short mention what *.amx was in the
script section of your document. Particularly when you went to the trouble of mentioning the .p extension.
Other than that the document appear reasonably straight forward.
Other than installing Python, I'm wondering if I should install the pawn compiler or hold off since it appears to be bundled with the pdk.
Are they likely to collide in evil ways?
Xasher
02-19-2008, 04:26 AM
It appears the AMX extension is the program once it has been compiled. Pawn is just a programming language that makes it easier for people to program in machine code. Once you complete your program Pawn has to compile the information into code that the IC chips in Pleo can understand. Kind of like a translater. I believe that the program with the AMX extension is the code once it is compiled before you flash it to the IC chip. I am not very familiar with Pawn but I have used a more popular compiler call PICBasicPro which is a language which allow you to program in a QBasic style language then compiles the information so that you can flash it to IC chips. It's a strange process but pretty simple once you've programmed a few IC chips.
I hope this helps, and if I seem to be talking below your level I apologize, I am unsure if you asking at a basic level or if you need a more advance answer to your question.:D
PleoPet
02-19-2008, 09:27 AM
As mentioned, .p files are source (edit with your favorite text editor), .amx files are binary (after compilation)
Pawn is a compiled and interpreted language (sort-of-like JAVA, but different)
Typically the AMX files are joined with the resources (sounds, motions etc) into one big PLEO.URF file. The Python scripts do that for you (you don't need to learn Python).
------
> I assume it's buried in the pdf documentaton but I couldn't find it.
There is a lot of detail on the compuphase website, most you don't need to know
http://www.compuphase.com/pawn/pawn.htm#DOWNLOAD_DOCS
Recommended : Gentle introduction, Language Guide
(the Implementer's guide describes the low level details, things you don't need to know)
------
> ...it is compiled before you flash it to the IC chip.
A minor clarification.
For most Pleo PAWN programming you will be saving programs (either .AMX or .URF) on the SD card. You won't be changing/flashing the IC chips inside the Pleo. That way programs are temporary and don't make permanent changes to the Pleo (ie. unplug the SD card, it will reboot and be back to normal)
------
> Other than installing Python, I'm wondering if I should install the pawn compiler or hold off since it appears to be bundled with the pdk. Are they likely to collide in evil ways?
No problems if you get started early.
My advice: http://forums.pleoworld.com/showthread.php?p=5885#post5885
(language only, no robot specifics, focus on 'printf' style examples)
Note: you don't need Python for the standalone Pawn programs. You run them on your PC directly.
DragonGirl
02-19-2008, 11:09 PM
Consider me 'a dangerous user'.... I know enough to be completely dangerous..... ;)
UgobeTyler
03-04-2008, 09:13 AM
As review, here are the resource types, their source format, and their output format:
Sounds: .WAV -> .USF
Motions: .CSV -> .UMF
Commands: .CSV -> .UCF
Scripts: .P -> .AMX
With our default build tools - written in Python - all of these resources for a project are listed in a Ugobe Project File (UPF). When the build tools process all resources, the result is the Ugoe Resource File - or URF. For Pleo, this is pleo.urf.
You may see a common extension naming here, except for the AMX. We kept the default extension that the Pawn compiler generates because: 1) USF was already taken by sounds, and 2) it allows any existing tools that work AMX to continue to work unmodified.
And to the original question of whether to install Pawn or not: it is not strictly required, since we bundle the needed compiler with our tools. And as PleoPet mentioned, installing the package from the CompuPhase site is a good way to become familiar with the Pawn language before the PDK is released.
On a side note: the Pleo 1.0 software is based on Pawn version 3.2. Future versions will likely use the latest Pawn 3.3 release.
Thank you,
Tyler
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.