|
-
November 1st, 2008, 07:52 AM
#1
Struggling with multi-threading...
I am trying to write a game using the Allegro game programming library. I have a character class which I want to create six instances of. Each instance of the class is a separate character that needs to move at the same time as another, i.e. it is a racing game and all six characters will be racing one another.
It seems to me that each character needs to move within separate threads from one another, each needs to move at different speeds, but concurrently.
I have been trying to use boost threads to achieve this, but cannot find any tutorials to give me a hand.
Is it possible to start a new thread calling a function that takes two parameters?
The function within the object has the following declaration:
Code:
void Character::MoveOnY(BITMAP *tempBitmap, BITMAP *mainBitmap);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|