Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Smooth Animations
Old
willy0227
Junior Member
 
Status: Offline
Posts: 8
Join Date: Jul 2016
Default Smooth Animations - 07-15-2016, 12:19 PM

I have been using loops for animations so far. The problem I see is that there is a delay between each time the loop runs. It seems like this is a timing issue with Alice, but maybe I am going about this the wrong way. How would I make this smoother if say I need a bird to randomly fly around the whole time the world is running?
   
Reply With Quote
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 212
Join Date: Dec 2012
Location: Frosno, Ca
Default 07-16-2016, 06:42 AM

Quote:
Originally Posted by willy0227 View Post
I have been using loops for animations so far. The problem I see is that there is a delay between each time the loop runs. It seems like this is a timing issue with Alice, but maybe I am going about this the wrong way. How would I make this smoother if say I need a bird to randomly fly around the whole time the world is running?
Create a method that makes the bird move the way you want it to and then at the top right of Alice create a new "when the world starts" event.
Right click on the event and change it to "while the world is running" and put your method it that event.


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
Old
willy0227
Junior Member
 
Status: Offline
Posts: 8
Join Date: Jul 2016
Default 07-18-2016, 11:34 PM

Thank you for the response. I tried that and it seemed to have the same delay as a loop. Am I missing something?
   
Reply With Quote
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 212
Join Date: Dec 2012
Location: Frosno, Ca
Default 07-20-2016, 01:35 AM

Two things come to mind.
The first is that almost every instruction has a duration which defaults to 1 second. You can change this to 0, which means as fast as possible.
The other thing involves using events. If there is a loop in the events code, get rid of it! The event will, assuming you are using the while the world is running event, automagically call itself whenever it can while the movie is running.

Without seeing the code those are my best guesses as to a fix.
Mark


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
Old
RavenOfCode
Senior Member
 
RavenOfCode's Avatar
 
Status: Offline
Posts: 408
Join Date: Oct 2013
Location: Northern Virginia
Default 07-21-2016, 04:06 PM

Try changing the style to sharp (I think thats what it's called, I haven't used Alice in a while).


Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
http://www.alice.org/community/showthread.php?t=10738&highlight=game
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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