🔒 Locked
Python too advanced?
Advertisement
Original Post
Reading an article in Game Programming Gems last night got me thinking about scripting languages. One major purpose is to allow artists and designers to quickly test out new ideas and tweak existing features. By using such a developed scripting language like Python, are we eleminating that use? Are we just heaping additional programming burden on the programmers, because we can''t offer a simple enough solution for the non-programmers?
I have not used Python before but was planning too when scripting becomes appropriate for my needs, so maybe I am overly thoughtful of its complexities. However, expecting the artists to become good programmers would require expecting me to become a good artist, and that''s not going to happen.
The Tyr project is here.
Yeah, I believe Python is too advanced for non-programmers to pick up instantly. But it also depends on what you want your artists and designers to archieve with the scripting language. If you expect them to write scripts for weapons or simple enemy logic, then they *have* to be able to program in some degree, no matter what the scripting language is. If that's too high of a demand, you might have to settle for a data-driven approach. I.e. by editing some simple attributes like
they could archieve at least something..
Okay, maybe what I said at first is a bit misleading. Python isn't such a hard scripting language when compared to other scripting languages, so if you plan to use a scripting language then Python is a good choice.
[edited by - civguy on March 20, 2003 5:59:52 PM]
weapon {
gunmodel = megablaster.3ds
reload_time = 0.4
particle_type = plasma
trail = sparkly
colourfulness = so_colourful_it_makes_my_eyes_hurt
heat-seeking? = no
bouncing = of_course
}
they could archieve at least something..
Okay, maybe what I said at first is a bit misleading. Python isn't such a hard scripting language when compared to other scripting languages, so if you plan to use a scripting language then Python is a good choice.
[edited by - civguy on March 20, 2003 5:59:52 PM]
I plan on using a Lisp (or maybe just a language based on Lisp) for my scripting language. Since I want the community to be able to easily create scripts for custom maps, I plan on writing a simple tutorial on it. I feel Lisp is an easy to understand language because it doesn't have so many different special cases like most languages do. There is basically one syntax for functions, and that is "(func arg1 arg2 arg3 arg4 ...)".
Since almost everything can be done with functions, the only other thing you need to know is the different kinds of data, like a number, list, array, and hash table. Structures are very simple to handle in Lisp imo, you can set the properties like
(setf ([type name]-[property] [variable name]) [value])
I'll probably make it in windows help-file format for easy indexing.
[edited by - Extrarius on March 20, 2003 6:42:26 PM]
Since almost everything can be done with functions, the only other thing you need to know is the different kinds of data, like a number, list, array, and hash table. Structures are very simple to handle in Lisp imo, you can set the properties like
(setf ([type name]-[property] [variable name]) [value])
I'll probably make it in windows help-file format for easy indexing.
[edited by - Extrarius on March 20, 2003 6:42:26 PM]
The important part is that the power doesn''t clutter the syntax.
Simple things are simple; the more advanced topics rarely (if ever) get in the way of the way the simple stuff works.
I''m hip because I say "M$" instead of "MS".
Simple things are simple; the more advanced topics rarely (if ever) get in the way of the way the simple stuff works.
I''m hip because I say "M$" instead of "MS".
Well, I don''t really think it''s that "advanced". There are certainly language features that are not obvious, but only rarely does this negatively affect anyone who doesn''t know about those features (unlike, say, C++ templates, which affect anyone who uses the STL).
Can you point out a language that is simpler for the kinds of people you want to use the language and the things they want to do with it?
Can you point out a language that is simpler for the kinds of people you want to use the language and the things they want to do with it?
All general purpose scripting languages are WAY too complicated for artists, designers to be using ... WITHOUT some form of framework, or limitations (even if they are implied).
If you have artists write standalone programs, learning all the modules and systax, you are wasting time and money ... if you take a little time to put a small frame (wrapper or some such) around the blocks of code the artist is going to write ... then they are MUCH less likely to make silly non-programmer mistakes.
For example ... if you ONLY ask your artists to subclass your actors and object, and provide a few examples ... and let them drop their custom code strait into a simple template which a programmer has made ... then 1 programmer day, can save 10 artist headaches. And if you let them type raw data into PLAIN-TEXT, or even XML data files, and then load that with some programmer written code (and PLEASE output good error messages which point to any formatting bugs), then the artists and designers can use spreadsheets and third party tools, to be enourmously productive.
(I''m hip because I know MS mean Multiple Sclerosis)
If you have artists write standalone programs, learning all the modules and systax, you are wasting time and money ... if you take a little time to put a small frame (wrapper or some such) around the blocks of code the artist is going to write ... then they are MUCH less likely to make silly non-programmer mistakes.
For example ... if you ONLY ask your artists to subclass your actors and object, and provide a few examples ... and let them drop their custom code strait into a simple template which a programmer has made ... then 1 programmer day, can save 10 artist headaches. And if you let them type raw data into PLAIN-TEXT, or even XML data files, and then load that with some programmer written code (and PLEASE output good error messages which point to any formatting bugs), then the artists and designers can use spreadsheets and third party tools, to be enourmously productive.
(I''m hip because I know MS mean Multiple Sclerosis)
quote:
Original post by Extrarius
I plan on using a Lisp (or maybe just a language based on Lisp) for my scripting language. Since I want the community to be able to easily create scripts for custom maps, I plan on writing a simple tutorial on it.
From what I've seen, people seem to have an aversion to functional programming. It doesn't follow sequential paradigm of imperative languages, which maps more easily to real life. Also the whole XML-ish "the program is a tree structure" and relatively high conceptual overhead make it less than ideal for "the community." Don't let your personal enthusiasm for the language complicate the situation for your intended end users.
Remember, people are much more familiar with imperative languages (eg javascript) or simple markup (eg HTML, XML); playing to their strengths increases ease and thus rate of adoption.
quote:
I feel Lisp is an easy to understand language because it doesn't have so many different special cases like most languages do. There is basically one syntax for functions, and that is "(func arg1 arg2 arg3 arg4 ...)".
Compare (Python):
def func( arg1, arg2, ...argN ):
function body
Keep in mind that many programmers (even) find Lisp's "excessive parenthesization" irritating. It'll definitely lose non-technical users.
quote:
Structures are very simple to handle in Lisp imo, you can set the properties like
(setf ([type name]-[property] [variable name]) [value])
Compare x = y. You lose.
Note that I'm not knocking Lisp. I actually like the language (I've used ProLog as well). I'm simply saying that additional complexity (even if only in the initial stages) can be quite off-putting to a non-technical audience, if that's your target.
[Edit: Python is whitespace-delimited. Forum swallowed my spaces.]
[edited by - Oluseyi on March 21, 2003 4:27:36 AM]
quote:
Original post by the Speed Bump
The important part is that the power doesn''t clutter the syntax.
Having no experience with Python, this is one of the things I was wondering. Good to know.
quote:
Original post by Flarelocke
Can you point out a language that is simpler for the kinds of people you want to use the language and the things they want to do with it?
Basically, waht I was getting at was whether to use a well established albeit generic scripting language, or whether to write my own specific yet funtionally limited scripting language. A scripiting language written specifically for the game would be simpler, and would be geared more towards allowing the non-programmers to make uncompiled changes easily.
I think that based on everyone''s (very helpful) posts, it may be best to use an established language such as python, while also creating special case frameworks (from the primary scripting language) that allow the non-programmers to accomplish specific tasks.
The Tyr project is here.
I fail to see how anybody can call python complicated. I moved on from gamemaker aplications and went to python when I was 13. I have never had any trouble undersatnding any of it, and am now capable of writing fairly decent games in python (with the use of pygame of course).
If a 13 year old can handle it, it should be easy for anybody with more brains than a chimp. Sorry if that sounded like an insult, it was not. It was more a statment.
If a 13 year old can handle it, it should be easy for anybody with more brains than a chimp. Sorry if that sounded like an insult, it was not. It was more a statment.
quote:
Original post by Shylock
I fail to see how anybody can call python complicated...
Your perspective is skewed. Is it easy for a programmer? Yes. Is any scripting language fairly simple for a programmer? Yes. Is it easy for someone who has aboslutely no interest or background in programming whatsoever? Probably not. Is it a waste of time to teach someone with no interest or real need how to use it effectively? Probably.
You are taking the perspective of someone who is interested in that aspect of games creation. The entire point is to analyse its value as a tool for those whose job is NOT to program.
The Tyr project is here.
By definition, I don''t think you''ll ever find a programming language for non-programmers. What you might find is a language that is designed to be quickly learned by people with no experience. I think Python might fit the bill, especially if you provide a good interface - which means "don''t just map your C++ functions into Python functions and hope for the best". Also the provision of several heavily-commented examples will help ''non-programmers'' see what can be achieved quite quickly.
[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
quote:
Original post by OctDev
Basically, waht I was getting at was whether to use a well established albeit generic scripting language, or whether to write my own specific yet funtionally limited scripting language. A scripiting language written specifically for the game would be simpler, and would be geared more towards allowing the non-programmers to make uncompiled changes easily.
And would be a non-migratory skill. As much as possible, use tools and techniques that can be transferred to other projects, other groups and other establishments. That way, people working with you are also acquiring broadly useful skills.
Oluseyi: From what I've seen of the WarCraft 3 community, the people trying to create scritps don't have any kind of programming knowledge at all, so I don't have to worry about 'bad habbits' =-) I'll probably create a GUI something like ActionScript for Flash (not the advanced mode), where it autoformats everything to make it nice and readable and has all the functions in a nice categorized list to make finding them easy. I might go so far as to create a GUI like the world editor of warcraft 3 where you pick functions from a dropdown and each argument is a 'hyerperlink' that lets you pick what goes in that blank, but I'm not sure how to make it easy to use (the one for WC3 is only easy to use for simple statements, because there is no way to quickly copy only portions of a statement, so if you need to create a formula ((((X+5)*3)/Y)+7) (which is how it ends up looking because it puts parens around each op), it takes 9 clicks for each place you need it (plus picking the variables from a list and typing in the numbers) and you must recreate it each time you need it (though if its just being stored in a variable, you can copy that entire action).
[edited by - Extrarius on March 21, 2003 8:43:28 AM]
[edited by - Extrarius on March 21, 2003 8:43:28 AM]
quote:
Original post by Oluseyi
And would be a non-migratory skill. As much as possible, use tools and techniques that can be transferred to other projects, other groups and other establishments. That way, people working with you are also acquiring broadly useful skills.
Keep in mind that I am haven''t used Python, and am going off of the seeming consensus of above posts...
I agree and disagree
You could also argue that you are establishing a migratory skill for your script engine implementing programmer, rather than attemtping to establish a migratory progamming skill for your artists.
I also assume it would probably take 1/10 the time (by the end of the project) for 1 programmer to implement the needed systems than it would take to train the artist and then later drop eveything to help them when they are stuck. I would say that this is roughly per artist as well, so multiple artists is going to add to this alot. While it is always good to invest in your employees/team members, this becomes ridiculous. It is also unlikely that you will have the same artist 10 projects from now, so there is no payoff.
So it seems to be a non-benefit to train the artists any more than is necessary, concerning programming. Now, if it was a modeling technique, or something to do with their specific profession, I would wholly agree.
It isn''t the facilities available, but rather then facilities the user is required to use. As a general rule the users would only create new types of objects because A) you failed to do it for them; and B) you integrated scripting in such a manner that requires them to write large complex scripts. If all they need is a couple of if statements and a couple of function calls why would they use the full facilities and capabilities of python? You are right to not want to impose a burden upon the user, but you do that by insuring they can write small scripts to accomplish the vast majority of tasks they are likely to need to perform.
I just thought I''d note that the latest boost has just been released and Spirit is now a part of it.
quote:
Spirit is an object-oriented recursive-descent parser generator framework implemented using template meta-programming techniques. Expression templates allow us to approximate the syntax of Extended Backus-Normal Form (EBNF) completely in C++.
quote:
VC7- don't support
there are always free alternatives, or you can upgrade when vc7.1 comes out.
[edited by - petewood on March 21, 2003 8:03:31 PM]
I've tried bloodshed (have to use it at school in one of my classes), and it was really buggy. If you put a block comment in a member function, it would cause an error and abort compilation. The IDE also feels messy, and so far I like .Net except for the lack of partial template specialization.
[edited by - Extrarius on March 21, 2003 12:46:38 AM]
[edited by - Extrarius on March 21, 2003 12:46:38 AM]
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement