You are not logged in.
Hi all,
I need to visualize (moving) squares in a grid. (The program will be made in OO approach.)
There also could be a timer functionality to pause the movement or view it slower/faster.
However I have no experience with graphical output except using Java, and I'd peferably not use Java.
Also I only know C++, Java and Scheme so far, but could learn another language.
Would it be a good idea to use C++ with the Allegro library, or e.g. something different like Python with TkInter? What would you recommend?
Offline
I'd go with Javascript, depending on the complexity of course.
Libraries like jQuery and script.aculo.us have simplified web-based animation quite a lot, allow you to control animation speed easily, and it will work on all platforms.
A quick search turned up these examples:
http://www.authenticsociety.com/gShuffle-1/
http://www.bennadel.com/blog/1009-jQuer … lug-In.htm
Offline
If you already know C++, using C++ and Allegro would allow you to quickly create the squares moving around the screen. (I'm a big fan of Allegro)
If you need something, like, menus and buttons, then Allegro might not be the best choice.
Offline
Thanks for your tips;
I don't really need buttons etc. so Allegro will do.
I will check Javascript too; didn't think of that.
Offline
Python? Does everything the other's mentioned do but in a cleaner easier to use way.
After a bit other languages seem like something out of the ark - and I'm not sure I'd dignify javascript with 'language' anyway - it's an evil horrible kluge. If it didn't exist no-one would want to invent it.
Pete
(Pythonista)
Offline
Why, of course I recommend Qt, with use of a QGraphicsView. ;-)
I don't know much of Allegro having chosen to learn SDL instead, but I understand both have C++ wrappers available. If Allegro is anything like SDL (and supposedly it is), then your project should be fairly easy to implement with it.
I still prefer a QGraphicsView over SDL though, much cleaner API and thoroughly OO. Nicely supports SVG and PNG+Alpha channels. There are multiple compositing modes (overlay, multiply etc), plus great animation and state machine frameworks!
Tons of examples and demos available too. You can see them if you install qt-doc and go to /usr/share/doc/qt/
And if you don't mind trying something really, really new, I'd bet you could whip up a grid of moving squares in Qt's brand-new QML faster than absolutely anything else (pygame, javascript etc included! Maybe not flash, but meh....).
(I'm not a shill if the software's open-source, right? )
Last edited by xenobrain (2010-07-09 14:20:23)
Offline
I try to keep away from javascript even in my JEE apps. Server side validations unless its extremely simple to do at client side.
You don't want to use Java, but Java Swing can be a good tool to build graphical programs. Although I am not sure if you need it to be lightweight or not.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
For something simple I would make use of the standard graphic library in Java or if I am doing something serious I would code the application using OpenGL.
Offline
You could also think about Processing http://processing.org/(A mashup of Java to make it suitable for simple Animations) or the sytactic equivalent processing.js
{ Github } {Blog and other stuff }
Offline
I'm sure gambas would do the trick too
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Wow, what a clutter of different options!
"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page
Offline
Hey, there is Racket, which is an excellent option, considering you know Scheme. Racket is a dialect/language based on Scheme, but it has class suport et alia.
I'm also known as zmv on IRC.
Offline
Use SFML, it is the only sane choice
Offline
Yep, Svenstaro is right. Lisp and its dialects are for insane people. Lucky me, I am insane.
I'm also known as zmv on IRC.
Offline
Assembly... no doubt
Offline
there are already a bunch of posts but
Have you looked at "CImg.h "
look at " An animation featuring triangles that are rotating (50 lines of code)."
http://cimg.sourceforge.net/screenshots.shtml
http://cimg.sourceforge.net/img/ss_triangle.jpg
Celestia maps
http://celestiamotherlode.net/catalog/s … ator_id=10
Offline