PDA

Click to See Complete Forum and Search --> : [Resolved] DirectX (DDraw) HighScore


McCain
Jan 28th, 2002, 04:04 AM
I want to add a highscore list to the game I'm making and my question is: How should I display the highscorelist? Should I make another form with all new surfaces and just hide/show the different forms or should I hide the surfaces I have for the game and display highscorelist surfaces?

Thanks

PsychoMark
Jan 28th, 2002, 09:16 AM
Change the surface you're displaying...

Here's an old game I once made, also display a highscore list, might be useful to you: http://psprogramming.virtualave.net/index.cgi?page=projects/mouseattackdx.html

McCain
Jan 28th, 2002, 02:55 PM
Ok, I d/led your game but it didn't work, when I tried to open it in vb it said it could not find the Credits class so I couldn't run it. When I tried the exe it said "Run-time error '91': Object variable or With block variable not set." I looked at the sourcecode but it was to complicated - I've never used classes, hell, I don't even know how/why to use modules...
How many surfaces can one use? (I know it depends on how much RAM you have, but how many are reasonable?) I mean, I have 8 surfaces and the game I'm making is a pong game... (I know it has been done like a million times before but it's my first DX game, ok?)

PsychoMark
Jan 28th, 2002, 03:01 PM
Depends on how much memory you've got and how large the surfaces are, but even with a low-end pc you can store a lot more than 8 surfaces, so don't worry about that :)

McCain
Jan 28th, 2002, 06:56 PM
Now I have a new problem with my highscorelist...
How do I get the player's name? Do I have to use some wicked KeyPress code?

McCain
Jan 28th, 2002, 07:03 PM
Another question: How do I display text in different sizes? Like if I wanted some text to be in size 12 and some other text to be in size 20

PsychoMark
Jan 29th, 2002, 02:27 AM
1. Yes, you'll have to implement your own textbox-like field. I think it is possible to use the default one, but I don't know how and I think it looks ugly :)

2. Change the font between two TextOut calls...

McCain
Jan 29th, 2002, 11:52 AM
Could you please give me some help with the textbox code, I have no idea where to start...
TextOut? I use "Call backbuffer.DrawText(X, Y, "text", False)" to display my text...

McCain
Jan 29th, 2002, 06:06 PM
Ok, I got the textsize thing sorted out, now I only have to figure out the input thing...

McCain
Feb 3rd, 2002, 03:12 PM
It was even easier then I thought it would be, all I had to do was to use the KeyDown and Chr() to get the key and put in a string. Now I have a beutifully (?) writen HighScore system using a .ran file :)