Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Works-In-Progress (http://www.alice.org/community/forumdisplay.php?f=14)
-   -   Collision detection engine (http://www.alice.org/community/showthread.php?t=3994)

zonedabone 02-20-2011 07:23 PM

1 Attachment(s)
Alice does not compile code before runtime, so it actually does have go process the comment to know to skip over it. In a language like C, the comments are completely removed before the code is compiled into assembly. In python, bytecode is generated for each command and comments are ignored, and then the code is run, so the only performance drawback is when the file is modified. Remember that alice isn't exactly a programming language that you'd expect. It's all executed in an unorthodox way. Also, it's interesting to note that disabled tiles are not time consuming. Please try running this world for an example of what I mean. I guarantee that I didn't make the comment loop longer. It's because of the comments!

arty-fishL 02-21-2011 11:32 AM

1 Attachment(s)
Thats interesting. Check out this one that includes the speeds of python.

reuben2011 02-21-2011 06:16 PM

That's interesting. However, I think deciding between efficiency and proper documentation is something that one shouldn't have to decide, for I think proper documentation shouldn't affect efficiency. Maybe they should do that for Alice 3.0, take out the comments before runtime.

zonedabone 02-22-2011 03:15 PM

Because of the way that the alice core command base is written, it would create even more overhead to do something like that, because you have to create a cop of the entire method structure. (Arty knows what I mean) Of course, this is 500 comments, so there is very little overhead. (Just over .01 seconds) As long as you don't use comments in endless/very long loops that do short things like change a variable fast, you won't get much overhead.

beachbum111111 05-17-2011 11:04 AM

Bump

cpking1 05-17-2011 02:46 PM

Help!!!
 
1 Attachment(s)
First, I'm new to Alice and don"t know much, so please don't be made cuze i'm doing it all wrong.
I have got a problem: why doesn't my collision detector work. it work for a couple of tries, but then sudenly it failed.
Please help me out here!!:confused::o

Oh i loved the collision engine and stuff (don't get it all but still:D)

Cpking1

The flying Dutchman

jediaction 05-17-2011 05:05 PM

Zone has not been on in a while, would you like some one else or me to help you?

cpking1 05-18-2011 10:00 AM

1 Attachment(s)
I don't care who helps if some one please helps me:confused:
O and I have got an other one same story.

I would be real greatfull for any kind of help:)


CPKing1

The Flying Dutchman

jediaction 05-18-2011 10:18 AM

I will look at this when I have time. Sorry

cpking1 05-18-2011 10:33 AM

does not matter at all

thanks


All times are GMT -5. The time now is 12:40 AM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.