Jump to content


Photo

Fao Nachtwolf - Patches


  • Please log in to reply
9 replies to this topic

#1 AndyS

AndyS

    Sergeant

  • Forum Members
  • PipPipPip
  • 13 posts

Posted 14 December 2007 - 09:30 AM

Nachtwolf

Okay - so I thought about breaking down my patches into more manageable sizes then decided I'd start all over again and do it in much smaller pieces trying to concentrate on one class at a time and be more methodical about all the things I wanted to "improve". So here we have a few dozen small patches each of which changes very few things at any one time - typically one where I can help it. I started with Soldier. I've done Cell but won't post that until I get more feedback.

I would have posted to mantis but it seemingly has a habit of falling over....

Each is a unified diff of my repository generated using TortoiseSVN, developed in Eclipse with formatting set to K&R (or at least almost K&R seen as the guidelines don't quite match).

Also included is the svn log file detailing (briefly) what each diff does and the files it touches. What isn't included anything about why I've done any of the changes I propose. I can do and am happy to do so if in theory at least you're happy with the code. Most of this stuff is based on work by Herb Sutter & Scott Meyer (code quality) or Martin Fowler and other (refactoring). Typically I'm aiming to make the code more readable and more resilient. This is all small stuff to start with to encapsulate the class better - by removing access to internals through public member variables or friendship and to reduce compile dependencies by rationalising the includes.

The diff files are based on my repository and so file versions and file locations are not those of the UFO2000 svn repository. A quick search and replace or simple awk/sed script will do the trick to fix them to act as patches for a working copy of UFO2000.

Give me feedback and we can take it from there.

Andy

Attached Files



#2 Kraplax

Kraplax

    Sergeant

  • Forum Members
  • PipPipPip
  • 24 posts

Posted 27 December 2007 - 08:00 AM

I've done Cell but won't post that until I get more feedback.

Well, it would be better if you explain a bit more about your patches. Not the inner things but in common. Like, if i apply these patches can i play with others who haven't applied them? If i'm using the .1086 beta is it possible?
How do these pathes influence on the performance?
Please, provide some info for non-nerd'ish programmers, but common users who just able to apply patches to the source code.
Be so kind =)

#3 Guest_Azrael Strife_*

Guest_Azrael Strife_*
  • Guests

Posted 27 December 2007 - 05:55 PM

non-nerd'ish programmers, but common users who just able to apply patches to the source code.

ROFL ROFL

#4 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4113 posts

Posted 27 December 2007 - 08:42 PM

non-nerd'ish programmers, but common users who just able to apply patches to the source code.

The common user wouldn't know how to apply them in the first place.

#5 Guest_Azrael Strife_*

Guest_Azrael Strife_*
  • Guests

Posted 27 December 2007 - 09:22 PM

non-nerd'ish programmers, but common users who just able to apply patches to the source code.

The common user wouldn't know how to apply them in the first place.

Not to mention he wouldn't have a NEED to do so :P

#6 Kraplax

Kraplax

    Sergeant

  • Forum Members
  • PipPipPip
  • 24 posts

Posted 31 December 2007 - 08:10 AM

he-he... well, the thing is that if one able to google on 'apply patch how-to' then it wouldn't be nerdish, but still, if these patches are there then there were some points to post them, right? Just, please, tell a little bit more about your patches (see my prev post).
Are these patches just the matter of refactoring? or maybe there are some bugfixes and incompatibilities? Just a couple of sentences would be fine, i hope.

Edited by Kraplax, 31 December 2007 - 08:13 AM.


#7 Guest_Azrael Strife_*

Guest_Azrael Strife_*
  • Guests

Posted 31 December 2007 - 11:11 AM

he-he... well, the thing is that if one able to google on 'apply patch how-to' then it wouldn't be nerdish, but still, if these patches are there then there were some points to post them, right? Just, please, tell a little bit more about your patches (see my prev post).
Are these patches just the matter of refactoring? or maybe there are some bugfixes and incompatibilities? Just a couple of sentences would be fine, i hope.

You don't seem to understand. These patches are posted here for Natchwolf, not for the average player. These patches are not the kind of patches you see in commercial games, they are modifications to the code that not necessarily fix bugs, they are modifications, additions.
And there is no "apply patch how-to", every project, every program, has its own way of applying patches (you need to know what kind of compiler they use, dependencies, etc). And there is no "non-nerdish" (whatever that means) way of explaining what they do, I suppose.

#8 AndyS

AndyS

    Sergeant

  • Forum Members
  • PipPipPip
  • 13 posts

Posted 31 December 2007 - 12:21 PM

he-he... well, the thing is that if one able to google on 'apply patch how-to' then it wouldn't be nerdish, but still, if these patches are there then there were some points to post them, right? Just, please, tell a little bit more about your patches (see my prev post).
Are these patches just the matter of refactoring? or maybe there are some bugfixes and incompatibilities? Just a couple of sentences would be fine, i hope.

You don't seem to understand. These patches are posted here for Natchwolf, not for the average player. These patches are not the kind of patches you see in commercial games, they are modifications to the code that not necessarily fix bugs, they are modifications, additions.
And there is no "apply patch how-to", every project, every program, has its own way of applying patches (you need to know what kind of compiler they use, dependencies, etc). And there is no "non-nerdish" (whatever that means) way of explaining what they do, I suppose.


Azrael is spot on - these patches are only for Nachtwolf to comment on regarding what Nachtwolf would like to see in terms of info as a committer. They were posted here because the bug tracker was playing up.

The patches are extremely "nerdish" - the only thing they seek to do is improve code readability (in very very small stages). There is no functional improvement and therefore no interest to gamers. The whole purpose is to start to refactor code to make it more maintenance friendly. These are exteremly small scale internal changes to compilation and class structure.

Sorry for the delay in picking this thread up - I've been enjoying the festive season without computer.... How is it possible I hear you cry.... :-)

#9 Kraplax

Kraplax

    Sergeant

  • Forum Members
  • PipPipPip
  • 24 posts

Posted 01 January 2008 - 01:39 AM

They were posted here because the bug tracker was playing up.


The patches are extremely "nerdish" - the only thing they seek to do is improve code readability (in very very small stages). There is no functional improvement and therefore no interest to gamers. The whole purpose is to start to refactor code to make it more maintenance friendly.


Oh, that was the clearest description. Thanx. So, one may apply or may not apply them - no functionality changes will happen. It's just for programmers. Right.
Thanks again =)

#10 nachtwolf

nachtwolf

    UFO2000 Staff: Leader

  • Moderators
  • PipPipPipPip
  • 310 posts

Posted 13 January 2008 - 10:15 AM

Got them for review. ETA one week along with Cirix new patch.

Expect a commit to the source if both are good and possibly a new beta release if there is enough new shiny material to build one.

^_^
Posted Image