Previous Thread
Next Thread
Print Thread
Rate Thread
#17403 07/31/02 09:19 AM
Joined: Mar 2002
Posts: 93
zenon Offline OP
Junior Member
OP Offline
Junior Member
Joined: Mar 2002
Posts: 93
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 <borland>) 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...

<img border="0" alt="[[censored]]" title="" src="graemlins/[censored].gif" />


- "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
#17404 07/31/02 01:45 PM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
Offline
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
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
#17405 07/31/02 11:07 PM
Joined: Mar 2002
Posts: 93
zenon Offline OP
Junior Member
OP Offline
Junior Member
Joined: Mar 2002
Posts: 93
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. pimp


- "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
#17406 08/01/02 05:02 AM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
Offline
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
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. smile 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
#17407 08/02/02 09:25 AM
Joined: Mar 2002
Posts: 93
zenon Offline OP
Junior Member
OP Offline
Junior Member
Joined: Mar 2002
Posts: 93
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 <img border="0" alt="[Thumb]" title="" src="graemlins/thumb.gif" />


- "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
#17408 08/05/02 11:01 PM
Joined: Mar 2002
Posts: 93
zenon Offline OP
Junior Member
OP Offline
Junior Member
Joined: Mar 2002
Posts: 93
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
#17409 08/06/02 05:49 AM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
Offline
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
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
#17410 08/06/02 09:24 AM
Joined: Mar 2002
Posts: 93
zenon Offline OP
Junior Member
OP Offline
Junior Member
Joined: Mar 2002
Posts: 93
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).


<img border="0" alt="[Thumb]" title="" src="graemlins/thumb.gif" />


- "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
#17411 08/06/02 12:38 PM
Joined: Feb 2002
Posts: 7,203
Likes: 11
Community Owner
Offline
Community Owner
Joined: Feb 2002
Posts: 7,203
Likes: 11
BTW, sr, you're my hero :x...


Donate to UGN Security here.
UGN Security, Back of the Web, and VNC Web Services Owner
#17412 08/06/02 01:12 PM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
Offline
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
aw shucks. Such nice words.

Hey everybody, I found the secret to popularity. Learn how to search for info and give people links. wink


Domain Registration, Hosting, Management
http://www.dollardns.net
#17413 08/09/02 02:25 AM
Joined: Mar 2002
Posts: 93
zenon Offline OP
Junior Member
OP Offline
Junior Member
Joined: Mar 2002
Posts: 93
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
#17414 08/09/02 05:37 AM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
Offline
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
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
#17415 08/09/02 12:52 PM
Joined: Mar 2002
Posts: 93
zenon Offline OP
Junior Member
OP Offline
Junior Member
Joined: Mar 2002
Posts: 93
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
#17416 08/10/02 04:26 AM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
Offline
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
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
#17417 08/10/02 12:19 PM
Joined: Mar 2002
Posts: 93
zenon Offline OP
Junior Member
OP Offline
Junior Member
Joined: Mar 2002
Posts: 93
Was that suposed to be a joke or something?
<img border="0" alt="[Sheep]" title="" src="graemlins/sheep.gif" />


- "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
#17418 08/10/02 04:43 PM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
Offline
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
well, no, I wasn't joking. But it would be hell trying to know what to do with quake's source - so I guess that isn't much help.


Domain Registration, Hosting, Management
http://www.dollardns.net
#17419 09/16/02 03:13 PM
Joined: Mar 2002
Posts: 8
T
Junior Member
Offline
Junior Member
T
Joined: Mar 2002
Posts: 8
Does Quake 1 use the opengl api? If it does, ogl would take care of everything.... But i guess being the first 3d game it didn't...

But at any rate you can use opengl for your game and it will take care of all of your problems... If there is a dos api... sorry ive only used it with win, never looked into a dos version. Maybe there is a port (from win to dos for opengl) on sourceforge....


Link Copied to Clipboard
Member Spotlight
Phatal
Phatal
Houston, TX
Posts: 298
Joined: April 2004
Forum Statistics
Forums41
Topics33,840
Posts68,858
Average Daily Posts1
Members2,176
Most Online3,253
Jan 13th, 2020
Latest Postings
Where and how do you torrent?
by danni75 - 03/01/24 05:58 AM
Animation,
by JohanKaariainen - 08/15/19 01:18 AM
Blackbeard.....
by Gremelin - 10/03/18 07:02 PM
my old account still exists!
by Crime - 08/10/18 02:47 PM
Okay WTF?
by HenryMiring - 09/27/17 01:45 AM
The History Thread...
by Gremelin - 08/11/17 12:11 PM
My friend NEEDS your HELP!
by Lena01 - 07/21/17 12:06 AM
I'm having fun with this guy.
by gabithompson730 - 07/20/17 01:50 AM
I want to upgrade my phone
by gabithompson730 - 07/20/17 01:49 AM
Doom 3
by Cyrez - 09/11/14 08:58 PM
Amazon Gift Card Generator/KeyGen?te
by Gecko666 - 08/22/14 09:21 AM
AIM scene 99-03
by lavos - 09/02/13 08:06 AM
Planetside 2
by Crime - 03/04/13 07:10 AM
Beta Testers Wanted
by Crime - 03/04/13 06:55 AM
Hello Everyone
by Gremelin - 02/12/12 06:01 PM
Tracfone ESN Generator
by Zanvin Green - 01/18/12 01:31 PM
Python 3 issue
by Testing - 12/17/11 09:28 PM
tracfone airtime
by Drache86 - 07/30/11 03:37 AM
Backdoors and the Infinite
by ZeroCoolStar - 07/10/11 03:52 AM
HackThisZIne #12 Releaseed!
by Pipat2 - 04/28/11 09:20 PM
gang wars? l33t-wars?
by Gremelin - 04/28/11 05:56 AM
Consolidate Forums
by diggin2deep - 04/21/11 10:02 AM
LAN Hacking Noob
by Gremelin - 03/12/11 12:42 AM
Top Posters
UGN Security 41,392
Gremelin 7,203
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Likes Received
Ghost 2
Cyrez 1
Girlie 1
unreal 1
Crime 1
Powered by UBB.threads™ PHP Forum Software 7.7.5