The Future of Animation in LiveCode

Alex Tweedly alex at
Wed Feb 18 01:52:12 CET 2015

I don't think I fully get that.

If the problem is that LC is just too slow, and the required 
calculations continuously or consistently take more time than is elapsed 
(i.e. we just keep getting further and further behind), then the problem 
is performance, not how/when we can trigger redraws.

But if the issue is "simply" that timers can't be relied upon to trigger 
while calculations proceed, then we can (at considerable effort) 
minimize the impact of that.

Option 1. Use timers *only* for time-critical events such as redraw,
All other actions, character updates, etc. need to be done using a 
work-list, or time-aware action list, etc.
This does mean that redraws (etc.) can be delayed by the time taken for 
any single calculation, so it is incumbent on the programmer to keep 
individual work-items within an acceptable limit (e.g. by breaking into 
smaller pieces). But it does mean that these redraws (or other 
time-critical events) are given the chance to happen very close to their 
ideal time.

Option 2. Self-postpone non-critical items.
Any non-time-critical items should, as their very first action, 
determine whether there are critical events outstanding within their 
(predicted, worst-case) run-time, and if so they re-schedule themselves 
to just beyond the time of the critical item.
I confess I haven't fully thought this one through, but it does seem 
feasible to handle it except in cases where the total calculation load 
exceeds the elapsed time available.

Option 3. Multi-process.
Split the game into display parts and "play" parts; since we don't have 
threads, use separate processes and communicate via sockets (or anything 
else you like).

Option ....   I'm sure there are others.

In all cases this is an overhead (possibly big, possibly overwhelming) 
compared to a development tool that doesn't have this limitation. But I 
think it's overstating it to say that LC is totally incapable of doing 
such a game.

(Since I have not written an animated game for over 30 years, I haven't 
actually tried this out :-) But I'm open to trying it if someone can 
describe a suitable simple scenario for experimentation.

-- Alex.

On 17/02/2015 14:42, Bjoernke von Gierke wrote:
> I agree that additional features like SVG import or access to a phyiscs engine would make things possible that are now not possible. In a similar vein, multimedia problems like the slowness of using gifs for animated images, as well as the general lack of movie format support could be addressed to make some things easier or possible to begin with.
> One of the main problems however will not be fixed in the foreseeable future, or possibly ever: LC can't enforce animation times. Namely it's not possible to force a screen redraw, or other actions, based on a timer, ignoring wether previous calculations have finished or not. In LC, all timers simply laps when there's too much processing, which means that any animation with more then 10-20 moving parts is impossible to keep in frame, and therefore impossible to make not lag.
> Now it is of course possible to just create laggy animated games, or games where animation lag has no consequences besides production value. But for most simple games that _depend_ on animation, like shooters (Asteroids, shmups) or jump'n run (Super Mario, Flappy Bird), lagginess will kill the gameplay. Those games will therefore remain to be impossible to make with LC in the foreseeable future.
>> On 11 Feb 2015, at 15:09, Curry Kenworthy <curry at> wrote:
>> People have been making games and some types of animation with LC/RR for over a decade, and progress will continue. No barriers if you choose the right project and build around the features.
>> My nerve disease acts up during winter and makes it harder to type or talk, so releasing updates such as FT and WordLib will keep me busy for a while.
>> But later this year I would like to start a game with current graphics, either for a client or for myself.
>> Last year I did an LC 6 app containing animation and it ran acceptably even on the weakest Android hardware. And some Full HD testing to check LC game worthiness had decent results. LC's got the mojo.
>> Best wishes,
>> Curry Kenworthy
> --
> Chat with other LC people:
> Use a better dictionary in the IDE:
> Try chartsEngine:
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list