View Full Version : Extended cannon example - My first little Qt project

FS Lover
31st July 2009, 07:05
this is the qt's cannon game example with the following features added:

- Extended and easy keyboard keys
- Wind factor
- Variable lenght barrel
- More decorated cannon
- Timer
- Barrel recoil
- Multiple shots in the air
- Multiple targets
- Splatter effect
- Round shots with precise collision detection
- Hit to barrier and drop effect
- Pause game
- Sound effects
- Changeable background color

Some of these features were suggested in the Qt's exercises.
This is rather for demonstration, not a real game! (But playable and fun)
Sorry for dirty and poorly documented code;
I wrote this just to show a little of the Qt's power and flexibily to one of my friends.

source code: http://www.4shared.com/file/121873212/9f9bcd0a/qtcannon-src.html

binary package (For MS Windows): http://www.4shared.com/file/121872586/f4c7c3ba/qtcannon-bin.html

edit: now source package is attached too.

31st July 2009, 07:17
nice job brother... this is the first time i have seen anybody doing the qt exercise .. anyways.. i cannot download from this site... the site do not open.. why dont you attach it in the forum?

31st July 2009, 07:35
This is cool man..:cool::cool::cool:
I enjoyed it, even I never tried old one. but this one is really cool app.
Air effect and barrier effect and continues firing is most I like..

Good luck :)

FS Lover
31st July 2009, 08:11
i cannot download from this site... the site do not open.. why dont you attach it in the forum?
my packages are usually too big for forum attachments.
forum attachments have a very limited maximum size (which is very rational and typical).
but I forgot that the source code package is small enough; it is now attached to the first post.

FS Lover
31st July 2009, 08:47
unfortunately it seems that the cannon example is removed from the recent versions of Qt.
I don't know why.
I think it was a great example of its own category for the tutorial section.

31st July 2009, 08:48
great game brother... :) .. i like it. .. add a option to remove the wall... i like easy games :)

1st November 2009, 10:20
i had also added more features in this cannon game like changing styles, more targets, color changings etc. i did this in 2007 when i first learned Qt. This time i am in MFC. Can anyone tell that is that game tutorial still is in the latest Qt version ?
anyway, nice to hear that someone else has added some functionality to this cannon game.
abhishek mittal
Mob. 09352192677

FS Lover
3rd November 2009, 12:02
this tutorial was in (and up to) qt 4.4.3 installation, i think.

FS Lover
23rd November 2009, 05:09
I accept with information
what do you mean?