Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: How to keep game running while window is inactive?  (Read 3481 times)

0 Members and 1 Guest are viewing this topic.

JMies

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • View Profile
How to keep game running while window is inactive?
« on: April 07, 2010, 11:16:38 AM »

Hi,

I need to run my game in a window and use other programs at the same time. My problem is that every time the game window becomes inactive, it stops all the action in the game. Is there some way to keep the game running even when inactive?

Janne
Logged

Prote1n

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 45
    • View Profile
Re: How to keep game running while window is inactive?
« Reply #1 on: April 07, 2010, 11:31:38 AM »

Use GoExclusive and not GoSystemExclusive that pauses the game
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: How to keep game running while window is inactive?
« Reply #2 on: April 07, 2010, 11:37:31 AM »

JMies, it's not possible. The game freeze is default behavior of WME as soon as the window loses focus.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

JMies

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • View Profile
Re: How to keep game running while window is inactive?
« Reply #3 on: April 07, 2010, 12:06:21 PM »

Damn, that makes things a bit more complicated, but thanks anyway. Any chance someone knows where in the WME sources this behavior could be changed?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: How to keep game running while window is inactive?
« Reply #4 on: April 07, 2010, 12:13:05 PM »

That would be the CBGame::OnActivate() method.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

JMies

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • View Profile
Re: How to keep game running while window is inactive?
« Reply #5 on: April 07, 2010, 12:22:57 PM »

Thanks! I'll give that a shot.
Logged

JMies

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • View Profile
Re: How to keep game running while window is inactive?
« Reply #6 on: April 07, 2010, 05:19:30 PM »

Thanks, it seems to be working without any problems so far.  :)
Logged
 

Page created in 0.043 seconds with 24 queries.