TransLISP: best way to get started?
- pixelfck
- Militia Captain
- Posts: 571
- Joined: Tue Aug 11, 2009 8:47 pm
- Location: Travelling around in Europe
I can see where the question comes from, and I agree that it would be most useful if there was a tutorial on tLisp. Yet, it is not easy to come up with a tutorial that gives a meaningful introduction to the scripting in Transcendence.
The thing is, your question:
From the above you may conclude that I try to demotivate you, but that is certainly not the case! I would love to see more people learn scripting, it is just difficult to come up with a tutorial that would be a) 'short' enough to work through b) good enough to actually get you going.
In the absence of a tutorial, maybe the best method to get started is think up something and start wrestling with the code. Whenever you are stuck (which happens *a lot* at first) ask people at the forums for help and explanations and we will try to help you out.
Cheers,
Pixelfck
The thing is, your question:
basically boils down to:bzm3r wrote:could you write a little about the best way I could go about getting myself acquainted with TransLISP?
Or, flipping the issue on its side: if you learned to script in tLisp, you learned a skill that will help you a lot when scripting in javascript, php, ruby, asp.net, etc.could you write a little about how to learn computer programming?
From the above you may conclude that I try to demotivate you, but that is certainly not the case! I would love to see more people learn scripting, it is just difficult to come up with a tutorial that would be a) 'short' enough to work through b) good enough to actually get you going.
In the absence of a tutorial, maybe the best method to get started is think up something and start wrestling with the code. Whenever you are stuck (which happens *a lot* at first) ask people at the forums for help and explanations and we will try to help you out.
Cheers,
Pixelfck
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
Transcendence uses a home-brew version of Lisp that we call TLISP or TransLISP (there is actually another programming language called TransLISP out there not made by George, they are not linked in any way)
TLISP is based on Lisp fully parenthesised syntax, syntax validity is not whitespace dependent.
To write code with TLISP you need to know a generic introduction on Lisp syntax:
all the code is written in Polish notation:
so 3+2 = 5 would be written as:
(+ 3 2)
returns 5
This is probably one of the most important pages of the wiki that explains game related terminology and code structure:
http://transcendence.kronosaur.com/wiki ... ion/legend
The most important ones for starting out are probably Game Object References. Those will allow you to manipulate actual game objects.
2 hardcoded game object variables that are fundamental are gPlayership, that will always point to the player spaceobject (the ship) and gSource that will always point to the spaceObj that is calling the code.
The full list of available functions to use in TLISP is here:
(I have to update it, like usual )
http://forums.kronosaur.com/viewtopic.php?f=8&t=6453
The best way to start coding some TLISP is to download some old simple mods from Xelerus:
http://xelerus.de/
Get some syntax highlighting for LISP to help you read the code. Modders use various programs like Notepad++ or VIM.
I use jEdit and I have my own SH (originally made by alterecco, kudos to him!): http://forums.kronosaur.com/viewtopic.p ... 819#p53819
TLISP is based on Lisp fully parenthesised syntax, syntax validity is not whitespace dependent.
To write code with TLISP you need to know a generic introduction on Lisp syntax:
all the code is written in Polish notation:
so 3+2 = 5 would be written as:
(+ 3 2)
returns 5
This is probably one of the most important pages of the wiki that explains game related terminology and code structure:
http://transcendence.kronosaur.com/wiki ... ion/legend
The most important ones for starting out are probably Game Object References. Those will allow you to manipulate actual game objects.
2 hardcoded game object variables that are fundamental are gPlayership, that will always point to the player spaceobject (the ship) and gSource that will always point to the spaceObj that is calling the code.
The full list of available functions to use in TLISP is here:
(I have to update it, like usual )
http://forums.kronosaur.com/viewtopic.php?f=8&t=6453
The best way to start coding some TLISP is to download some old simple mods from Xelerus:
http://xelerus.de/
Get some syntax highlighting for LISP to help you read the code. Modders use various programs like Notepad++ or VIM.
I use jEdit and I have my own SH (originally made by alterecco, kudos to him!): http://forums.kronosaur.com/viewtopic.p ... 819#p53819