POV-Ray : Newsgroups : povray.general : Scripting guidance : Re: Scripting guidance Server Time
6 Aug 2024 02:26:25 EDT (-0400)
  Re: Scripting guidance  
From: Hugo
Date: 19 Jun 2002 18:07:34
Message: <3d1100a6$1@news.povray.org>
I'd recommend using proper indention, put comments before each block of
code, and use descriptive variable names but not with very long names,
instead write additional comments to describe their use.

Some people write a lot of empty lines, or nearly empty lines, but I don't
recommend you do that. On the other hand, lines can become too crowded with
keywords or several brackets. Try to find a golden 'middle way'.. (Is that
proper english?)

I also recommend that you try to declare many variables for your objects,
when ever possible. It's easier to change the overall size, thickness or
roundness for a complex object ,when it was build around a set of variables,
instead of putting the numbers directly into the code.

Another advice would be to declare the variables in 'clusters'.. I mean,
instead of having them spread around the script, collect them next to each
other.. Then it's easier to find them later.. Similar with #include files:
put them in clusters when possible.

Enough now.  :o)
Regards,
Hugo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.