Help with my game - "desktop destructor"

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I'm creating game "Desktop Destructor". You can destroy your desktop with a many different weapons and tools... I have one imported screen of my desktop, but I don't know how to create screenshot of another desktop in a game.

    Is it a way to create screenshot of another users screen, when game is starting?

  • This question doesn't make any sense, which is probably why it is not being answered. Who is the other user and what screen do they have??

    You could take a screenshot using Python and the "gtk.gdk" library.

  • It makes sense. He wants to take a screenshot of the player's desktop.

    There's no way to do so with events that I'm aware of. If you can do it with Python then that's cool.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could take a screenshot using Python and the "gtk.gdk" library.

    Whoa. Thanks for that!

  • oops.. sorry. After Deadeye posted, your question makes a lot of sense. The big problem I see is that you want the user to destroy the desktop and I am assuming this is the desktop as Windows first boots. He/she might have several windows open which even if you automated a screenshot using Python or something else you wouldn't get the "real" desktop.

    One way to do it, arguably somewhat ghetto, is to have the player take the screenshot. You could flush the clipboard using the System action at the start of the layout, pop up a message box asking for the user to "goto the desktop" and take a screenshot, then save the image using the Image Manipulator. Then just use a while loop to confirm they actually saved it...before starting game.

    Here is an example: http://www.box.net/shared/pi0gbddbdc

    You could also do this with the PyQt4 module. Unfortunately, I can't get Construct to place nice with this even though it works flawlessly outside. You have to download the PyQt4 binary installer, Sip and MinGW to run this.

    import sys
    from PyQt4.QtGui import QPixmap, QApplication
    app = QApplication(sys.argv)
    QPixmap.grabWindow(QApplication.desktop().winId()).save('game.png', 'png')[/code:3fk2egjr]
    
    Cheers!
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)