Giter Club home page Giter Club logo

openag's Introduction

OpenAG

Build Status Chat on Discord

OpenAG is an open-source client of the Half-Life promod Adrenaline Gamer, completely rewritten from scratch on latest Half-Life SDK. It adds new features, bugfixes and other tweaks over the original mod, while maintaining the ability to play on all currently existing servers.

Building

Windows

Visual Studio 2019 & Visual Studio 2022

  1. Install Visual Studio 2019 or Visual Studio 2022. In the Visual Studio Installer, select Desktop Development for C++.
  2. Open Visual Studio.
  3. On the starting screen, click "Clone or check out code".
  4. Enter https://github.com/YaLTeR/OpenAG.git and press the Clone button. Wait for the process to finish.
  5. You can build the project using Build→Build All. To find the built client.dll, go to Project→CMake Cache (x86-Debug Only)→Open in Explorer.

Visual Studio 2017

  1. Install Visual Studio 2017. In the Visual Studio Installer, select Desktop Development for C++.

  2. Open Visual Studio.

  3. Go to File→Open→Open from Source Control.

  4. Click Clone:

    Screenshot of the clone button.

    Enter https://github.com/YaLTeR/OpenAG.git and press the Clone button. Wait for the process to finish.

  5. You can build the project using CMake→Build All. To find the built client.dll, go to CMake→Cache (x86-Debug Only)→Open Cache Folder→OpenAG.

Manually using Git and CMake

  1. Install Visual Studio 2017 or above, Git and CMake. Make sure to add them to PATH.
  2. Clone the repository.
  3. Open Git Bash in the OpenAG folder.
  4. git submodule update --init
  5. cmake -A Win32 -B build
  6. cmake --build build --config Release

macOS

  1. Install Xcode.
  2. Install CMake via Homebrew.
  3. git submodule update --init
  4. mkdir build
  5. cd build
  6. cmake ..
  7. cmake --build . --config Release

Linux

GNOME Builder

  1. Set up Flathub by following the guide for your distribution.

  2. Install GNOME Builder.

  3. Open GNOME Builder.

  4. Press the Clone Repository button, enter https://github.com/YaLTeR/OpenAG.git and press Clone Project. Wait until it finishes.

    The cloning window should close, and a new window with the OpenAG project should open.

  5. If Builder prompts you to install missing SDKs, press Install and wait for the process to finish. It will take a while. You can monitor the progress by pressing the circle in the top-right.

  6. Click on the bar at the top-center which says OpenAG, and click the Build button.

  7. Once the build finishes, in the same bar menu click the Export Bundle button. The file manager will open in a path that looks like gnome-builder/projects/OpenAG/flatpak/staging/x86_64-master. Navigate up to the OpenAG folder, then down to builds/pro.openag.OpenAG.json-... where you will find the built client.so.

  8. Now you can make some changes to the code and press Build, then grab client.so from the same folder.

Manually

  1. Get a 32-bit/multilib gcc (6 and above) or clang (3.9 and above) build environment set up, as well as CMake.
  2. git submodule update --init
  3. mkdir build
  4. cd build
  5. cmake ..
  6. cmake --build . --config Release

Half Life 1 SDK LICENSE

Half Life 1 SDK Copyright© Valve Corp.

THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE CORPORATION (“Valve”). PLEASE READ IT BEFORE DOWNLOADING OR USING THE HALF LIFE 1 SDK (“SDK”). BY DOWNLOADING AND/OR USING THE SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE PLEASE DON’T DOWNLOAD OR USE THE SDK.

You may, free of charge, download and use the SDK to develop a modified Valve game running on the Half-Life engine. You may distribute your modified Valve game in source and object code form, but only for free. Terms of use for Valve games are found in the Steam Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/

You may copy, modify, and distribute the SDK and any modifications you make to the SDK in source and object code form, but only for free. Any distribution of this SDK must include this license.txt and third_party_licenses.txt.

Any distribution of the SDK or a substantial portion of the SDK must include the above copyright notice and the following:

DISCLAIMER OF WARRANTIES. THE SOURCE SDK AND ANY OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED “AS IS”. VALVE AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, TITLE AND FITNESS FOR A PARTICULAR PURPOSE.

LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

If you would like to use the SDK for a commercial purpose, please contact Valve at [email protected].

Half-Life 1

This is the README for the Half-Life 1 engine and its associated games.

Please use this repository to report bugs and feature requests for Half-Life 1 related products.

Reporting Issues

If you encounter an issue while using Half-Life 1 games, first search the issue list to see if it has already been reported. Include closed issues in your search.

If it has not been reported, create a new issue with at least the following information:

  • a short, descriptive title;
  • a detailed description of the issue, including any output from the command line;
  • steps for reproducing the issue;
  • your system information.*; and
  • the version output from the in‐game console.

Please place logs either in a code block (press M in your browser for a GFM cheat sheet) or a gist.

* The preferred and easiest way to get this information is from Steam's Hardware Information viewer from the menu (Help -> System Information). Once your information appears: right-click within the dialog, choose Select All, right-click again, and then choose Copy. Paste this information into your report, preferably in a code block.

Conduct

There are basic rules of conduct that should be followed at all times by everyone participating in the discussions. While this is generally a relaxed environment, please remember the following:

  • Do not insult, harass, or demean anyone.
  • Do not intentionally multi-post an issue.
  • Do not use ALL CAPS when creating an issue report.
  • Do not repeatedly update an open issue remarking that the issue persists.

Remember: Just because the issue you reported was reported here does not mean that it is an issue with Half-Life. As well, should your issue not be resolved immediately, it does not mean that a resolution is not being researched or tested. Patience is always appreciated.

openag's People

Contributors

alfred-valve avatar chinese-soup avatar cpiernikowski avatar danieloaks avatar ddexxedd avatar dtugend avatar execut4ble avatar fireblizzard avatar freeslave avatar jengerer avatar joeltroch avatar johndrinkwater avatar margen67 avatar matherunner avatar mxpph avatar rtxa avatar sabianroberts avatar schlufi avatar smileyag avatar thefoofighter avatar tmp64 avatar unkwusr avatar yalter avatar yhoiluhi avatar

Stargazers

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

Watchers

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

openag's Issues

Colorized chatlog in console

sometimes you are too late to read in-game chat
ofc its logged in console but its rly hard readable among other data

would be good to have it colorized, for example green
so it will be pretty easy to spot chat lines in console in a short period

CVar for chat and team sounds

for now theres no chat / team sounds at all (at least in linux build)

would be good to have something like s_chatsound for chat beeps and s_teamsound for cmds like play_team and play_close

actually teamsounds are pretty important sometimes

CTF Score

OpenAG shows total frags score (like if it was tdm) instead of total captures per team in CTF, so it is not possible to know which team is winning while playing this gamemode

Original AG client did show the captures as the team score, regardless of the frag count

Mouse input issue I noticed

I recently noticed that the input in Xash was different compared to the input in the original GoldSrc. Apparently, enabling v-sync seems to make the mouse input have a slight delay (or maybe it's just me).

When I tried OpenAG, the mouse input still felt the same until I disabled v-sync in original GoldSrc using the command:
gl_vsync 0

After that, mouse input felt much more precise. You might want to make a wiki or something with information like this.

Compile errors on GCC 8.3

/home/yalter/Source/cpp/OpenAG/cl_dll/hud_servers.cpp: In member function ‘int CHudServers::LoadMasterAddresses(int, int*, netadr_t*)’:
/home/yalter/Source/cpp/OpenAG/cl_dll/hud_servers.cpp:824:19: error: ‘%s’ directive writing up to 1023 bytes into a region of size 256 [-Werror=format-overflow=]
    sprintf( base, "%s", m_szToken );
                   ^~~~
/home/yalter/Source/cpp/OpenAG/cl_dll/hud_servers.cpp:824:11: note: ‘sprintf’ output between 1 and 1024 bytes into a destination of size 256
    sprintf( base, "%s", m_szToken );
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/home/yalter/Source/cpp/OpenAG/cl_dll/hud_servers.cpp:843:20: error: ‘%s’ directive writing up to 255 bytes into a region of size 64 [-Werror=format-overflow=]
    sprintf( szAdr, "%s:%i", base, nPort );
                    ^~~~~~~  ~~~~
/home/yalter/Source/cpp/OpenAG/cl_dll/hud_servers.cpp:843:11: note: ‘sprintf’ output between 3 and 268 bytes into a destination of size 64
    sprintf( szAdr, "%s:%i", base, nPort );
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and others. Temporary fix is to go into CMakeLists.txt and remove -Werror.

Add hud_weapon

From original AG 6.6, shows a sprite of your currently held weapon on your HUD (there are existing sprites for this in ag/sprites/ folder).

Useful if you are playing with r_drawviewmodel 0.

Hovering nametags

Add hovering nametags above teammates or all players, either always visible or instantly when the player mouse-overs them like in CSGO/Overwatch.

Could also add their health/armor status next to the name if they're your teammate.

HLKZ quality of life features

  • Automatic demo stop-record on teleport to start position / respawn
  • Automatic demo stop-rename on pressing the finish button, configurable to continue recording for up to n seconds after the button press (or up to the next start position / respawn (configurable to only with PB?)
  • Strafing HUD (think CGAZ HUD in Defrag) - this one was requested in BXT and could be cool to have
  • Client-side timer (I wonder how much it'll differ from the serverside one)

[OpenAG][macOS] Crash when trying to create a server

Game crash when trying to create a server in OpenAG mod (latest build).

What I did to install it

  • Bought Half-Life in Steam
  • Installed it to secondary hard drive (500GB of size, labeled Dados)
  • Downloaded OpenAG's "Full mod package" from https://openag.pro/
  • Extracted the ag folder to /Volumes/Dados/SteamLibrary/steamapps/common/Half-Life/
  • Restarted Steam
  • The game showed up in my library, so install is okay.

Steps for reproducing

  1. Launch the mod
  2. Click Create Server
  3. Leave defaults
  4. Click Start
  5. The create server window will desappear
  6. Click Create Server again
  7. Leave defaults
  8. Click Start
  9. The server starts to boot
  10. The game crashes

Terminal output (sensitive information replaced)

If I start the game from the Terminal, the following errors appear in output:

~ $ /Volumes/Dados/SteamLibrary/steamapps/common/Half-Life/hl.sh -game ag
Using breakpad crash handler
Setting breakpad minidump AppID = 70
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
found breakpad via in process memory: '/Users/myuser/Library/Application Support/Steam/Steam.AppBundle/Steam/Contents/MacOS/Frameworks/Breakpad.framework/Versions/A/Resources'
Installing breakpad crash handler
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198826776599 [API loaded yes]
Steam_SetMinidumpSteamID:  Setting Steam ID:  76561198826776599
SteamID:  0, universe Public
SteamID:  76561198826776599, universe Public
SteamID:  0, universe Public
GL_SIZES:  r:8 g:8 b:8 a:8 depth:24

ARB Multitexture extensions found.

8 texture units.  Detail texture supported.

Error:dlopen(/Volumes/Dados/SteamLibrary/steamapps/common/Half-Life/ ?dx, 2): image not found
Error:dlopen(/Volumes/Dados/SteamLibrary/steamapps/common/Half-Life/Fv(???, 2): image not found
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
ILocalize::AddFile() failed to load file "resource/ag_english.txt".
Platform config directory: platform/config
0:Initializing platform...
Server module initialized.

World module initialized.

STEAM Auth Server

AppActive: active
AppActive: active
Usage:
Setmaster unavailable, start a server first.

NET Ports:  server 27015, client 27005

Server IP address xxx.xxx.xxx.xxx:27015

Host_Error: Couldn't get DLL API from !

Usage:
Setmaster unavailable, start a server first.

What I tried to do to fix it

  • Steam's "Verify integrity of game files" menu option (for Half-Life game). First it finds two files that don't pass the validation, than it corrects them. This has no effect, the mod still crashes after fixing the files
  • Build OpenAG from source as per official instructions for macOS and replacing original client.dylib file with the built file. Still same error

System information

Computer Information:
    Manufacturer:  Apple
    Model:  Macmini5,1
    Form Factor: Desktop
    No Touch Input Detected

Processor Information:
    CPU Vendor:  GenuineIntel
    CPU Brand:         Intel(R) Core(TM) i5-2415M CPU @ 2.30GHz
    CPU Family:  0x6
    CPU Model:  0x2a
    CPU Stepping:  0x7
    CPU Type:  0x0
    Speed:  2300 Mhz
    4 logical processors
    2 physical processors
    HyperThreading:  Supported
    FCMOV:  Unsupported
    SSE2:  Supported
    SSE3:  Supported
    SSSE3:  Supported
    SSE4a:  Unsupported
    SSE41:  Supported
    SSE42:  Supported
    AES:  Supported
    AVX:  Supported
    CMPXCHG16B:  Supported
    LAHF/SAHF:  Supported
    PrefetchW:  Unsupported

Operating System Version:
    MacOS 10.13.6 (64 bit)

Video Card:
    Driver:  Intel HD Graphics 3000
    Driver Version:  1.2
    OpenGL Version: 2.1
    Desktop Color Depth: 32 bits per pixel
    Monitor Refresh Rate: 60 Hz
    VendorID:  0x8086
    DeviceID:  0x126
    Revision:  0x9
    Number of Monitors:  1
    Number of Logical Video Cards:  1
    Primary Display Resolution:  1920 x 1080
    Desktop Resolution: 1920 x 1080
    Primary Display Size: 20.39" x 11.46" (23.39" diag)
                                            51.8cm x 29.1cm (59.4cm diag)
    Primary VRAM: 0 MB

Memory:
    RAM:  8192 Mb

Miscellaneous:
    UI Language:  Português-Brasil (Portuguese-Brazil)
    Media Type:  DVD
    Total Hard Disk Space Available:  590265 Mb
    Largest Free Hard Disk Block:  469725 Mb
    VR Headset: None detected

In‐game console version output

Protocol version 48
Exe version 1.1.2.2/Stdio (valve)
Exe build: 15:53:18 Apr  3 2019 (8196)

GLIBCXX_3.4.22 requirement

Prevents working on e.g. Ubuntu 16.04

00000000      DO *UND*  00000000  GLIBCXX_3.4.22 _ZTINSt6thread6_StateE
00000000      DF *UND*  00000000  GLIBCXX_3.4.22 _ZNSt6thread6_StateD2Ev
00000000      DF *UND*  00000000  GLIBCXX_3.4.22 _ZNSt6thread15_M_start_threadESt10unique_ptrINS_6_StateESt14default_deleteIS1_EEPFvvE

Probably somewhere in the Discord integration.

Hit sounds

Add a sound that plays whenever you do damage to someone. Just like in Reflex, Quake Live or Adrenaline Gamer 2.

Since there are no "critical" hits in this game, you could add a different sound for headshots instead.

If the damage is done through a wall (via wallgauss), don't play the sound since it would give the player some info advantage. Perhaps it could be played if the wallgauss hit is direct (if there's a way for the game to "see" that).

could not load library .../client.so

After run AG from Steam or directly with LD_LIBRARY_PATH and runtime libs from Steam, i see:

could not load library /home/outbreak/.steam/steam/steamapps/common/Half-Life/./ag/cl_dlls/client.so

Half-life itself working good.
Debian Testing (multiarch), Steam from official repos.
Linux hikari 4.9.0-3-amd64 #1 SMP Debian 4.9.25-1 (2017-05-02) x86_64 GNU/Linux

Customtimer

I would like to ask to add AG6.6 command called "customtimer" to openAG.

Left-handed weapon mode

Add cl_lefthand 1 or cl_righthand 0 like in CS 1.6 to have weapons on the left side of the screen.

Weapon configs

Add a way to have different configurations based on your currently equipped weapon i.e. when you have gauss, your crosshair would be a red dot but when you pull out your 9mmAR you get a green crosshair and your weapon would be in a left-handed spot.

Could do this with config files or some in-game preset system:
cl_weaponcfg_gauss gauss.cfg would use settings from gauss.cfg when you have gauss in your hands.

There might be a better way to do this, if config files are slow or bad in some way.

Menu mouse issues.

Sometimes when you alt-tab out of the game and back in the mouse in the menu becomes invisible. If you're playing on a server you can hit escape twice and the mouse will appear, however if you are not you'll have to manage to connect to one with invisible mouse.

Team info HUD element

Add a HUD element like cl_scores that would display information about your teammates, such as their location, health/armor and perhaps their weapon? Maybe let the user customize what they want to see in there, for example:

cl_teamhud_location 1
cl_teamhud_health 1
cl_teamhud_weapon 1

would return something like
.execut4ble at Bridge (86/52) with Gauss

teamhud

This would be a serverside feature and would only work on servers that support it (OpenAG servers)

Add hud_color.

hud_color "r g b" - Changes the HUD color, like in BPro.

Mac OSX package?

Would there be a possibility for a Mac OSX port or would you need access to a Mac yourself?

Consider adding the clientside autojump.

Everyone is using autojump scripts anyway, would be more precise and less hassle with _special to have a built-in autojump. Need to ask the community for opinions on this one though.

Forcemodel options

imo would be much better to have cvars like cl_forceteammatesmodel and cl_forceenemymodels so you will not to have to enter force param for every model/team every time and just put these 2 in cfg and always have fixed models of teammates and enemys nomatter which team you are playing for.

what you think ?

Can't jump in Xash3D SDL

The new update works great on GoldSrc (Good job! Really excited to see the new CTF stuff getting in now), but there is a slight problem; I can't jump in Xash. At all. I've tested it with Xash3D SDL v0.18 release. I've tried disabling auto jump, but it didn't do anything. I guess it's RIP for Xash support.

I'm not entirely sure what the problem is. I'll post a log tomorrow. I suggest you get the newest Xash release and copy over your AG folder + OpenAG and take a look yourself. You might have a better idea of what's going on. I've tried rebinding jump as well with no luck.

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.