Game Development Community

Modifying engine code

by J. Alan Atherton · in Torque Game Engine · 04/07/2003 (4:10 pm) · 2 replies

For my game I will need to make changes to player.cc and such (as I imagine many games do). I would like to continue getting CVS updates, and so I am trying to determine the best way of modifying the source. It seems the best way would be to make/derive a new class. When it comes to things that actually need to be _changed_ in the source (not just adding a new, different type of player), what will happen when I update from the CVS? I can't think of any such changes, and hopefully this kind of thing will not be necessary, but I just want to get things in order so I won't have to backtrack too much. This is the first time I have worked with such an engine... so as much help as you can give will be greatly appreciated.

EDIT: spelling corrections.

#1
04/07/2003 (6:17 pm)
CVS is pretty good about merging with modified source. Occasionally you may have to clean something up but it is generally not a problem as long as update pretty frequently to minimize the number of changes necessary.
#2
04/08/2003 (2:20 am)
I remember this question coming up last year ... oh well, here goes. :D

I actually use two PC's for my game development. I have a linux box which acts as a Internet Gateway, SMB File Server and as a CVS server. I also use it to host NWN Linux Server but thats another story. :P

The other machine is the Windows development box. This has two directories which is of interest to you:
d:\projects\torque
d:\projects\tabukan

The first directory is the source files which is kept updated with the latest HEAD in GG. The second directory is initially an exact copy of the first directory ... but started mutating into this horrible thing ... uhum ... its my game. So basically, the second directory is kept in sync with the source in MY CVS server.

So what I do is that whenever GG updates the HEAD and I've updated my "torque" project directory with it ... I use a directory diff utility between "torque" and "tabukan". For me, this have two distinct advantages. First is that you actually find out what the new stuff are and the second one is that you can decide if you need/want it in your development code.

There are a lot of free ones in the market but the best ones are the commercial ones. Some notable ones are Araxis Merge and ExamDiff.

Actually, you should navigate to the WinCVS site ... they suggests some very good file diff applications there.

Hope this helped.

Alex