Results 1 to 3 of 3

Thread: A floppybird game challenge

  1. #1
    Join Date
    Apr 2024
    Posts
    1
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Windows Android

    Question A floppybird game challenge

    I need help

    Hi, I have made a floppybird game on qt with a graphicseen. I also made a text which show the height base on y(), but it is reversed. How can i fix it ?
    For example, when floppy bird go up, the height number which is based on y(); shows the lower number.

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    513
    Thanks
    12
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: A floppybird game challenge

    Hi, in screen coordinates you have zero at the top of your screen, and the max value at the bottom.

    Ginsengelf

  3. #3
    Join Date
    May 2024
    Location
    India
    Posts
    4
    Qt products
    Qt/Embedded
    Platforms
    Windows

    Default Re: A floppybird game challenge

    Hey hi, you need to invert the y coordinate value so that higher values correspond to higher height. You can achieve this by subtracting the y coordinate from the maximum height value.

Similar Threads

  1. game on qt
    By bibhukalyana in forum Qt Programming
    Replies: 6
    Last Post: 27th March 2011, 22:56
  2. Challenge + confusion while rotating main window with QT?how to do?
    By savaliya_ambani in forum Qt for Embedded and Mobile
    Replies: 28
    Last Post: 5th June 2010, 09:18
  3. Replies: 1
    Last Post: 22nd May 2010, 07:38
  4. Challenge Question
    By Brandybuck in forum The GraphicsView Framework
    Replies: 1
    Last Post: 3rd June 2008, 19:29
  5. Trolltech Developer Challenge
    By lpotter in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 16th April 2007, 19:39

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.