Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

MyCoolStory.cpp

Name: Anonymous 2011-04-06 9:56

>write awesome but buggy as hell C program to kick ass at minesweeper
>1 second top score on expert mode.  .47 seconds if I use a clone that keeps track of decimals.
>nagging feeling that I'm being a noob by writing in C and not C++
>learn C++ and rewrite program using classes and maps and vectors and lists and that kind of shit instead of just arrays.
>program works perfectly now, code is much cleaner, but it can't solve an expert board in under 10 seconds
>switch on every speed optimization I can find in Visual Studio
>times down to 6-7 seconds
>decide to rewrite the whole thing in C again from scratch so maybe it can be fast AND reliable at the same time
>change mind and decide to bitch to /prog/ instead and then take a nap

Name: Anonymous 2011-04-11 23:56

>>43
it's because the program tries to read a square before it's redrawn on the screen, but somewhere in the middle of 5 GetPixel calls it finally updates, and tricks the program into thinking it's a different type of square than it is.  apparently XP has always been updating the screen faster than my program could read it, so it wasn't an issue.

trying to figure out a workaround that won't slow things down.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List