Spotlight | Reviews | Current Issue | Academy | Newsletter | Subscribe | Shop |
Departments

Partner Links
Make your own website
WinWeb OnlineOffice
Comparing prices of hardware is worth it.
Price Comparison
UK Linux Jobs
What:
Where:
Country:
vacatures Netherlands njobs Linux vacatures
arbeit Deutschland njobs Linux arbeit
work United Kingdom njobs Linux jobs
Lavoro Italia njobs Linux lavoro
Emploi France njobs Linux emploi
trabajo Espana njobs Linux trabajo

user friendly

Admin Magazine

ADMIN Network & Security

Subscribe now and save!

ADMIN - Explore the new world of system administration! Special introductory offer! Order by September 30th to save 10% off the regular subscription price! Each issue delivers technical solutions to the real-world problems you face every day. Learn the latest techniques for better:

  • network security
  • system management
  • troubleshooting
  • performance tuning
  • virtualization
  • cloud computing

 

on Windows, Linux, Solaris, and popular varieties of Unix.

http://www.admin-magazine.com/

  linux-magazine.com » Issues » 2005 » 52 » A DIFFERENT CANVAS  

Print this page. Recommend
Share

Building a Simple Game with Qt’s QCanvas

A DIFFERENT CANVAS

The Qt toolkit from Trolltech sports features that appeal to any developer’s needs, but one of the most fascinating and powerful parts of the toolkit is the QCanvas class.

QCanvas is a very versatile widget that lets you add high performance 2D graphics to a Qt application. With features such as collision detection and sprite support, QCanvas is very much suited to 2D games. But QCanvas has also been used in diverse applications such as KTurtle, a logo interpreter. In this article, I will show you how to build a very simple game using QCanvas components. The example game I’ll discuss in this article, which I call Bricks, consists of a rectangular play area containing several rectangular objects. The rectangular objects are the bricks. A ball bounces around in the play area. If the ball strikes a brick, the brick disappears. A paddle, operated by the user, demonstrates how you can integrate user interaction into the game. To keep the game as simple as possible, the ball cannot leave the play area.


Read full article as PDF »


Comments


Print this page. Recommend
Share
Special Linux Magazine 3 for 1 Offer

Get 3 Issues + 3 DVDs for the price of a single issue!

Let Linux Magazine's hands-on, technical articles guide you in your daily Linux use. Check out bonus DVDs like Ubuntu, SUSE, or Fedora and save the download.

Only available for a limited time. Don't miss out!

more...