Code Monkey home page Code Monkey logo

fortressforever-2013's Introduction

A Team Fortress mod on the Source Engine (Source SDK 2006)

Compiling

Fortress Forever must be compiled using Visual C++ 2005. The following instructions are an updated version of Microsoft's old Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK guide

  1. Install Visual C++ 2005
  1. Install the Microsoft Platform SDK
  1. Configure Visual C++ 2005
  • Open Visual Studio C++ 2005 (it's suggested to right click -> Run as administrator)
  • Update VC++ Directories in the Projects and Solutions section of the Tools -> Options dialog box.
    • Add the paths to the appropriate subsection:
      • Executable files: C:\Program Files\Microsoft Platform SDK\Bin
      • Include files: C:\Program Files\Microsoft Platform SDK\Include
      • Library files: C:\Program Files\Microsoft Platform SDK\Lib
    • Note: Alternatively, you can update the Visual C++ Directories by modifying the VCProjectEngine.dll.express.config file located in the \vc\vcpackages subdirectory of the Visual C++ Express install location. Please make sure that you also delete the file vccomponents.dat located in the %USERPROFILE%\Local Settings\Application Data\Microsoft\VCExpress\8.0 directory if it exists before restarting Visual C++ Express Edition.
  • Update the corewin_express.vsprops file found in C:\Program Files (x86)\Microsoft Visual Studio 8\VC\VCProjectDefaults.
    • Edit corewin_express.vsprops in the text editor of your choice.
      • Change the string that reads: AdditionalDependencies="kernel32.lib" to AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
    • Note: You'll probably need to change the file permissions to be able to edit the corewin_express.vsprops file. To do so, right click corewin_express.vsprops and select Properties. Open the Security tab and click the Edit... button. Select the Users (computername\User) group and check Write in the Allow column, then click OK twice
  • Restart Visual C++ 2005
  1. Build Fortress Forever
  • Open Game_Scratch-2005.sln and run Build Solution
  • Note: The compiled .dlls will automatically get copied to <SteamDirectory>\SteamApps\common\Fortress Forever\FortressForever\bin

Addendum: Registering VC++ 2005 Express

The Microsoft registration servers for VC++ 2005 Express edition are no longer online, so the only way to register your copy is to edit the registry. Simply save the following text as register_vc.reg and run it:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\VCExpress\8.0\Registration]
"Params"="487A8D4D0000000001000000010000009F6A4D0000000000"

Debugging

To start the game from within VS debugger, right click client_ff or server_ff project (whichever you are working on) and click properties. Navigate to the 'Debugging' section. Set command to the 'hl2.exe' in your fortress forever installation directory. On a default steam installation it will look like this:

  • command C:\Program Files (x86)\Steam\steamapps\common\Fortress Forever\hl2.exe
  • arguments: -game "FortressForever" -allowdebug -dev
  • working directory: C:\Program Files (x86)\Steam\steamapps\common\Fortress Forever\

(you will need to set this up for both client/server, or whatever you need to debug)

Now you can smack F5 to start the game with debugging ready to go. I recommend adding eg, +map ff_2fort to parameters save time. Here is an example with nonstandard steam path: example

Debugging an active session

  • Compile using the Debug FF configuration
  • Launch Fortress Forever (need to use the launch parameter -allowdebug in steam)
  • In Visual C++, go to Debug -> Attach to Process
  • Find hl2.exe in the list and click Attach

Debugging a crash log

  • Open the crash log (.dmp/.mdmp) in Visual C++ 2005
  • Go to Debug -> Start Debugging
    • Check the output window to see if symbols were successfully loaded for fortressforever\bin\server.dll and fortressforever\bin\client.dll. If not, you'll probably need to copy the dump file to a directory containing the correct .dll and .pdb files for the version of the game that the crash occurred on.
    • If the crash points to Disassembly, the crash log will likely not be of much use, as that usually means that the crash occurred somewhere in the Source engine code that we don't have access to. However, it's a good idea to check the Call Stack window to see if the crash originated in FF code.
  • Note: Crash logs can be found in the <SteamDirectory>/dumps directory, and will be named something like assert_hl2.exe_<datetime>_1.dmp

fortressforever-2013's People

Contributors

adamwillden avatar alfred-valve avatar dexterhaslem avatar hlstriker avatar joeludwig avatar jorgenpt avatar plesiecki avatar psychonic avatar sortie avatar squeek502 avatar trepidjon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fortressforever-2013's Issues

HUD viewport's background gets moved to front on reconnect

Mirrored from the old project tracker on the FF forums:

Not totally sure that this is an issue still, but I got it while testing a bunch of stuff when trying to figure out how to get the mouse to work on the HUD viewport. I believe it's a side-effect of calling MakePopup() from the HUD viewport, which is a base engine function that we don't have the source code to, but is necessary for SetMouseInputEnabled to have any affect.

What was happening:

  • Start a local server
  • Enter HUD editing mode
  • Disconnect without leaving HUD editing mode
  • Start a new local server
  • HUD viewport background would draw over everything, making the entire screen dark and with no other VGUI shown at all. Simply clicking would make it go away and show the MOTD vgui as normal.

It was sporadic and I've not gotten it with the code that I committed, but it could be a problem.

Trimping is triggered inconsistently

Mirrored from the old project tracker on the FF forums:

Right now, you can pretty much only trimp when first touching a ramp. I'm assuming this is because you are not on the ground while rampsliding, therefore CheckJumpButton returns early and you don't trimp. Not sure how the 2006 code gets around this, need to investigate it further.


Fixed in revision 14399

Fixed trimping not being triggered while rampsliding (issue #434)

  • A CategorizePosition call that sets the player's GroundEntity if they have jump pressed that was called every PlayerMove in 2006 code is called only when needed in 2013 code. Made it call CategorizePosition if jump is pressed. This fix could potentially be handled better.

Re-opened. Still a bit of weirdness. With cl_jumpqueue 0 (autojump), if you jump, keep holding jump, and start rampsliding, you won't trimp (even though you are holding jump).


Should be fixed for real now.

Note that nButtons and nOldButtons are changed to technically incorrect values to get jump queue/autojump/trimping/rampsliding to all interact together properly. There should probably be a third variable that holds whether or not jump was ever released while in the air so that nButtons and nOldButtons can be left alone and always hold consistent/accurate values.

Client runs movement code more than server

Mirrored from the old project tracker on the FF forums:

The client seems to call CheckJumpButton like 5 times for every one time the server does; need to investigate this more.


So this doesn't seem to be a bug, I just didn't think things through. What seems to be happening is something like this:

  • Client code gets networked values from server, which take precedence
  • Client jumps, client thinks it is jumping and runs the code for jumping, sends jump command to server
  • Client gets networked values from server, which hasn't jumped yet, so the client values get essentially reset to what they were and the client does the same exact thing again
  • ...repeat until the server does the jump...
  • Server jumps, sends the updated values to the client and finally confirms the client's jump

Just prediction stuff, basically. The number of times the client will execute CheckJumpButton per jump increases as latency to the server increases (tested with net_fakelag).

Example console output with net_fakelag 50:

[C] SoftCap from 283.154663 to 277.150543
[C] SoftCap from 283.154663 to 277.150543
[C] SoftCap from 283.154663 to 277.150543
[S] SoftCap from 283.154663 to 277.150543
[C] SoftCap from 283.154663 to 277.150543
[C] SoftCap from 304.400879 to 290.960571
[C] SoftCap from 304.400879 to 290.960571
[C] SoftCap from 304.400879 to 290.960571
[S] SoftCap from 304.400879 to 290.960571
[C] SoftCap from 304.400879 to 290.960571
[C] SoftCap from 313.238586 to 296.705078
[C] SoftCap from 313.238586 to 296.705078
[C] SoftCap from 313.238586 to 296.705078
[S] SoftCap from 313.238586 to 296.705078
[C] SoftCap from 313.238586 to 296.705078
[C] SoftCap from 313.238586 to 296.705078

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.