Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing Animation Demo with Physics
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
kickstone




PostPosted: Mon Jan 25, 2016 9:32 am   Post subject: Turing Animation Demo with Physics

Shows some things you can do with animation and physics despite being limited by Turing. Runs fairly smoothly on my Macbook. I also have another project that uses custom buttons and gradients I may post later. I'm not a student, just a hobby programmer that ran into Turing while helping a high school student.


TuringBall2D.t
 Description:

Download
 Filename:  TuringBall2D.t
 Filesize:  15.29 KB
 Downloaded:  374 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Thu Feb 04, 2016 2:09 pm   Post subject: RE:Turing Animation Demo with Physics

This is a lot better than I was expecting! Very polished. The ball demo tends to spaz out when the balls are very slow and sometimes they do get stuck inside each other but it's pretty sweet otherwise. The animations & transitions are cool as hell.
kickstone




PostPosted: Fri Feb 05, 2016 6:57 pm   Post subject: Re: Turing Animation Demo with Physics

The quality of this particular program is very dependant on how fast your machine is. On my Macbook it runs with very little flickering. The only bug is if a ball settles on top of another it will eventually get launched really high in the air. I couldn't be bothered to fix that. If you have a slower machine it may be best to limit the number of balls in the simulation. You can change that in the main run loop. In the outer for loop, change 'for k: 1 .. 6' to a lower range. Turing is very slow and its trying to recalculate positions and directions, detect contacts and resize shadows. So if your machine isn't fast reduce the number of balls it keeps track of. By the way, for any of you who are interested in becoming better programmers, I highly encourage you to build projects like this that require you to create your own physics. When your working on iOS apps for example, it has its own built in physics engine and animation frameworks that do pretty much everything for you. But you will learn a lot by doing it yourself. Turing kind of forces you to do that.
Insectoid




PostPosted: Sat Feb 06, 2016 6:51 am   Post subject: RE:Turing Animation Demo with Physics

The only time the FPS ever dropped was when a ball got stuck in another ball, where it hit maybe 2 fps. I'm running it on a Pentium D 2.8ghz from 2005 under WINE, which is pretty much the worst-case performance scenario. The flinging is probably caused by floating-point precision error. Something's dividing by near-zero.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: