steadi
1st December 2012, 20:06
Hello There Guys,
I am currently trying to create a game using Qt and it's rather nice graphics view item. I have the game pretty much setup but I would like to add in a game loop to make the npc's wonder around and such.
My current code is:
while (1)
{
update();
}
but this just crashes the game. I know a while loop works when low-level programming but it does not seem to work in this instance. Can somebody point me in the right direction on how to create a game loop or a better way around using the while loop in Qt?
Thanks in Advance,
Matt :P
I am currently trying to create a game using Qt and it's rather nice graphics view item. I have the game pretty much setup but I would like to add in a game loop to make the npc's wonder around and such.
My current code is:
while (1)
{
update();
}
but this just crashes the game. I know a while loop works when low-level programming but it does not seem to work in this instance. Can somebody point me in the right direction on how to create a game loop or a better way around using the while loop in Qt?
Thanks in Advance,
Matt :P