Try My Game?

Please post when you release your new version.

NGinEar: Yes, I forgot to mention the one about the balls rolling out of the pool table. Made me laugh.

Update:

I’m just popping in to let you guys know that I’ve added some improvements and eliminated some of the key bugs mentioned here.

I’m going to hope I have, at least.

I’ve got a few more things to do, and I’ll probably upload the revised game in a few days.

Btw, a guy in another forum recommended a way to quickly aim the cue stick, which improved functionality quite a bit. It’ll make it less cumbersome.

[This message has been edited by Archimedes (edited 09-29-2002).]

Very good.

One thing though.

The friction seems to be quiet right, except that you should lower the momentum of a ball when its a wall, dependent of the angle it hit that wall:

m_fltMomentum -= a_fltFactor * sin (m_fltAngle);

The reason is that a ball cant pass its momentum to an wall and therefor gets slowed down a bit.

Nice work!

Thanks, Nothing.

Yes, I’d already done that. And it does allow me to keep the force high, and friction low without the balls bouncing across the table 7 times.

I think the friction is low enough this time around, though you probably have a better feel for it than I do.

Okay guys, I’ve uploaded the updated version. I added better mouse functionality, added wall dampening, improve ball-wall collision dynamics, and improved a few other things.

Thanks for your suggestions, and, if you like, you can download the latest and let me know what you think!

www.alwayslearn.com

[This message has been edited by Archimedes (edited 09-30-2002).]

I was hoping for some feedback on how it plays now.

Ribot, does the screen problem you were having still occur?

Any other feedback would be appreciated!

When I tried to run your program, the following error occured:

“wglUseFontOutlines Failed!”

So please tell me what’s going on?

Thanks.

[This message has been edited by Dong Ke (edited 10-02-2002).]

Thanks, Dong.

I’m not sure. It appears that you are creating your fonts fine, and that SelectObject is working,
but it goes bad right at the call for wglUseFontOutlines.

I supplied the code below, perhaps you or someone has ideas?

Btw, can you provide your system specs?

void Scoreboard::text()
{

HFONT font;

base = glGenLists(256);

font = CreateFont( -6,
0,
0,
0,
FW_BOLD,
FALSE,
FALSE,
FALSE,
ANSI_CHARSET,
OUT_TT_PRECIS,
CLIP_DEFAULT_PRECIS,
ANTIALIASED_QUALITY,
FF_DONTCARE|DEFAULT_PITCH,
“Comic Sans MS”);

if(font == NULL)
throw “In Scoreboard::text – CreateFont failed”;

HDC mhdc = wglGetCurrentDC(); //
if(SelectObject(mhdc, font) == NULL)
throw “In Scoreboard::text SelectObject Failed”;

if(!wglUseFontOutlines( mhdc,// Select The Current DC
0, // Starting Character
255, // Number Of Display Lists To Build
base,// Starting Display Lists
0.0f,// Deviation From The True Outlines
0.2f,// Font Thickness In The Z Direction
WGL_FONT_POLYGONS,// Use Polygons, Not Lines
gmf))// Address Of Buffer To Recieve Data
throw “wglUseFontOutlines Failed”;

}

[This message has been edited by Archimedes (edited 10-02-2002).]

Dong, I just had a thought.

Did you get more than one error message? It’s possible that the way I had my code originally you got a “CreatFont failed” error". I had my error checking set up rather poorly. I thought I’d gone through all of my code, but I guess not. My Bad.

If that’s the case, then you may not have the “Comic Sans MS” font on your harddrive.

Just a guess for now, but pop up an MS application like WordPad, and look through available fonts see it it’s not there. If it’s not, then that’s the problem. I’ll probably have to create a backup for this case.

Let me know if I’m right!