Announcement
Collapse
No announcement yet.
DESIGN: CtP2 Source Code released - our actions [brainstorm & discussion]
Collapse
X
-
What about the status bar at the bottom telling you what units occupy a tile when you hover over it? I think its too helpful and id prefer not to have it. Not the resource/tile info part just the units info.
Leave a comment:
-
Hi, Wes
Don wasn't the only one to hack into CTP1:
Can you describe the technical innards of the game?
The game is approximately half a million lines of C++ code. It is split into several sections: UI, networking, sound, and AI. Templates and classes are heavily used in the AI, user interface, and networking. There is no documentation other than source comments (and Sam and Matt themselves).
The game makes use of the following libraries:
Simple DirectMedia Layer
SMPEG
Zlib
Pthreads
A subset of the Miles sound API
The game also uses Anet (Activision's networking library). The networking drivers and map generators are dynamically loaded using the C dlopen() interface.
Leave a comment:
-
Hi guys, just thought I would add my 2 cents while passing through...
I don't know if any of you have ever seen the source code for a game, but from what I gather it is enormous. Don hacked into the code for either Ctp1 or 2 one time, and tried to print it out- I think he said it came out to over 100K lines of code. It may have been several times that; I have trouble remembering.
Anyway, it's going to take a concerted effort just to *find* things, much less start working on fixing them. Some of the bugs you guys mention are probably just typos that can be fixed rather quickly, but some are going to be things that can't be fixed at all for some reason or another.
You need to set up a system of reporting where things are in the code, so that you can look at it yourselves. Then some of the experienced guys need to post guides, and this can start now, for what types of functions and formulas are used for this language; how to recognize them and how to safely modify them.
I just spent all weekend debugging my latest MTW beta, and it gave me a big reminder that messing with things you are unfamiliar with can give you huge headaches down the line. (In my case the unfamiliarity was with Excel, but a huge code block can also be bad.)
As for what to do first- well, it's probably going to take weeks just to get a handle on the code and get the community organized. Most people tend to concentrate on what they are most interested in, anyway, so setting up lists are only going to do so much.
I would echo the guys like Chris B. who said to go back to the things that irritated us when we first started playing the game, since those will be the biggest detractors from the basic joy of playing.
Myself, I still remember the lines of code for all these neat triggers that were never implemented, like a 50% penalty for attacking city walls, which would tone down mounted units.
In know that some people are going to try and improve SLIC so that they can implement their pet trigger, but the community as a whole would be better served by studying the AI formulas for the things that don't work well, like getting a better balance of guns and butter, or asking for cease-fires when it's getting conquered. We have all had times when we sent emissaries to the AI when it was down to one undefended city and, for fun, asked it for a cease fire, and the AI always tells us to kiss its a$$.
Anyway, I wish you guys luck, and I'll try and stop by some to see what the code looks like, and give Locutus a few programming pointers.
Leave a comment:
-
So I think we can bottom line it at this - we're not making a windowed mode. It would require rewriting too much of game ngine, and it would take a big amount of work, much ebtter to spend it all on actual fixes.
Leave a comment:
-
Windowed mode means that you need to deal with non-exclusive resources (generally speaking DirectSound)
A Fullscreen only mode eliminates these conflicts.
I don't know it'll be simple adding a windowed mode, considering the theoretical issues involved.
Graphically, they use Directdraw, which was set in stone by DirectX3 and has been just repackaged ever since (IIRC from my reading.)
Also, if they are using multistage transparancy, then there is some kind of alpha emulation going on, since DD only supports binary transparency. We don't know how they considered windowed mode with this, and if they used any assumptions which might break.
It seems to me that significant rewriting of the graphics engine including some theoretical windowed mode may be a huge undertaking... and we might not figure out how much work it'd take for a long time.
Leave a comment:
-
Originally posted by Locutus
I'm pretty sure they use DirectX (5 or 6 IIRC).
Leave a comment:
-
Originally posted by Pedrunn
Make a feature where the player can write strings on tiles (by clicking the right button for instance).
This way we can add a naming regions feature
"dark forest", "Grand Canyon", "Amazonia River", "Everest Mountain", "Iguacu Fall", etc...
I just got back, but ditto what I said last week: I think there should be a SLIC thread, if there isn't already. Maybe, I'll just start one?
Leave a comment:
-
Originally posted by Gilgamensch
Centrifuge,
first:
(got married about 2 weeks ago)
Shall we congratulate or express our sympathy????????????
How about congratulate for now, and save the sympathy for later on down the road...
Geez, I hope she doesn't read this
Leave a comment:
-
Centrifuge,
first:
(got married about 2 weeks ago)
Shall we congratulate or express our sympathy????????????
2nd.
You remember the old joke about the guy calling the help-line:
C: I have a problem
H: OK, what is happening?
C: I installed Windows.
H: And, you already said so.
But fixing problems of CTP2 with Windows (XP), I think that we won't be able to fix any of those really. That is beyond our 'scopes'. A lot of problems are coming through changed handling in Windoofs itself......
Leave a comment:
-
Originally posted by tlatoani
I've read in some posts about problems playing CTP2 with Windows XP, is there anything to this? and if so, can it be fixed via the source code?
I just built a new system, running under Xp professional, and CTP2 w/ mods and modswapper runs quite smoothly.
Because of my experiences, I can only assume that there is some other issue involved, or else I've just been lucky.
A couple of suggestions:
1. Only play under accounts that have administrator privelages, I have seen this to be an issue with other games, in particular my wife's (got married about 2 weeks ago ) Sims games (I didn't want people to get confused and think they were mine )
2. Make sure that XP is up to date with all service packs etc.
3. If the version of XP, is an upgrade version, it may be necessary to do a complete reinstall.
Leave a comment:
-
theres alot of games that run in windowed mode if u add this to the command like
C:/Program Files/Craptivision/CtP2 -win
however im taking it this dont work for CtP2
i could however just be a disabled function, could it be worth a look through the .exe for "-win"
Leave a comment:
-
I'm pretty sure they use DirectX (5 or 6 IIRC).
Sure it's possible (what isn't?), but it's a hell of a lot of work, far more than is worth the trouble, IMHO.
Leave a comment:
-
I am pretty confident that it goes through DirectX. I believe dxdiag can find out if the game uses DirectX...
Leave a comment:
-
Originally posted by Locutus
Windowed mode? Sure, we can do that. Most likely all we have to do is completely rebuild the game from scratch...
I don't know of course, how CtP2 is written, but if it is the "usual" Windows code, the output goes not to a device itself (like the screen), but to the operating system using a device context. That's just a data structure, and in terms of input/output it doesn't matter if this DC covers the whole screen or only the client area of a window (with clipping at its borders and maybe scrollbars, of course).
If it goes not straight to the Windows GDI, but through DirectX, things are a bit different. If DirectX 8+ is used (hardly, considering the release date), it should be easy doing by just altering the device initialization from fullscreen to windowed mode. With DirectX 7- (more likely) it's harder, but still doable.
Leave a comment:
Leave a comment: