PDA

Click to See Complete Forum and Search --> : Commentary?


scotty85_2000
Feb 10th, 2001, 07:16 AM
I'm currently in the process of making a simple football manager game. In the matches, I want to have a form of written commentary on the screen which the user will press a key to advance.

What do you think is the most economic way to do this?
Try not to talk in VB cos I'm a newbie,
Cheers ;)

Sastraxi
Feb 10th, 2001, 08:30 AM
Try just adding a textbox (the 'abc' control) to the main form and then just adding text. Make sure to set the scrollbars to vertical, so the user can scroll up and down. Of course, in the later stages of your game, you'll probably want to do sound to do the commentary, reminiscent of Madden 2001. When something comes up, try playing a sound with the variable snd_sync in the flags property. I'm sure someone else would be happy to do this; I just woke up and I'm not up to it.

scotty85_2000
Feb 11th, 2001, 02:09 AM
i know i could do it like this and more importantly for once I could actually pull it off without getting any coding from the forums ;)

however, that would make the commentary the same for every match with no random element... and i would also like to use slightly different commentary for different types of match ie cup matches and league matches... any other suggestion on this anyone?

Arcom
Feb 11th, 2001, 06:13 AM
You could write all your comments into a plain text file (or even a binary, if you want), and then load them in an array when the game starts. Every match could have it's own comments file and you could split comments so that, for eg. 1-10 are for bad playing, 11-20 for good playing, etc. Then, when you want to display them, generate a random number and display that comment...

Sastraxi
Feb 11th, 2001, 09:56 AM
Do what Arcom says, it will be easiest that way.

However, you should have more than one text file (maybe 10) with names like:

final.txt - The final match of the season
superb.txt - Superbowl
match.txt - Just a one game season, a custom game
season.txt - A regular season
training.txt - In training for the new season
...
...
...
etc.

Your format should follow this:

Whoa! What a wondeful pass from #T to #C!
Ouch, #PP going to feel THAT one in the morning!
etc, etc...

#T - thrower
#C - catcher, reciever
#P - player (eg. McFari)
#PP - player plural (eg. McFari's)
#TN - team name (eg. the Eskimos)
#M - manager's name (eg. Davi)
#MP - manger plural (eg. Davi's)
...and other things.

These signs will be translated when found in text in your VB program. So a line could be:

Whoa! What a wonderful pass from Rockett to Gremier!
Ouch, Gremier's going to feel THAT one in the morning!
Touchdown! A touchdown, scored by Gremier!
Rockett kicks the ball...
Kinglenton of the Eskimos recieves!

You get the point. It will make for a pretty good commentary. Of course, you will have to have a lot of .wav files (or .mod files, if you use that format) for the player names. If you want, you can either use their position (eg. A person created a player called Mike Gremier, and he's the quarterback. You can say:

Whoa! What a wonderful pass from the quarterback to Rockett!

Or, you can attempt to use text-to-speech to get the computer to say his name. (It will sound horrible))

Arcom
Feb 11th, 2001, 03:38 PM
Nooo, don't use text-to-speech engine!
:) You don't want to frighten people :)

scotty85_2000
Feb 12th, 2001, 12:36 PM
So how would I implement this? Anyone got anytime to spare to do some coding to show me how it will work?
I think the commentary will be shown in a text box, and the user will press space to advance it. We're talking maybe 10-15 stages of commentary for each match from beginning to end.

How would I generate a random number and then take that line from the text file etc, and how do i show the names of players and teams in the actual game? The name data will all be taken from databases, although i could set database values as variables first...

Any suggestions?

scotty85_2000
Feb 16th, 2001, 03:47 PM
c'mon guys, i need the help! i'm now ready to do this and then i'll have a simple beta up and running... i just need a few examples of coding and the text files i need to store the commentary, how i should lay them out etc
basically just to illustrate in some detail the process described by arcom and sastraxi...
looking forward to the help...
cheers :)

scotty85_2000
Feb 18th, 2001, 06:35 AM
PLEEEEEAAAASSSEE!!!!