• Advertisement

aimackay

Member
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

100 Neutral

About aimackay

  • Rank
    Newbie

Personal Information

  • Interests
    Art
    Audio
    Design
    Programming
  1. Hi there, After you saying that you hadn't encountered these issues I went back and had a look through my code again. I have an internal loop that performs update limiting/regulating to a set number of updates per second and it was this that was causing the problem! It seemed to get 'stuck' in this loop and not respond to anything else. Thanks for making me take it all apart and build it back up step-by-step - I had obviously been looking over the problem with tired eyes! Cheers, Andrew
  2. Hi there, I'm new to gamedev.net and to game programming in general. I am a C# developer by way of a day job and decided that my first foray into game programming should be with this language that I am familiar with. Starting with the basics (and having read many articles and forum posts) I decided to tackle my own implementation of a game loop and settled on Tom Miller's Application.Idle/PeekMessage method. I have this all pluimbed-in and all seems to work really well for updating and drawing. I have however, encountered a problem. My 'game' uses GDI+ graphics to do all of the rendering to a Windows Form. My problem lies in the fact that the application seems to 'hang' while events are taking place i.e. moving the mouse over the screen or holding down a key on the keyboard halts the update/draw cycle. I can only assume that this is a result of the Application.Idle game loop exiting/not running because the PeekMessage has found messages/events that need to be processed. It seems to me that the Application.Idle/PeekMessage method of implementing the game loop is well regarded so I am obviously missing something here... has anyone else come across this problem? In the event that I have not missed something here (and I am new to this style of programming) does anyone know of a workaround for this problem? Is there a way to prevent the mouse/keyboard events from interfering with the game loop? I assume that when DirectX is involved that it takes care of the input from keyboard/mouse and so the events never actually reach the form. With my GDI+ only method however, the events do seem to cause a problem. Hopefully someone can help! Thanks, Andrew
  • Advertisement