UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
November
Su M Tu W Th F Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Sponsored Links
Latest Postings
Latest Reviews
Page 1 of 2 1 2 >
Topic Options
Rate This Topic
#17403 - 07/31/02 12:19 PM multithreading!!
zenon Offline
Junior Member

Registered: 03/31/02
Posts: 93
Loc: Sweden
Ok, I'm going to ask all the REAL C++ programmers
out there to answer this.. and give me some good
advice.
I'm programming an arcade game, probotector style, with flashy lights, lots of ammo, and sh*t.
This blended in with the all-mighty invaders feeling with ships moving downwards and changing direction and so... Now..

I have been reading on multithreading. (I have Turbo C++ 5.02 ) And the help that I find there is not very satisfactory! I have been reading till my eyeballs started to bleed, but it doesn't make any sense!I mean, god!!!
Can annyone here give a light-easy to understand-explanation of how to:
Start a new thread - and linking or putting in or whatever it's called functions into it.
Stopping the tread.
The compilation is suposed to be speciall with some parameters.. that's no problem...

[Shit]
_________________________
- "It's not my code that's useless
it's you loosers being unable to
apprecitate it because of your
lack of skills!"
/zenon - C++ master Apprentice

Top
Sponsored Links
      
#17404 - 07/31/02 04:45 PM Re: multithreading!!
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
Real C++ programmers huh? Well, how 'bout a fake C++ programmer giving you a heads up. Go to planetsourcecode.com and search for Base64. While looking around for example code in C for decoding/encoding Base64 algorithms, I found somebody had made a dll which supports both syncronus and asyncronus functions. I'm sure you know what that means and yes, it uses multithreading. I've looked through the code and found things quite interesting - and understandable enough.

*grumbles under his breath about what makes so-called 'real' C++ programmers...*

If ya was a little less cocky there, I would've looked for and got ya a direct link and/or learned the process real quick so that I could teach ya. It wouldn't be the first time. Consider yourself fortunate that I remembered that much off the top of my head to steer ya in the right direction. Like hell I'd go search for the answer for ya like I normally would.
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net

Top
#17405 - 08/01/02 02:07 AM Re: multithreading!!
zenon Offline
Junior Member

Registered: 03/31/02
Posts: 93
Loc: Sweden
SilentRage, with 'real programmer', i'm refering to the guys that know what theyr'e talking about. Not the showoff boardgliders that oftenly get their nowses into discutions that they haven't got a clue about just to look cool. And I'm sure that you don't fit into THAT category =)

Thanx a lot for the 'directioning', if it doesn't work out i'll let ya know.
_________________________
- "It's not my code that's useless
it's you loosers being unable to
apprecitate it because of your
lack of skills!"
/zenon - C++ master Apprentice

Top
#17406 - 08/01/02 08:02 AM Re: multithreading!!
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
well, if you said 'real programmer' I probably wouldn't have said anything cause I consider myself a real programmer (I place a lot of meaning to 'real programmers'). however, you said 'REAL C++ programmers' and I do not code in C++ at all. My hold on C is patchy at best - learning only what I need to learn to do a given project or answer a given question.

So I was a bit miffed that even though I wasn't a 'REAL C++ programmer' that you indicated that I couldn't be of any help to you at all.

But anyway, it was a moments irritation. I no longer care. You're coo'. And if you do still have issues, I'll learn it and give ya a detailed tut/example code on how to multi-thread.
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net

Top
#17407 - 08/02/02 12:25 PM Re: multithreading!!
zenon Offline
Junior Member

Registered: 03/31/02
Posts: 93
Loc: Sweden
Well SilentRage, enlight me!
I'm sure that you will give me something better than the planetsourcecode. Honestly, I'm not good at reading other peep's code that doesn't have any good comments. I got lost in an example that I downloaded. I would really like you to show me some multithreading, not something complex. Just some basic, so that I can carry it on from there.
Example: a program that has 2 balls, ball no1's movement is calculated in one thread and ball no2's movement in another thread. =)
Thanx a lot [Thumb]
_________________________
- "It's not my code that's useless
it's you loosers being unable to
apprecitate it because of your
lack of skills!"
/zenon - C++ master Apprentice

Top
#17408 - 08/06/02 02:01 AM Re: multithreading!!
zenon Offline
Junior Member

Registered: 03/31/02
Posts: 93
Loc: Sweden
Come on SilentRage, tell me...
_________________________
- "It's not my code that's useless
it's you loosers being unable to
apprecitate it because of your
lack of skills!"
/zenon - C++ master Apprentice

Top
#17409 - 08/06/02 08:49 AM Re: multithreading!!
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
ah yes, thanks for reminding me. Last time I had searched for the example code that I had previous downloaded from planet source code and couldn't find it. Then I had given up and forgot to pursue other sources.

I found a tutorial by doing a google search:
http://www.flipcode.com/tutorials/tut_mthreading.shtml
http://www.flipcode.com/tutorials/tut_mthreading2.shtml

However, I was not entirely satisfied, and altered my search criteria at msdn.microsoft.com for "creating threads". Then i found a bundle of information which is what I myself would prefer to read if I wanted to make a multi-threading application. Here's the link that will take you through several pages of helpful information.

http://msdn.microsoft.com/library/en-us/dllproc/prothred_0t83.asp

Only after you've looked at all that and still can't get a grasp on what you need to do, will I take that information and round it out into a no-nonsense tutorial.
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net

Top
#17410 - 08/06/02 12:24 PM Re: multithreading!!
zenon Offline
Junior Member

Registered: 03/31/02
Posts: 93
Loc: Sweden
Thanx man =)
If I would have chosen someone to be my
programming teacher, you would have been the
man,,, (if you are a man I really honestly don't
know).


[Thumb]
_________________________
- "It's not my code that's useless
it's you loosers being unable to
apprecitate it because of your
lack of skills!"
/zenon - C++ master Apprentice

Top
#17411 - 08/06/02 03:38 PM Re: multithreading!!
Gremelin Offline

Community Owner
*****

Registered: 02/28/02
Posts: 7193
Loc: Portland, OR; USA
BTW, sr, you're my hero :x...
_________________________
Donate to UGN Security here.
UGN Security, Back of the Web, Elite Web Gamers & VNC Web Design Owner

Top
#17412 - 08/06/02 04:12 PM Re: multithreading!!
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
aw shucks. Such nice words.

Hey everybody, I found the secret to popularity. Learn how to search for info and give people links.
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net

Top
#17413 - 08/09/02 05:25 AM Re: multithreading!!
zenon Offline
Junior Member

Registered: 03/31/02
Posts: 93
Loc: Sweden
Hmmm.. maybe I should refrace myself, yes I will
use the links you gave me when I get into
Visual C++, but now I wonder...

(the most classicall problem of all)
How do I do to make for example (in DOS) to
program the motion of the space ships in
"Invaders", and still be able to have the user
moving the spaceship at the same time?

Something like multithreading, but for DOS.
How?
Thanks...
_________________________
- "It's not my code that's useless
it's you loosers being unable to
apprecitate it because of your
lack of skills!"
/zenon - C++ master Apprentice

Top
#17414 - 08/09/02 08:37 AM Re: multithreading!!
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
Er, I'm a windows programmer so I won't be much help here except in programming concepts. Your ship is controlled by a loop. Each iteration of the loop you move the ship another increment. You also check for keyboard input with each loop. If there's no keyboard input, move the ship in it's present course. If there is, then process the input THEN move the ship based upon it. If you want to see programming technique involving a constantly moving 'something' and keyboard input - then I suggest reading the QBasic code for Snakes. It would help bunches if you had QBasic and could step through the code. You wouldn't have to learn QBasic to see what things do.

I don't know if you can do "true" multithreading in DOS programming, but for sure you can divide your code's attention between many functions.
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net

Top
#17415 - 08/09/02 03:52 PM Re: multithreading!!
zenon Offline
Junior Member

Registered: 03/31/02
Posts: 93
Loc: Sweden
For example.
How did they do Duke Numed 1, I mean, that's
for sure some DOS game.
How did they get the enviorment to function,
independently from the player?
_________________________
- "It's not my code that's useless
it's you loosers being unable to
apprecitate it because of your
lack of skills!"
/zenon - C++ master Apprentice

Top
#17416 - 08/10/02 07:26 AM Re: multithreading!!
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
I have absolutely no idea. I suggest getting the Quake code, it's free for the public ya know. It runs under DOS I think.

For all I know, it's one helleva big loop. lol
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net

Top
#17417 - 08/10/02 03:19 PM Re: multithreading!!
zenon Offline
Junior Member

Registered: 03/31/02
Posts: 93
Loc: Sweden
Was that suposed to be a joke or something?
[Sheep]
_________________________
- "It's not my code that's useless
it's you loosers being unable to
apprecitate it because of your
lack of skills!"
/zenon - C++ master Apprentice

Top
Page 1 of 2 1 2 >

Featured Member
Registered: 08/22/14
Posts: 1
Forum Stats
2151 Members
46 Forums
35778 Topics
70948 Posts

Max Online: 1567 @ 04/25/10 05:20 AM
Top Posters
UGN Security 28939
Gremelin 7193
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
HushHush, golqm, Tim050, Gecko666, defghi795767
2150 Registered Users
Who's Online
0 registered (), 363 Guests and 305 Spiders online.
Key: Admin, Global Mod, Mod
Latest News
luxury goods sales at $405B by 2019
by golqm
10/28/14 05:19 AM


Donate
  Get Firefox!
Get FireFox!