thoughts on the source

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

I don't have a MSVC compiler so I can't do much until someone more knowledgeable than I puts forth a makefile I can use, but there are some things I'd like to look at. This is sort of a publicly visible notes file.

In CBaseShipAI.cpp at line 350 there's a destiny check in the flocking code. Why? Doesn't making flocking only apply to a random subset of ships defeat the purpose? I'd like to experiment with defining that if out for an if (TRUE).

At line 1650 in the same file there begins void cbaseshipai::useitemsbehavior(void). This is legacy code that handles superconducting shields. Why not move this to an <OnAIUpdate> event on the superconducting shield and remove this?

In TSEShipControllersImpl.h all derived classes of CBaseShipAI seem to have CSpaceObject *m_pTarget, which seems to represent the AI's target. If this were moved to the base class, along with possibly similar internal AI variables like CSpaceObject *m_pDest I think they could be made accessible in script. This is functionality I need for intelligent AI behavior with triggered fragmentation weapons.
Literally is the new Figuratively
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Nice observations; glad you're finding your way around the code.

1. Flocking code: I'd love to experiment with that too. I'm sure I did it original for performance, but I don't know if the difference is noticeable (either in flocking or in performance).

2. UseItemsBehavior: Yes, absolutely, this is legacy code but I haven't had time to move it.

3. m_pTarget in CBaseShipAI: I agree with this; but it is slightly tricky to do properly because you have to deal with old save files (for old save files the derrived classes would still have to load the variable and set it in the base class). In any case, I think m_pTarget is accessible in script already (objGetTarget).

p.s.: You probably know that there is a free version of Microsoft Visual Studio. I believe it will work to compile the code.
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

george moromisato wrote:p.s.: You probably know that there is a free version of Microsoft Visual Studio. I believe it will work to compile the code.
Actually I didn't. I'll have to hunt that down.
Literally is the new Figuratively
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Atarlost wrote:
george moromisato wrote:p.s.: You probably know that there is a free version of Microsoft Visual Studio. I believe it will work to compile the code.
Actually I didn't. I'll have to hunt that down.
Try this:

http://www.microsoft.com/visualstudio/e ... pp-express

This is a later version than what I'm using, but it should work.
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

There are some necessary tweaks to get it almost compiling. I'm currently just missing george's TSUI.lib, but I managed to get it working up to that point without errors. (You need to uninstall any VC++ runtimes you have installed, then install DXSDK 2007, then DXSDK 2010, then take ddraw.lib and dxguid.lib from them respectively both into the VC++ EE's libraries folder, since otherwise it just derps up and fails to recognize them, even if you tell it to look in those directories. (Though that *might* have been due to my weird directory structure that I created in order to minimize most issues of moving over to my SSD) - you will also need to overwrite the IntelJPEGUtil folder from yesterday's version of the repository entirely with the folder from today's. I don't know why you can't just insert that one new file, but it failed every time I tried to build it that way. Lastly, you need to change a single line in the Transcendence.rc file with a text editor. There some reference to a header file that starts with an a and is 6 chars long (excluding extension) which is not included in the express editions, but you can apparently change it to windows.h safely instead))
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
Post Reply