I'm looking for an example/tutorial for a basic echo server using winsock (WIN32). I use MinGW and I prefer to stay away from C++ because C makes more sense to me.
I've tried googling but I must...
Type: Posts; User: OhPoo
I'm looking for an example/tutorial for a basic echo server using winsock (WIN32). I use MinGW and I prefer to stay away from C++ because C makes more sense to me.
I've tried googling but I must...
I grasp everything you're saying. It makes perfect sense. I've been able to make major speed improvements by making the graphics buffer a global variable and only create it once.
To clarify, I...
Wait a min... are you compiling it as a windows program?
Just for the record, is it taboo to GetDC at the beginning of a program and not release it until the very end? Every tutorial gets and releases the DC on every redraw of the screen.
@ msh: I tried adding CS_OWNDC a while back, no difference unfortunately =(
@ VirtualAce: You're suggestion help alot but I'm still not totally satisfied with it. At times the frame rate gets down...
Is there a reason why printf() wouldn't be appropriate?
Another soul goes to the dark side LOL
Just for the record, I wasn't trying to be sarcastic in that first sentence. I just realized now that I kinda comes off that way. :cool:
@stahta01:
Because I used the strings provided in the original code. I didn't know there was any difference between mastermind and Cows & bulls as I've never played either. I'm just trying to...
@stahta01: I didn't want to over complicate the program with duplicate checking since the game rules state that all the numbers have to be unique. "1111" is not a legal guess.
"On a sheet of...
@oogabooga Explain
I looked up the game and it seemed interesting so I just changed yours all around to make it work. I don't mind answering questions if you don't understand something.
Two things to note:
1. I...
I don't know if you terribly attached to scanf() but if I were you I'd probably be using fgets();
Like this:
//at top
char guess[5];
//to get input
fgets(guess, sizeof(guess), stdin);
That was very helpful! I made the necessary changes and I'm still having the speed problem.
I decided to try commenting-out the the throttling all together to see what happened. It's really...
By the By, the game loop is nested in this kind of message pump:
PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE);
while (msg.message!=WM_QUIT) {
if (PeekMessage( &msg, NULL, 0, 0,...
Thanks alot for taking interest in my question. Win32 is not easy to learn these days unless you can afford to buy a reference book. I can't find much on the internet at all.
All my code is plain...
This thread sort of belongs in game programming but it's mostly a win32 problem so I put it here.
I don't want to add my code unless I have to because it's alot to copy any paste; 100+ lines of...