Coldest
November 23, 2024, 11:19:50 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: I've changed anti-bot strategies, so hopefully the rash of bot registrations will stop. Smiley
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Code Refactoring  (Read 5086 times)
0 Members and 1 Guest are viewing this topic.
wulfderay
Newbie
*
Posts: 3


View Profile
« on: April 21, 2012, 10:42:09 PM »

Hi, I'm wulfderay.   I'm very impressed with your game.  I am a programmer (4th year student) and I was wondering if I could offer my help.  I downloaded your source code and took the liberty of doing a bit of refactoring.
Here's what I've done so far:
- moved the source code into its own directory
- moved the xml in the gui dir into its own directory (so there is a ./gui dir for xml and a ./src/gui directory for the source)
- separated the source code into directories (roughly) and updated the includes and CMakeList.txt to reflect this
- separated the code in coldest.cpp that pertains to the dedicated server and put it in its own file, updating CMakeList.txt to reflect this
- abstracted out some code that was used for both the dedicated server and the client and put in its own file

If you are interested in taking a look at these changes, I can give you back a copy of the code, just let me know if you do and how you'd like the copy.
I'm not super great with git (more used to svn), but if you want a branch or something we can figure it out.

Again, sweet game.  I look forward to working on it (if you want me to).
Logged
Cybertron
Coldest Developer
Administrator
Full Member
*****
Posts: 77



View Profile
« Reply #1 on: April 24, 2012, 05:01:58 PM »

Sorry for not getting back to you quicker, been busy the past couple of days.

Those sound like good changes.  I've even considered making some of them myself, but never had the motivation. Wink  I'm not positive what the best way for you to send the changes to me is, but the first thing I would try is running a git diff and sending me the output.  Git's pretty smart about recognizing changes like this so hopefully it will be able to figure out what you've done.  If not, we'll have to figure something else out.

If the resulting file is small enough, just attach it to a forum post.  Otherwise, let me know how big it is and we'll figure out some other way to get it to me.
Logged
wulfderay
Newbie
*
Posts: 3


View Profile
« Reply #2 on: April 25, 2012, 08:24:04 AM »

The diff is about 2 mb, so I'll email it to you.  I don't actually know your email address, and all of the ways I have to message you have a character limit ... can you send me your email addy in a private message? BTW, I'm not 100% sure if it picked up the fact that I moved some files  (I didn't know about git mv) but if it didn't I can go back and do it the proper way.  Note that this is still a work in progress to give you an idea of what I'm up to.
Thanks,

Mark/wulfderay 
« Last Edit: April 25, 2012, 08:41:02 AM by wulfderay » Logged
Cybertron
Coldest Developer
Administrator
Full Member
*****
Posts: 77



View Profile
« Reply #3 on: April 28, 2012, 11:09:43 PM »

Okay, I sent you my address.  If it just missed moved files I shouldn't have much trouble reproducing those changes, but we'll see how it goes.
Logged
Cybertron
Coldest Developer
Administrator
Full Member
*****
Posts: 77



View Profile
« Reply #4 on: May 14, 2012, 10:05:39 PM »

Sorry, I should have gotten back to you earlier.  It's a bad time of year for this because the weather here is so nice that I'm spending all of my time outside. Smiley

The diff was definitely problematic because it didn't pick up the new locations for any of the files.  I also had some problems with inconsistencies between our source trees because of changes I've made since you last pulled from the repository.

Unfortunately, at this point I think the simplest solution is going to be to pull down a fresh copy of the Git repo, reproduce your file moves with git mv, and then copy over the changed files from the original edited source tree (so don't overwrite it with the new copy Wink).  The git diff for that should cover all the changes and as long as I don't make any further changes it should apply cleanly here.

You could also try git adding all of the moved files again, but I'm not sure if that will retain their history and it won't solve the inconsistency problem.
Logged
wulfderay
Newbie
*
Posts: 3


View Profile
« Reply #5 on: May 14, 2012, 10:09:21 PM »

Ok. Will do.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.105 seconds with 17 queries.