August 28, 2010

laurent bauer laurent bauer
Lab Rat
25 posts

Laser towers

 

Hello,

After the Fire bullets example [developer.qt.nokia.com] , I continued playing with QGraphicsScene

Here another simple example:

Laser shooter example on youtube [youtube.com]

I can’t post the code here because it contains more than the maximum allowed 6000 characters. However I could forward it or post some snippets if somebody asks.

Edit:
Here is it (Wiki):

Towers_lasers_and_spacecrafts_example [developer.qt.nokia.com]

Laurent

7 replies

August 28, 2010

Deleted Member # 4a2 Deleted Member # 4a2
Ant Farmer
1481 posts

could you try and add it in the wiki ?

August 28, 2010

anselmolsm anselmolsm
Ant Farmer
417 posts

laurent bauer wrote:

Laser shooter example on youtube [youtube.com]

Nice!

laurent bauer wrote:

I can't post the code here because it contains more than the maximum allowed 6000 characters. However I could forward it or post some snippets if somebody asks.

Laurent

If you want to share this code, an alternative would be publishing it on gitorious.org [gitorious.org] , github [github.com] or any other online repository service, then you post the URL here later =)

 Signature 

Anselmo L. S. Melo (anselmolsm)
www.anselmolsm.org

August 28, 2010

laurent bauer laurent bauer
Lab Rat
25 posts

could you try and add it in the wiki ?

I pushed it in the wiki with a few more explanations

Towers_lasers_and_spacecrafts_example [developer.qt.nokia.com]

anselmolsm wrote:

If you want to share this code, an alternative would be publishing it on gitorious.org [gitorious.org] , github [github.com] or any other online repository service, then you post the URL here later =)

Yes I must do it…

August 28, 2010

anselmolsm anselmolsm
Ant Farmer
417 posts

Great! =)

 Signature 

Anselmo L. S. Melo (anselmolsm)
www.anselmolsm.org

August 28, 2010

Deleted Member # 4a2 Deleted Member # 4a2
Ant Farmer
1481 posts

cool!

August 31, 2010

Markus Liebe Markus Liebe
Lab Rat
40 posts

Hi . This is a very nice example! Thanks!

However I think the wiki parsed away several modulo operators after qrand():

  • mobileunit.cpp : 20 there should be a qrand() modulo 90 or sth.
  • mobileunit.cpp : 21 qrand() modulo 10 or sth.
  • scene.cpp : 66 m_TicTacTime modulo 20 == 0

replace the word modulo in the lines above with the cpp modulo operator =)

@the trolls: is there an error in the syntax highlighter of the wiki?

August 31, 2010

laurent bauer laurent bauer
Lab Rat
25 posts

Markus Liebe wrote:

However I think the wiki parsed away several modulo operators after qrand():

Sounds like a missed copy-passed… Thank you Markus

 
  ‹‹ networked game over messenger      QGraphicsItem::setTransformOriginPoint(x,y) not working as expected ››

You must log in to post a reply. Not a member yet? Register here!