PDA

View Full Version : Time Bonus Screen


Kjurtyl
2002.05.22, 05:50 PM
While doing this task I was at one point completely stumped. When I displayed the time bonus on screen I would get some huge number every time, but when I added the time bonus to the score I would get something more appropriate. Despite that both actions depend on the same timeBonus variable.

I was about to post a thread here seeking help when I took a closer look at the code snippet Mark had provided to show a string on the screen. It worked fine so I had assumed everything was ok on that front, but on closer inspection, the string contained %d to display the time bonus. Considering the progress bar only returns doubles which is what the timeBonus is based on... Whoops.

What's the moral of this little story? It is twofold: First, always check foreign code before using it - and make sure you understand it. Second, %d is for Integer not Double... [self bonkHead] (I should've known it too.)

Although I now feel very stupid, this task is now more-or-less complete. What it needs now is something more interesting to show on-screen than some string in chicago 24 pt. I was thinking perhaps our graphics people could come up with a proper screen. I'm looking for something along the lines of the Game Paused screen (the one with the rectangle and icicle text.) With "Time remaining:" , "x10" and empty boxes where I would programmatically display the appropriate numbers.

Sounds good?

-Kjurtyl

DaFalcon
2002.05.22, 10:26 PM
I'm up for creating the screen if you guys want it :-) It will be nice to finally be rewarded for rushing through a level, which I do mostly because I'm just impatient :-)

Would you want icicle number graphics 0-9 to display the time remaining?

Pazolli
2002.05.23, 09:29 AM
This is great to hear, as you may have noticed, I've been a bit busy lately. But I'd like to get the Jukebox stuff worked out and the rock tiles implemented soon.

Mark.

Kjurtyl
2002.05.23, 01:08 PM
It would be very nice to have icicle numerals to play with.. although it would complicate things a tad bit. If you provide the graphics, I'll do my best to implement them.

DaFalcon
2002.05.24, 06:46 PM
One more week of finals, then .. freedom! I should have some numbers for you to play with within 10 days :-) Any pixel dimensions you'd prefer?

DaFalcon
2002.05.25, 04:33 AM
Well, I had some time so I worked on it among other things tonight:

. . . . . . . .http://members.aol.com/alanfalcon/bonustime.jpg

I have the numbers in 10 seperate tif files right now, do you want them like that? Also, I have a version of the screen shown below with just the text:
Time Remaining:
x10
As it is shown above, the entire game screen is covered by a 75% opacity white rectangle, to make the text more readable. (obviously this is a mock-up as all enemies must be dead before you'd get this screen, but you get the idea!) Also, I added the all of the numbers to this picture so you can see them, they wouldn't normally be there (unless you wanted to show a total of points earned in the level, and it happened to equal 0123456789...) Let me know if you want the graphics, and where to send them ...

Kjurtyl
2002.05.25, 02:58 PM
This is very close to what I had in mind, excellent work! I don't have any dimensions in mind, but I like the proportions of the various items as they are. Perhaps we should also include a "Bonus:" right where the 0-10 numbers are right now? I would then present the total bonus right under that heading.

You can send the graphics at kjurtyl@mac.com

With just a string and regular numbers, I've put in a little animation in this screen that drains the progress bar on top and totals up the bonus. In order for it to work properly I've had to reverse the flow of time (in game only..) Therefore the time now starts full and decrements every second - like a fuse.

If anyone has any opinion on why this might be better/worse than the other way I'd like to hear them before I go too far this idea.

-Kjurtyl

DaFalcon
2002.05.25, 06:22 PM
I actually always thought the time bomb diffusion of the progress bar method would work better and be a tiny bit more intuitive than the current timer bar, because time is running out, not ... filling up. So I like that method more :-) And I will send you the graphics soon as I have a chance, probably within 24 hours if not sooner.... (sooner than within 24 hours? Is that possible? Wouldn't that have to be something like 25 hours ago to be true? Whatever :))

DaFalcon
2002.05.26, 02:41 AM
Well, I've sent off the graphics, so let me know if anything doesn't work out ...

Pazolli
2002.05.26, 06:27 AM
The graphics look great DaFalcon and I'm content with the time diffusion idea as well and look forward to seeing Kjurtyl's work soon.

Mark.

Kjurtyl
2002.05.28, 08:41 PM
It is unfortunate that I wasn't able to complete my changes before this update was released. For the curious, the time bonus screen is now fully implemented.

Before I commit the changes however, I have a few questions to settle first. To begin, (this is directed at DaFalcon,) I'd like to know why you sent me a set of smaller sized numerals than the ones that were in the screenshot you've shown me (as seen above). I liked those much better.

I have other concerns, but I'll see how it goes with a larger set of numerals before mentioning them.

- Kjurtyl.

DaFalcon
2002.05.28, 11:49 PM
I thought I sent the same graphics to you as what I had in the screenshot . . . they should be just large enough to fit in a 36x72 rectangle, because that is what I had in the screenshot (and the only numbers I made until I made the large numbers for the get ready screen.)

Hmn, just tell me what you want, and I'll try to get it to you :)

Kjurtyl
2002.05.29, 12:18 AM
Well I am boggled at this point. I transfered the numerals in a graphics app and they got to their regular (screenshot) size, but when I open em up in Preview I get the mini-numerals that show up in-game. Some sort of scaling effect happening here? The files appear to be the right ones, maybe it's some resolution thingy...

This is rapidly getting confusing.

One thing I would appreciate however, is a new timebonus graphic, I'm not entirely happy with how this one is turning out. I'd like the whole tiff covered in white (forget the boxes thingies), along with more space between time remaining x10 and bonus. Perhaps with bonus being center-aligned rather than left-edge too.

-Kjurtyl

DaFalcon
2002.05.29, 02:01 AM
It sounds like I may have sent you 150 dpi images without realizing it, instead of the 72 dpi images I meant to create! Sorry, I sometimes forget to change things back to normal when I am messing around with settings for various projects...

I will try to get you a new timebonus graphic, as well as properly scaled numerals. Sorry for the confusion!

Kjurtyl
2002.05.29, 01:07 PM
I can confirm that the numerals I have are indeed of the 150 dpi kind.

Eagerly anticipating the new graphics..

-Kjurtyl.

DaFalcon
2002.05.29, 07:36 PM
I'm really sorry about the mix up :-) I try to do too much at once, sometimes...

here are some revised graphics for you, with a complete screen (if you place it over the game screen, it will automatically add the semi-transparent white everwhere) so all you have to do is place the numbers in the right place. And the number graphics are now properly 72dpi :-)

Revised Graphics (http://www.snakequest.com/other/Revised%20Time%20Bonus%20Graphic.sit)

Kjurtyl
2002.05.29, 11:54 PM
done...done and ... done. Although I personally believe it could go through a few more optimizations, I did commit the bonus screen to the cvs. I've had to come up with some new methods to get what i wanted done, those might be replaceable with more reusable ones - or ones that already existed that I didn't know about.

One thing that concerns me is speed. I'd like to hear about everyone's experience with the screen, see if it is slow/fast for people. On my machine it felt somewhat slow until I put in some changes to fix just that.

-Kjurtyl.

Pazolli
2002.05.30, 09:39 AM
Excellent work Kurjytl! :)

Mark.