Code documentation.

Discussions about the internal structures of the game. You can also post here if you'd like to know how things really work (and don't know how to read C code).

Code documentation.

Postby GeoVah » Sun Dec 19, 2004 12:51 pm

Hi,

After my first look in the bygfoot C code, there is my first impression :
Very good !!
But (yes there is always one but...) the code documentation is not present.
For some school project, We're using doxygen tools -http://www.doxygen.org- (like javadoc tools):
It's generate Code documentation from tag found in .h (and .c file). There is one example :
Code: Select all
/**
 * This is a dummy function
 *@param  dummy a dummy param
 *@return Return Always 42
*/
gint answerOfUltimateQuestion(int dummy);


The idea behing : improve the code legibility, we know what the function does and information about parameters, just reading the .h file and not read inside .c file.
More over doxygen generate good documentation in html.

I think this can help someone to send patch/contribution if he can read and understand only with .h and not go inside .c.

Some functions are documented but not in doxygen format so... :-(.
Geovah - geovah@jabber.sk- (yes i'm french...)
GeoVah
 
Posts: 50
Joined: Sat Dec 18, 2004 10:38 am
Location: Sophia Antipolis - France

Postby Guest » Sun Dec 19, 2004 1:34 pm

*sigh*... i always hated writing docs :oops:

but of course you're right. i promise to use doxygen in the 1.9 branch (provided it's not too complicated, but i don't think so).

and of course you can ask me about the (undocumented) code anytime.

gyözö

edit: sorry wasn't logged in.
Guest
 

I wish to document BFM

Postby Nadeem » Tue Feb 15, 2005 10:14 am

Hello people
I am a student in a computing degree course, and I live Mauritius.
I am undertaking an online soccer simulation game (using J2EE) as my final year project and I came across your game.

I wish to understand more of you game logic (behind the scenes). I will document your functional specifications to some extent, and with your permission I shall use a few design pieces from your project and adapt it to my game.

Regards,
Nadeem M Nayeck
Email: nadeem@clickpost.com
Nadeem
 

Re: I wish to document BFM

Postby gyboth » Tue Feb 15, 2005 12:28 pm

Nadeem wrote:Hello people
I am a student in a computing degree course, and I live Mauritius.
I am undertaking an online soccer simulation game (using J2EE) as my final year project and I came across your game.

I wish to understand more of you game logic (behind the scenes). I will document your functional specifications to some extent, and with your permission I shall use a few design pieces from your project and adapt it to my game.

Regards,
Nadeem M Nayeck
Email: nadeem@clickpost.com
hi there,

you're welcome to use any part of the code. unfortunately it's not well documented :oops: but i will answer any questions that might arise. good luck with your project :-)

gyözö
Press any key to continue or any other key to quit.
gyboth
Site Admin
 
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany

Re: I wish to document BFM

Postby nadeem » Wed Feb 16, 2005 6:50 am

gyboth wrote:hi there,

you're welcome to use any part of the code. unfortunately it's not well documented :oops: but i will answer any questions that might arise. good luck with your project :-)

gyözö


Okay, actually my most important concern is how is a football match simulated? Can you point me to the C source files where the simulation engine is located? I'll try to study it and I'll ask you whatever questions I may have.
nadeem
 

Re: I wish to document BFM

Postby gyboth » Wed Feb 16, 2005 8:04 am

nadeem wrote:Okay, actually my most important concern is how is a football match simulated? Can you point me to the C source files where the simulation engine is located? I'll try to study it and I'll ask you whatever questions I may have.
the match outcome functions are in 'game.c' (you'll want to look at the ones beginning with process_ and prg_). you can ignore the objective_ functions at the end of the file.

basically, the match simulation works like this: based on a team's players, structure (e.g. 442) and playing style (e.g. Defend) the attack and defend values of the team are calculated. then the number of scoring chances for the team are calculated, using the attack value and the opponent's defend value. then, each scoring chance is simulated using the attack value, the opponent's defend value and the opponents goalie value. this is done for both teams.

in fact this isn't simulating a real football match, but it's a concept that gives realistic match outcomes and is easy to handle.

gyözö
Press any key to continue or any other key to quit.
gyboth
Site Admin
 
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany


Return to Code discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron