Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / 3d pong AI

Author
Message
Jman
18
Years of Service
User Offline
Joined: 25th Apr 2006
Location:
Posted: 27th Apr 2006 08:10
I'm working on a 3d pong type game, and I got the basics down except for a simple computer AI. This is what I have so far, its in DBC:



Sorry about the random colors, I'm just testing out some lighting and fog effects. Another problem I'm having is that I want to use a texture for the matrix, but once I load a bitmap, get the image, and apply it to the matrix, the text in the upper left corner disappears. I tried using the command that brings 2d above 3d, but to no avail. Any help would be greatly appreiciated!

-Jman
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 27th Apr 2006 12:15 Edited at: 27th Apr 2006 12:25
this game is looking rather good, hard and easy to play, i edited it a little bit to make it slightly easier though, because the computer was simply always in the right place....


[edit]
ok just wanted to try the texture and spotted what was making it so easy for the computer.... the ball has a random speed

anyway here's the updated code... mine works with texture, just replace the texture name with ur own (think this is what u wanted)

also u should look into changing the speed of the ball and computer based on difficulty settings

life's one big game
spec= 2ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Apr 2006 00:20
Quote: "once I load a bitmap, get the image, and apply it to the matrix, the text in the upper left corner disappears"


The Sync command simply updates the 3D screen - overwriting any 2D text on the screen.

Move the Text command lines to AFTER the Sync line.

TDK_Man

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Apr 2006 01:17
Quote: "Move the Text command lines to AFTER the Sync line."


I don't think that would help at all. Smallg's solution is the way to do it.
Jman
18
Years of Service
User Offline
Joined: 25th Apr 2006
Location:
Posted: 28th Apr 2006 05:53
thanks smallg, I got it working now, and I got decent AI going. So now I face my next fundamental problem, which is winning. Right now I've added 2 sub routines that should exit the main loop, but for some reason when I print "Computer Wins" or "Player Wins" on screen, and then immediatly after place the wait key command, the text just flashes on the screen for a split second. Any suggestions for how I can make it stay on screen?



p.s. - you have to put a texture in.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Apr 2006 19:54
Jman:

Did you read my post?

Did you try it?

Did it help?

!!!

TDK_Man

Jman
18
Years of Service
User Offline
Joined: 25th Apr 2006
Location:
Posted: 29th Apr 2006 08:29
TDK_Man:

Yes

No, I used smallg's suggestion

Thankyou for helping though, I appreciate it. Unfortunatly, as far as my latest problem is conserned, yes, the text commands are outside of the sync, as well as the main loop all together.

!!!

-Jman
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 30th Apr 2006 16:02 Edited at: 30th Apr 2006 16:06
the best.... i didn't move and it went to 14 all... then i lost anyway... i'll try to fix it now, lol

[edit]
here u go


life's one big game
spec= 2ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic

Login to post a reply

Server time is: 2024-09-24 21:38:31
Your offset time is: 2024-09-24 21:38:31