Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualVortez

Posted 13 June 2013 - 06:23 PM

Ok, after testing F10 with my code, it show the same symptome as you said, the game freeze. Im pretty sure this can be solve in the message loop however.

Gonna do some more tests.

 

Edit: i was talking to Yewbie:

 

 

Its going to deal with your message pump, you need to do a message peek instead of waiting for a message, any chance you could post your current windows message pump?

 

edit here is a decent message pump:

   for(;;)    
    {
        //look for a message
        while(PeekMessage(&msg,NULL,0,0,PM_REMOVE))
        {
            //check that we arent quitting
            if(msg.message==WM_QUIT) break;
            //translate message
            TranslateMessage(&msg);
            //dispatch message
            DispatchMessage(&msg);
            
        }
        Program_Running();  //This is where you want to do all of your applications logic.
        
    }

 

 

How does the for loop ever stop with this code???


#2Vortez

Posted 13 June 2013 - 06:21 PM

Ok, after testing F10 with my code, it show the same symptome as you said, the game freeze. Im pretty sure this can be solve in the message loop however.

Gonna do some more tests.

 

Edit: i was talking to Yewbie:

 

 

Its going to deal with your message pump, you need to do a message peek instead of waiting for a message, any chance you could post your current windows message pump?

 

edit here is a decent message pump:

   for(;;)    
    {
        //look for a message
        while(PeekMessage(&msg,NULL,0,0,PM_REMOVE))
        {
            //check that we arent quitting
            if(msg.message==WM_QUIT) break;
            //translate message
            TranslateMessage(&msg);
            //dispatch message
            DispatchMessage(&msg);
            
        }
        Program_Running();  //This is where you want to do all of your applications logic.
        
    }

 

 

How does the for loop ever stop???


#1Vortez

Posted 13 June 2013 - 06:07 PM

Ok, after testing F10 with my code, it show the same symptome as you said, the game freeze. Im pretty sure this can be solve in the message loop however.

Gonna do some more tests.


PARTNERS