x


Why Script in Boo?

As most of the community does most of its scripting in Javascript and C# and Boo apparently will not work on android or iOS, why would anyone want to script with Boo?

What are its advantages because i couldn't find any in the documentation.

more ▼

asked Feb 25, 2012 at 04:21 PM

aliakbo gravatar image

aliakbo
385 43 40 45

Preferences?

Feb 25, 2012 at 04:40 PM OrangeLightning
(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

If you use MonoDevelope with Boo already, have a library of utility functions built up, and want to "port" onto a 3D platform.

[edit] You don't use Boo, but find something written in Boo (not necessarily for Unity) which you would like to borrow. [/edit]

Huge advantage Unity has over, say, Unreal. Just probably doesn't apply to you. I believe the MonoDevelope project supports Boo, so the Unity team gets Boo support virtually for free, and why not leave it in?

more ▼

answered Feb 25, 2012 at 05:55 PM

Owen Reynolds gravatar image

Owen Reynolds
22.3k 2 8 73

(comments are locked)
10|3000 characters needed characters left

I chose Boo over JS/C# for the same reason Python won over other languages: readability, conciseness, functions, even though it was a OO-based language, and data structures.

Being concise means that the language tries as much as possible to get out of your way of writing programs and help you in presenting an idea. In Boo, I don't have to care about what the language does most of the time, except during implicit changes done by the compiler. I just write the scripts and watch my objects go alive.

C# is a well-developed language but the huge dependence on .NET sometimes just can be horrible. I just want to use a hash table for quick access, but in C# I have to import a lot of other things, to make it work.

In boo, I can do this

#State variable
state={}
state["motion"]="forward"
state["on the ground"]=true
state["speed"]=10

if state["motion"]=="forward" and state["on the ground"]==true:
    self.rigidbody.velocity=Vector3(state["speed"] as double ,0,0)

Anytime I want to call the variables out. I wonder how easy is it to use this in C# or JS.

Another thing about Boo is that code samples from other languages can be readily converted, often with line reduction and clearer and cleaner syntax.

The only downfall of Boo is the class declaration. Is it really needed for a constructor function(among other things) instead of a good ol' def init()? Boo sometimes tries too hard to be like other .NET languages, I guess?

more ▼

answered May 19 at 10:02 AM

Shadowys gravatar image

Shadowys
46 2

(comments are locked)
10|3000 characters needed characters left

Boo has a syntax similar to Phyton, so I guess it's the preferred choice of the Phyton programmers. However, there are a very few example and little documentation in this language, therefore it's better to stick with unityscript and c# generally.

more ▼

answered Feb 26, 2012 at 12:04 AM

Talas21 gravatar image

Talas21
36 6 4 5

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x8812
x106

asked: Feb 25, 2012 at 04:21 PM

Seen: 7178 times

Last Updated: May 19 at 10:05 AM