| Intro Blather Updated 15 May 2002 | Upper levels: - QuArK Information Base - 3. Advanced customization - 3.5. Plug-Ins - 3.5.1. Plugin Tutorial

3.5.1.1. Intro Blather | [ Prev - Up - Next ]

I'm not sure what the prerequisites for this tutorial really are in terms of previous programming experience; some experience with `Object Oriented Programming' will help, on the other hand, messing with Python is a good way to acquire such experience (definitely a kinder and gentler start than C++). So why not give it a go! If you're a reasonably experienced programmer, you can probably learn enough python by concurrently browing the Python tutorial that comes with the Python distribution, but if you're a newbie, you'll probably want to study a book about Python first (suggestions in 'Learning Python'). This tutorial is not to teach programming, but rather to make up for inexperience and general lack of talent at figuring out how OOP program work; it's based on my first asking Armin lots of questions about how to do things and writing up the answers, and later on seeing how he revised things I had written. It would be fair to say that the Three Commandments are Ask, Imitate and Experiment. In addition, since QuArK is after all a program for manipulating 3D geometry, some kind of grasp of 3D math concepts such as normal vectors and dot products is likely to help, tho there are certainly things you can do without knowing anything about that kind of stuff. I might try writing up a quickly intro to Object-Oriented Programming and QuArK-relevant 3D-math, if I got some indication that this would be helpful. If you've done a bit of programming & want to dive right in, without reading anything at all about Python first, it might be useful to know that Python uses `whitespace formatting' for grouping, rather than brackets: all the statements in a block after an if-statement should be indented further back than the if-statement, and by the same amount. It might also be helpful to know that Python objects and data structures are much looser than those of of C/C++, so you can add new fields to anything whenever you want to, without having to mess around with declarations. And of course you will need to consult 'QuarkX', the guide to the facilities that Delphi provides for Python. This is certainly not an introduction, but does present all the basic facilities that QuArK provides to the Python code, and as you get more experience writing plugins, you will be able to figure out more just by browsing it. Don't worry if it seems like a completely impenetrable thicket at first! And if you get stuck or think you've found a mistake (it's been done before :)), don't hesitate to post a query to the QuArK-Python discussion list, or email directly to tiglari@hexenworld.net.

GNU General Public License by The QuArK (Quake Army Knife) Community - http://www.planetquake.com/quark | [ Prev - Top - Next ]