Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Playing card animations

by wanna_code_perl (Pilgrim)
on May 08, 2013 at 15:16 UTC ( #1032619=perlquestion: print w/replies, xml ) Need Help??
wanna_code_perl has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks,

I'm helping someone out with a visualization project for Klondike solitaire. We're writing all of the logic in Perl, and would like the presentation to follow, but for what we want to do, we really need to animate the movement of the cards. We're talking the simplest of animations, here... move sprites from point A to point B, maybe with a simple easing function.

I don't care much how the animation is presented, as long as it's in a single window or browser page, that is spawned and dynamically driven from the Perl application, that lasts for the lifetime of that application. I.e., given an obviously silly API like move_cards($these_cards, $new_location), the call should block while the display animates the update. If I have to fake the imperative style with event-driven style, I could live with that, I suppose.

Portability isn't a huge concern, as long as it works in Linux.

I haven't come across much in my searching thus far. What would you wise monks suggest?

Replies are listed 'Best First'.
Re: Playing card animations
by InfiniteSilence (Curate) on May 08, 2013 at 15:32 UTC

    For something simple/demonstration-like I wouldn't do this in Perl at all -- I would do it in JQuery using some form of plug-in like the Quicksand plugin. When you want to start storing information on the backend web server, then I would start coding in Perl.

    Celebrate Intellectual Diversity

      Thanks for the suggestion. Truth be told, however, the point of this exercise was to teach Perl, not Solitaire. :-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1032619]
Approved by Corion
Discipulus added his 2 neurocents to windwos perl suggestions issue

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2018-06-25 09:52 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.