tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/9104-how-to-handle-on-every-enter_frame-model-or-view-updates-in-robotlegs-sot-hat-it-was-not-expansiveRobotlegs: Discussion 2014-01-13T15:20:55Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/309926482014-01-08T07:48:57Z2014-01-13T15:03:15ZHow to handle on every ENTER_FRAME model or view updates in Robotlegs so that it was not expansive?<div><p>Say I have a ball that bounces from the walls - something
similar to the Arkanoid game. In this case you should listen to
ENTER_FRAME event and change the coordinate of the ball depending
on velocity, previous coordinate, whether if it bounced from the
wall, etc. All this is being done in model. Should I dispatch an
event on every ENTER_FRAME which contains new coordinates of the
ball calculated in the model to the view so that the view is
updated?</p>
<p>In general, if on every ENTER_FRAME I have to update model via
view or vice versa, should dispatch and event, create a command
which will inject a model and change the model's data on every
ENTER_FRAME? Isn't it very expansive and slow? Is there a better
approach here?</p>
<p>P.S. Please consider that I might use for example Box2D in my
model to calculate ball coordinates.</p></div>naghekyantag:robotlegs.tenderapp.com,2009-10-18:Comment/309926482014-01-08T09:58:45Z2014-01-08T09:58:45ZHow to handle on every ENTER_FRAME model or view updates in Robotlegs so that it was not expansive?<div><p>Hello!</p>
<p>I recommend checking out these frameworks:</p>
<p>Ember2 - Tom Davies:<br>
<a href=
"http://www.tomseysdavies.com/2011/12/04/ember-2/">http://www.tomseysdavies.com/2011/12/04/ember-2/</a><br>
<a href=
"https://github.com/tdavies/Ember2">https://github.com/tdavies/Ember2</a><br>
<a href=
"https://github.com/tdavies/Ember2-demos">https://github.com/tdavies/Ember2-demos</a></p>
<p>xEmber - Alec McEachran:<br>
<a href=
"https://github.com/alecmce/xember">https://github.com/alecmce/xember</a></p>
<p>Ash - Richard Lord:<br>
<a href=
"http://www.richardlord.net/blog/introducing-ash">http://www.richardlord.net/blog/introducing-ash</a><br>
<a href=
"https://github.com/richardlord/Ash">https://github.com/richardlord/Ash</a></p>
<p>hth<br>
Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/309926482014-01-08T12:19:13Z2014-01-08T15:14:55ZHow to handle on every ENTER_FRAME model or view updates in Robotlegs so that it was not expansive?<div><p>So pity that the license info is much longer than the "what is
it about" info :( Though I have looked the demo code with Bunnies I
could not understand the main idea behind the Ember and the
approach in this problem. :( Maybe I will find time to investigate
code thoroughly later.</p>
<p>Thanks for pointing out the direction!</p></div>naghekyantag:robotlegs.tenderapp.com,2009-10-18:Comment/309926482014-01-09T10:16:52Z2014-01-09T10:16:52ZHow to handle on every ENTER_FRAME model or view updates in Robotlegs so that it was not expansive?<div><p>You're welcome!<br>
Yes, I know, it's not easy to understand the concepts without
documentation, and I can't help you either, sorry.</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/309926482014-01-09T14:02:54Z2014-01-09T14:02:54ZHow to handle on every ENTER_FRAME model or view updates in Robotlegs so that it was not expansive?<div><p>Hi. I tried out Ash a while ago. You can read about my
experiences here: <a href=
"http://shaun.boyblack.co.za/blog/2012/08/04/games-and-entity-systems/">
http://shaun.boyblack.co.za/blog/2012/08/04/games-and-entity-systems/</a></p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/309926482014-01-13T14:55:38Z2014-01-13T14:55:38ZHow to handle on every ENTER_FRAME model or view updates in Robotlegs so that it was not expansive?<div><p>Thank you so much! This is a great article. I have learned a lot
of very important and nice things from your article. Nice to have
such people sharing knowledge.</p></div>naghekyantag:robotlegs.tenderapp.com,2009-10-18:Comment/309926482014-01-13T15:20:55Z2014-01-13T15:20:55ZHow to handle on every ENTER_FRAME model or view updates in Robotlegs so that it was not expansive?<div><p>It's a pleasure :) I'm going to close this discussion for now -
feel free to open a new discussion for further questions.</p></div>Shaun Smith