View Full Version : Threads, Networks, and Performance.
BinarySpike
2005.01.07, 01:16 PM
Hi,
I have another question, :)
I was wondering if I added a network thread, (to handle network stuff)
would that mess with my OpenGL (or Quartz) performance???
I need a VERY fast eventloop (not with sloooooow networking)
I just thought if I created two threads (network input/output)
that would keep my game fast but my networking fast also. :???:
The game I'm recreating will have to work (because the original did)
with Mac os X, 350Mhz, 128/128+64 RAM.
ThemsAllTook
2005.01.07, 02:38 PM
With preemptive threads, you shouldn't have to worry too much about performance. It will affect it, of course, but your other threads will always get cycles. Cooperative threads are a different matter...
- Alex Diener
BinarySpike
2005.01.07, 08:21 PM
Ok, but what's the diffence between "preemptive threads"
and "Cooperative threads"
I'm trying to find a way to separate my gameplay with the networking.
like I said I need a FAST gameplay
(networking is easyer if I don't have to continue on and update/draw your window)
I'm just guessing here, but one is real simultaneous thread and the other is called when you
have the *time*. :???:
Ok, what would be faster,
A new thread for the networking part (two for input and output),
or check network and then draw/update.
either one, I will have to look into programming references.
(Thread manager for the first,
and speicial network calls for the second)
OneSadCookie
2005.01.07, 08:51 PM
ever heard of "biting off more than you can chew" ?!
BinarySpike
2005.01.07, 11:02 PM
Yes,
What does that mean???
If your talking about the 350Mhz minumum speed, well, the game I'm basing my game on
ran smoothly on a 125Mhz...
(only the networking from the 125Hhz made my 350Mhz mess-up)
The only problem I'm going to have (that I know that I can't do) is the collision detetion. :???:
The networking is peice-of-cake and threads, well, developer.apple.com should have all I
need to know. :)
OneSadCookie
2005.01.07, 11:59 PM
no, I mean that you barely understand C and Carbon, you don't have a clue about networking, and now you're trying to tackle multithreaded programming (which is probably the hardest thing you'll ever do) in some kind of deluded quest for "ultimate performance", whatever that might mean.
Crawl before you walk, walk before you swim, &c.
BinarySpike
2005.01.08, 12:34 AM
Um, I learned C before BASIC...
I mostly know Carbon (from my classic programs)
Ok, so threading is HARD, I won't use threads then.
some kind of deluded quest for "ultimate performance", whatever that might mean.
:wow: have you found the "ultimate performance"??? :wow:
Crawl before you walk, walk before you swim.
In my case, I could walk before I could sit. (...honest...;)) :lol:
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.