GDI animation...

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Vipin Cherian
In need of some credit
In need of some credit
Posts: 1
Joined: Mon Nov 08, 2004 8:44 am
Location: India

GDI animation...

Post by Vipin Cherian »

Hi there!
I want to develop a small freeware card game in wxWindows.
1. Can I use GDI animation? Will it be smooth and fast enough - given that I am going to store the game window in a bitmap and blt it to screen? I am not looking for killer performance. But cards moving, being dragged etc. One thing I noted was that wxWidgets does not have anything like QueryPerformanceCounter in Windows.
Any existing app which has used GDI animation using wxWindows?
2. wxList. I am planning to use this extensively for AI(which uses selective simulation). How fast is it??
regards and thanks,
Vipin
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Hi!
Can I use GDI animation?
Sure you can :D
Will it be smooth and fast enough - given that I am going to store the game window in a bitmap and blt it to screen?
Check the "forty" demo. It's a bit old but maybe this gives you an idea of how to do things (WXDIR\demos\forty). It's a card game.
One thing I noted was that wxWidgets does not have anything like QueryPerformanceCounter in Windows
True. Things like that are not easy to be ported throughout all platforms. An easy way for Windows & Linux is using ASM. Get the tick count with CPUID, wait a sec and get the tick again. On a Mac this won't work...
wxList. I am planning to use this extensively for AI(which uses selective simulation). How fast is it??
Good question. Can't comment on that one except that using it is pretty stable.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
Post Reply