[Kde-games-devel] Questions about basic game programming
Luciano Montanaro
mikelima at gmail.com
Thu Feb 19 15:51:14 CET 2009
2009/2/19 Pierre Maurier <pierre.maurier at gadz.org>:
> - How can I create a "time-based program" ?
> All my applications I wrote until now used to be action-based : a function
> is called by a click/keypress of the user. Here I want to create something
> that react after x time (and also react after user actions of course, it's a
> game !). Is there a proper way to do this ?
>
You set up a QtTmer to emit a signal at the time you ant to trigger an
action. Or you set it up so that it emits a signal every x
milliseconds...
> - Which widget I have to use to draw things ?
> The only games I have created (centuries ago !) where in Action Script
> (Macromedia Flash). This was very easy because you can use flash drawings
> and move them on the screen using coordinates. Is there a similar thing in
> Qt ? What are you using kdegames ?
>
> Maybe all my questions can be better answered elsewhere. Feel free to
> redirect me if this mail isn't in the right place !
>
> Thank you for your answers !
>
> PS : I have difficulties explaining things in English (I'm French), so
> please ask if something isn't clear.
> PPS : I only know python (and Qt4). C or C++ is a foreign language for me.
> But I think that QObjects behave the same way in both languages.
That depends on your requirements, but QGraphicsView should be a good
starting point:
http://doc.trolltech.com/4.4/graphicsview.html
--
Luciano Montanaro
Anyone who is capable of getting themselves made President should on
no account be allowed to do the job. -- Douglas Adams
More information about the kde-games-devel
mailing list