Computer Science Canada Smoother Animation? |
Author: | Token [ Fri Feb 24, 2006 7:11 am ] | ||
Post subject: | Smoother Animation? | ||
Hey, i'm new to Java and i was just wondering if there was some sort of a offscreenonly mode. if not, then how do i make this animation smoother?
Thanks in advance! |
Author: | MysticVegeta [ Sat Feb 25, 2006 12:22 pm ] |
Post subject: | |
Why do I get an error: "Jordan Class" is either a misplaced package name or a non-existent entity. Anyways, you dont need a def method. since when you square it the negative difference will become positive but not vice versa. |
Author: | [Gandalf] [ Sat Feb 25, 2006 2:02 pm ] |
Post subject: | |
You would get that effect using Double Buffering. Don't ask me how to actually do it though. |
Author: | rizzix [ Sat Feb 25, 2006 2:04 pm ] |
Post subject: | |
This was brought up a couple of times.. Please refer to: http://compsci.ca/v2/viewtopic.php?t=3740 |
Author: | Token [ Wed Mar 01, 2006 10:36 am ] | ||
Post subject: | |||
Okay, I got it figured out and completely forgot about this post, but it keeps freezing every once in a while, both on my home computer and school computer. my teacher said that its java's fault, but i think that if i were to change the screen mode somehow it would work better because i read some stuff on diferent screenmodes, does that make any sence at all? and if it does how would i go about doing that? MysticVegeta: because I created my own class to store my commonly used methods so i wouldent have to recreate them or copy them over again. heres my new code
|
Author: | rizzix [ Wed Mar 01, 2006 11:51 am ] |
Post subject: | |
Instead of the delay method you got there, i suggest you use Thread.sleep(). It is a static method that has the same effect. While loops like that usually lead to 100% CPU consumption. Basically your program freezes. |
Author: | rizzix [ Wed Mar 01, 2006 12:07 pm ] |
Post subject: | |
java.net on smooth animation: http://today.java.net/pub/a/today/2006/02/23/smooth-moves-solutions.html |
Author: | evogre3n [ Wed Mar 01, 2006 6:40 pm ] |
Post subject: | |
rizzix wrote: Instead of the delay method you got there, i suggest you use Thread.sleep().
It is a static method that has the same effect. While loops like that usually lead to 100% CPU consumption. Basically your program freezes. Agreed with rizzix here, but I do find your method quite interesting. |