| | |
How to multitask?
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Oct 2006
Posts: 90
Reputation:
Solved Threads: 1
This may come off as a rather broad question, but I need to learn how to multitask in c++.
I am developing a game, and to do so I need to learn how to program applications to run in realtime.
(I want multiple characters to do things at the same time, rather than having a turn based game as I currently have.)
For those of you who may 'know' me, I have progressed quite a large amount in the last few weeks so I will have a reasonably larger grasp on what you have to say... By this I mean I won't sit there like "what, huh... I wish you guys could explain things good" (I said that about ancient dragon once over such a simple subject as RECTs)
Well thanks for any help, and P.S. - I use Bloodshed (gcc compiler) NOT visual c++, therefore I would appreciate any code to be compatible with bloodshed.
I am developing a game, and to do so I need to learn how to program applications to run in realtime.
(I want multiple characters to do things at the same time, rather than having a turn based game as I currently have.)
For those of you who may 'know' me, I have progressed quite a large amount in the last few weeks so I will have a reasonably larger grasp on what you have to say... By this I mean I won't sit there like "what, huh... I wish you guys could explain things good" (I said that about ancient dragon once over such a simple subject as RECTs)
Well thanks for any help, and P.S. - I use Bloodshed (gcc compiler) NOT visual c++, therefore I would appreciate any code to be compatible with bloodshed.
•
•
Join Date: Apr 2007
Posts: 103
Reputation:
Solved Threads: 17
I've been sent here by the gods of compilers with this message.
http://msdn.microsoft.com/vstudio/express/downloads/
You will now "fit in" with the rest.
But in all honesty, I really can't say enough about the 2005 express editions of visual studio. They truly are amazing. And not only that, but it's as close to the real world as you'll ever get with home development.
Now onto your question:
Game programming consists of 3 core functions (how people actually write the game differs, but in reality, these 3 steps are taken in every game).
1. Initialization.
2. Update.
3. Shutdown.
Pretty self explanatory. What you're looking for is going to be in step #2, the Update methods of the game. In here you'll have the game update objects on the screen/collision/physics/death/movement etc...
For more specific examples, you'd of course need some more specific questions, but this is what i figured you'd be looking for with that broad of a question, so hope it helps.
http://msdn.microsoft.com/vstudio/express/downloads/
You will now "fit in" with the rest.
But in all honesty, I really can't say enough about the 2005 express editions of visual studio. They truly are amazing. And not only that, but it's as close to the real world as you'll ever get with home development.
Now onto your question:
Game programming consists of 3 core functions (how people actually write the game differs, but in reality, these 3 steps are taken in every game).
1. Initialization.
2. Update.
3. Shutdown.
Pretty self explanatory. What you're looking for is going to be in step #2, the Update methods of the game. In here you'll have the game update objects on the screen/collision/physics/death/movement etc...
For more specific examples, you'd of course need some more specific questions, but this is what i figured you'd be looking for with that broad of a question, so hope it helps.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
Join Date: Apr 2007
Posts: 6
Reputation:
Solved Threads: 1
•
•
•
•
he wants to know how to update objects on a screen... lets not complicate him with things such as multi threading.
Suggesting multi-threading to a beginner programmer is like giving a gun to a 3 year old. And since we're talking C++ here you can be damn sure he'd reuse the bullets!
What needs to be conveyed to the original poster is what design patterns can be used to achieve the desired effect.
Last edited by iMalc; May 21st, 2007 at 6:01 am.
•
•
•
•
I agree with this poster.
Suggesting multi-threading to a beginner programmer is like giving a gun to a 3 year old. And since we're talking C++ here you can be damn sure he'd reuse the bullets!
What needs to be conveyed to the original poster is what design patterns can be used to achieve the desired effect.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
Join Date: Oct 2006
Posts: 90
Reputation:
Solved Threads: 1
I agree with Ancient Dragon as well as the rest. Yes, I am quite the beginner, but I am eager to learn, so thanks all. Oh and mariocatch, if you honestly think I have not looked into vc++ and the other microsoft products you are wrong... I actually have a copy of the Visual C++ ISO, but i have been using Bloodshed since I started, and with bloodshed I am capable of compiling (Even if compilation with VC++ is possible, I will continue to use Bloodshed)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
So, multitasking is a more simple concept of multithreading? or are they completely different?
I will look into the links in your posts (perhaps something I should have done already) and get back to you.
Ohh, by the way, next year I will be in highschool which will allow me to take classes in this order where G = grade and S = semester and C = classname (G-S C)
10-1 Visual basic
10 - 2 C++
11 - 1 Java
11 - 2 Web Development (php and whatnot)
12 - 1 Advanced (I assume C# and perhaps ASM)
12 - 1 (Same as 12 - 2)
*-*-*-*-*-*-*-*-*-*-*-*
I assume that microsofts products will be used in school so I'll "fit in" soon enough.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
So, multitasking is a more simple concept of multithreading? or are they completely different?
I will look into the links in your posts (perhaps something I should have done already) and get back to you.
Ohh, by the way, next year I will be in highschool which will allow me to take classes in this order where G = grade and S = semester and C = classname (G-S C)
10-1 Visual basic
10 - 2 C++
11 - 1 Java
11 - 2 Web Development (php and whatnot)
12 - 1 Advanced (I assume C# and perhaps ASM)
12 - 1 (Same as 12 - 2)
*-*-*-*-*-*-*-*-*-*-*-*
I assume that microsofts products will be used in school so I'll "fit in" soon enough.
Last edited by Brent.tc; May 22nd, 2007 at 7:55 pm. Reason: It looked funny :)
![]() |
Similar Threads
- What do ya guys think about Dual monitors? (IT Professionals' Lounge)
- he's kick'n it old school. (Geeks' Lounge)
- Creating an OS in visual basic 6.0 (Visual Basic 4 / 5 / 6)
- Is there any difference between "MultiProcess" and "MultiTask" system in Linux ? (Shell Scripting)
- no macs? (OS X)
- Airport Tycoon (Geeks' Lounge)
Other Threads in the C++ Forum
- Previous Thread: command line with C++
- Next Thread: cant paint in mFC
| Thread Tools | Search this Thread |
api array arrays beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamic email encryption error file forms fstream function functions game generator getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates test text tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






