Skip to content

Commit

Permalink
Merge pull request #26 from ENSL/release-v322
Browse files Browse the repository at this point in the history
Release v322 to master branch
  • Loading branch information
pierow authored Aug 30, 2018
2 parents 11c35b4 + ceb38f9 commit 611cb2a
Show file tree
Hide file tree
Showing 433 changed files with 3,997 additions and 780 deletions.
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
language: cpp

matrix:
include:
- os: linux
compiler: gcc
script: cd main/source/linux && make
env: OPJ_CI_ARCH=i386
addons:
apt:
packages:
- gcc-multilib
- g++-multilib
- libc6-i386
- libcurl4-openssl-dev:i386
- libpng12-dev:i386

- os: osx
compiler: clang
before_script:
- export CC=clang
- export CPLUS=clang++
script: cd main/source/linux && make
674 changes: 674 additions & 0 deletions COPYING.txt

Large diffs are not rendered by default.

117 changes: 75 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,108 @@
# Natural Selection v3.2.1a
This is a complete rebuild of the game [Natural Selection] for Windows and Linux. After the SteamPipe update the game remained in an pretty bad state for years, therefore I decided to recompile its sources which are provided by [Unknownworlds Entertainment]. With this update this might be the first half-life mod which achieves multi-platform support. Speaking of this you are encouraged to compile for Mac OS X. The ultimate goal is to provide a better expierence of the Natural Selection gameplay on all major platforms and a possible distribution in the future through [Steam].
# Natural Selection v3.2.2

### Downloads
Here you find the new compiled `.dlls` or `.so` files for client and server. If you just want to play or to host a server you can download them here:
- [ns_patch_v321a.7z]
[![Build Status](https://travis-ci.org/ENSL/NS.svg?branch=develop)](https://travis-ci.org/ENSL/NS)

Remember to extract them to your Half-Life/ns directory.
This is a complete rebuild of the game [Natural Selection] for Windows, Linux, and OS X. It includes updates and fixes by pierow, Prefix, fmoraw, Bacsu, puzl, and others.

The offical download url for the complete version ns v3.2 is not working with firefox. Either use:
```sh
$ wget http://www.unknownworlds.com/files/ns/ns_install_v32.exe
```
or
```sh
$ curl -LO http://www.unknownworlds.com/files/ns/ns_install_v32.exe
```
or follow this link http://sllegacy.unknownworlds.com/files/ns/ns_install_v32.exe
### Changes
In order to make this game work for linux the old half-life engine files were replaced with the newer ones. In addtion some changes are accounted for the use of an acient glibc library. Some changes to the game itself have been made and these include:
- The ChatPanel has been replaced in favor of the old hl chat.
- The observatory has now a spherical detection like the sensory chamber
- Removed special NS gamma since it is windows only
## Downloads

The recommended way to install the game or update an existing installation for Windows users is through the [Natural Selection Launcher](https://github.com/ENSL/NaturalLauncher/releases/) (Thanks Khelben). Simply download the installation exe or portable zip from there and run the launcher. Linux and OS X users, as well as those that want to install or patch the game manually, can find releases [here](https://github.com/ENSL/NS/releases).

As the game is a Half-Life mod, Steam and Half-Life installations are required to play the game.

A fresh install of NS from the launcher comes with updated config files containing everything you need to get playing on the standard settings most players prefer. There are also official marine and alien config files that can be uncommented so your binds change when joining the respective teams, but they are off by default as to not override any binds users wish to change within the game menus. Those that wish to use the Nine Legends competitive pack can do so through the settings in advanced options without having to download or install it.

The plan is to bring the chat and the gamma back when a cross-platfrom solution can be achieved.
If you wish to experience the game's default settings and binds from NS 3.2 you can type `exec olddefaults.cfg` in console before loading a map. A file named `backupb4old.cfg` will be saved with your previous settings if you wish to return to those after. Note that gamma ramp is no longer a working feature, so brightness will be a slightly different than it originally was, but the game was always very dark by default and still is with that config.

### Bugs
With great changes come great bugs.
- Chat input is not visible while spectating
- [sg reload bug]
- [FPS_Effects] FPS dependant fire rates and player physics
- gorge's view rotates when he drops a structure from the popup menu?
- The background of text in the menu or in popups does not look nice possible realted to the `special ns gamma`.
## Changes

Updates include:

- Linux and OS X support
- Natural Selection Launcher for installing and updating the game
- Widescreen support (now expands FOV up to 16:9 aspect instead of cutting it off)
- Many FPS dependencies fixed, including jetpack acceleration, so the game can now be fairly played at 200+ FPS
- Perfect jump timing no longer required for bunnyhopping (server adjustable via sv_jumpmode)
- New minimal HUD (work in progress) and the Nine Legends HUD can be selected through advanced options or hud_style and hud_mapstyle
- New crosshair system that can be adjusted through the advanced options and cl_cross commands (Thanks [OpenAG](https://github.com/YaLTeR/OpenAG))
- Ambient sounds can be changed in advanced options or via cl_ambientsound
- Raw input and sensitivity scaling options now available
- Spectator overlay is now transparent and shows health/armor
- Numerous bug fixes for things that broke from recent updates to Half-Life
- The observatory has now a spherical detection like the sensory chamber

## Bugs
- Process hangs on exit sometimes
- Arrow keys don't work for the commander
- Chatbox eats inputs occasionally
- Some mice experience issues with a previous fix for centering the cursor when the popupmenu is open
- Trying to shoot the shotgun while reloading is very fickle and has poor syncronization with the server. A balance-conscientious rework is planned, but yet to be made.
- HUD elements are stretched and/or poorly placed in widescreen. User options/commands for hud element placement are planned.
- Clicking on the scoreboard can cause +attack to be stuck after closing the scoreboard until firing again.
- FPS dependant fire rates and player physics. These have significantly improved with the Half-Life update and are also a non-issue now that other FPS dependency fixes are in the game and the game can be played at high frame rates, where fire rates don't vary. Very high framerates cause collision issues and other engine limitations, so an fps of 200 or 250 is recommended unless fixed.
- Flashing available alien upgrade icons (defense, movement and sensory) tend to disappear when a player dies and respawns. The icons won't appear until the alien chooses an upgrade.
- func_train and func_tracktrain entities don't reset to their original positions when a round has ended
- windows server works only with the hlds tool

If you find more please report them!
### Compile

First you will need to get the files:
## Compiling

For Windows, compilation should be working if you have VS2017 installed.

For Linux:

First you need some libraries. On Ubuntu it is:

```sh
apt-get install build-essential git gdb gcc-multilib g++-multilib libc6-i386 libcurl4-openssl-dev:i386 libpng12-dev:i386
```

Then you will need to get the files:
```sh
$ git clone https://github.com/fmoraw/NS.git
git clone https://github.com/fmoraw/NS.git
```

Then goto `NS/main/source/linux` and use `make hl_cll` for the client and `make ns` for the server.
Then to build `` and use `make hl_cll` for the client and `make ns` for the server.

```sh
cd NS/main/source/linux
```

For client use `make hl_cll` and for server use `make ns`

Make sure you have `g++-multilib` set up for x64 operating systems. For windows compilation should be working if you have VS2010 installed.

If you get the this error when running the app: `Fatal Error - could not load library (client.so)`, With a high chance it is because of some `UNDEFINED SYMBOLS` in the shared library. But you can check this with this command:

``` sh
$ ldd -r -d client.so
ldd -r -d client.so
```

Make sure you have vgui.so copied to cl_dll folder too on Linux.

## Debugging

If you want to debug:
```sh
$ LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" gdb ./hl_linux r -game ns -dev -steam
LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" gdb ./hl_linux r -game ns -dev -steam
```
Due to the new engine and the nature of Linux I had to make a lot of changes! You can find them with grep -Ril `@Linux`.

For MacOS & lldb:
```
DYLD_LIBRARY_PATH=".:$DYLD_LIBRARY_PATH" /Applications/Xcode.app/Contents/Developer/usr/bin/lldb -- ./hl_osx r -game ns -dev -steam -windowed
```
Have to use XCode's lldb to get around https://stackoverflow.com/a/33589760 (Lack of environment variables). `-windowed` as windowed mode makes it easier to deal with crashes on MacOS.

### Hosting a server

Since servers are really rare at this point in time here is a tutorial how to set up an [Natural Selection] server with [hlds].

1. Follow these steps: https://developer.valvesoftware.com/wiki/SteamCMD
2. Copy the [Natural Selection] directory to steamcmd/servers/
3. Run the game :
```sh
$ ./hlds_run -game ns -autoupdate +map ns_eclipse + sv_secure 1 + port 27015 + ip 127.0.0.1 +hostname "Natural Selection" +maxplayers 32
./hlds_run -game ns -autoupdate +map ns_eclipse + sv_secure 1 + port 27015 + ip 127.0.0.1 +hostname "Natural Selection" +maxplayers 32
```

If you are behind a NAT(Router) make sure to open at least those ports:
- 27015 UDP (game transmission, pings)
- 26900 UDP (VAC service) -- automatically increments if used in case of additional server processes
Expand All @@ -82,17 +117,15 @@ There is an updated version of metamod called [metamodp](http://metamod-p.source
- [rcbot linux dlls](http://filebase.bots-united.com/index.php?act=download&id=428)

### Usefull links
* [Usefull collection of ns files server addons, maps and erverything ](http://www.brywright.co.uk/downloads/files/index.php?dir=natural-selection/)

* [Usefull collection of ns files server addons, maps and everything ](http://www.brywright.co.uk/downloads/files/index.php?dir=natural-selection/)
* [Great collection of ns guides/tutorials](http://www.naturalns.clanservers.com/forums/index.php?topic=5.0)
* [rcbot downloads](http://filebase.bots-united.com/index.php?act=category&id=19)
* [dillinger.io markdown editor](http://dillinger.io/)

[Natural Selection]: <http://unknownworlds.com/ns/>
[Unknownworlds Entertainment]:<https://github.com/unknownworlds/NS>
[ns_patch_v321a.7z]:<https://github.com/fmoraw/NS/blob/linux/ns_patch_v321a.7z?raw=true>
[FPS_Effects]:<http://wiki.sourceruns.org/wiki/FPS_Effects>
[Steam]: <http://store.steampowered.com/about/>
[sg reload bug]:<https://github.com/unknownworlds/NS/issues/5>
[hlds]:<https://developer.valvesoftware.com/wiki/Half-Life_Dedicated_Server>
[rcbot]:<http://filebase.bots-united.com/index.php?act=category&id=19>

Expand Down
5 changes: 5 additions & 0 deletions main/alienofficial.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//Alien cfg that is part of a default installation on the NS Launcher
//Activated by pressing F2 (which also is used to join aliens)

//bind "mouse2" "+movement"
//psoff
Binary file modified main/cl_dlls/client.dll
Binary file not shown.
Binary file added main/co_umbra.wad
Binary file not shown.
76 changes: 41 additions & 35 deletions main/config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ bind "TAB" "+showscores"
bind "ENTER" "messagemode"
bind "ESCAPE" "cancelselect"
bind "SPACE" "+jump"
bind "'" "+moveup"
bind "+" "sizeup"
bind "," "impulse 123"
bind "-" "sizedown"
bind "." "impulse 124"
bind "/" "impulse 125"
bind "0" "slot10"
Expand All @@ -22,10 +19,6 @@ bind "6" "slot6"
bind "7" "slot7"
bind "8" "slot8"
bind "9" "slot9"
bind ";" "+mlook"
bind "=" "sizeup"
bind "[" "invprev"
bind "]" "invnext"
bind "`" "toggleconsole"
bind "a" "+moveleft"
bind "c" "+showmap"
Expand All @@ -35,13 +28,14 @@ bind "f" "impulse 100"
bind "g" "impulse 3"
bind "l" "impulse 105"
bind "q" "lastinv"
bind "r" "+reload"
bind "r" "+movement"
bind "s" "+back"
bind "t" "impulse 201"
bind "b" "impulse 11"
bind "t" "+popupmenu"
bind "u" "messagemode2"
bind "v" "impulse 9"
bind "v" "impulse 10"
bind "w" "+forward"
bind "x" "impulse 81"
bind "x" "impulse 14"
bind "y" "messagemode"
bind "z" "impulse 80"
bind "~" "toggleconsole"
Expand All @@ -52,80 +46,85 @@ bind "RIGHTARROW" "+right"
bind "ALT" "+voicerecord"
bind "CTRL" "+duck"
bind "SHIFT" "+speed"
bind "F1" "jointeamone"
bind "F2" "jointeamtwo"
alias "marinecfg" "exec marineofficial.cfg"
alias "aliencfg" "exec alienofficial.cfg"
bind "F1" "jointeamone;marinecfg"
bind "F2" "jointeamtwo;aliencfg"
bind "F3" "autoassign"
bind "F4" "readyroom"
bind "F5" "snapshot"
bind "F6" "save quick"
bind "F7" "load quick"
bind "F10" "quit prompt"
bind "INS" "+klook"
bind "PGDN" "+lookdown"
bind "PGUP" "+lookup"
bind "END" "centerview"
bind "MWHEELDOWN" "invnext"
bind "MWHEELUP" "invprev"
bind "MOUSE1" "+attack"
bind "MOUSE2" "+popupmenu"
bind "MOUSE2" "+movement"
bind "MOUSE3" "+popupmenu"
bind "MOUSE4" "lastinv"
bind "PAUSE" "pause"
_snd_mixahead "0.1"
ati_npatch "1.0"
ati_subdiv "2.0"
ati_npatch "0"
ati_subdiv "0"
bgmvolume "1.000000"
bottomcolor "144.889999"
brightness "1.000000"
brightness "5"
cl_allowdownload "1"
cl_allowupload "1"
cl_autohelp "1.0"
cl_buildmessages "1"
cl_centerentityid "0.0"
cl_cmdbackup "2"
cl_cmdrate "30"
cl_cmdrate "100"
cl_cmhotkeys "qwerasdfzxcv"
cl_customcrosshair "0"
cl_dlmax "128"
cl_download_ingame "1"
cl_dynamiclights "1"
cl_dynamiclights "0"
cl_forcedefaultfov "0"
cl_gammaramp "1"
cl_gammaramp "0"
cl_highdetail "1"
cl_himodels "0"
cl_iconb "221"
cl_icong "149"
cl_iconr "0"
cl_idealpitchscale "0.8"
cl_labelhivesight "1"
cl_labelmaps "1"
cl_lc "1"
cl_logocolor "#Valve_Orange"
cl_logofile "lambda"
cl_lw "1"
cl_musicdelay "90"
cl_musicdirectory ""
cl_musicenabled "1.0"
cl_musicvolume "155"
cl_musicenabled "0"
cl_particleinfo "0"
cl_quickselecttime ".15"
cl_timeout "60"
cl_updaterate "20"
cl_updaterate "100"
cl_vsmoothing "0.05"
con_color "255 180 30"
console "1.000000"
crosshair "1.000000"
fps_max "72.0"
crosshair "0"
fps_max "250"
fps_override "1"
fps_modem "0.0"
gamma "2.500000"
gamma "3"
gl_vsync "0"
gl_dither "1"
gl_flipmatrix "0"
gl_fog "1"
gl_monolights "0"
gl_overbright "0"
gl_overbright "1"
gl_polyoffset "0.1"
hisound "1"
hpk_maxsize "4"
hud_capturemouse "1"
hud_centerid "0"
hud_classautokill "1"
hud_draw "1"
hud_fastswitch "0"
hud_fastswitch "1"
hud_takesshots "0"
joystick "0"
lookspring "0.000000"
Expand All @@ -137,7 +136,7 @@ m_side "0.8"
m_yaw "0.022"
model "barney"
MP3FadeTime "2.0"
MP3Volume "0.8"
MP3Volume "0"
mp_decals "300"
name "NSPlayer"
net_graph "0"
Expand All @@ -162,7 +161,7 @@ s_refdelay "4"
s_refgain "0.4"
s_rolloff "1.0"
s_verbwet "0.25"
sensitivity "4.960000"
sensitivity "2"
skin ""
suitvolume "0.250000"
sv_aim "0"
Expand All @@ -174,7 +173,14 @@ voice_enable "1"
voice_forcemicrecord "1"
voice_modenable "1"
voice_scale "1"
volume "0.800000"
volume "0.500000"
m_rawinput "1"
zoom_sensitivity_ratio "1"
lightgamma "2"
ex_interp "0.05"
cl_cross "1"
rate "30000"
cl_bob "0"

+mlook
+jlook
exec userconfig.cfg
2 changes: 1 addition & 1 deletion main/delta.lst
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ entity_state_player_t gamedll Player_Encode
DEFINE_DELTA( spectator, DT_INTEGER, 1, 1.0 ),
DEFINE_DELTA( iuser3, DT_INTEGER, 6, 1.0 ), // Need player info for AvHCommanderModeHandler::LookupClassNameForEntity
DEFINE_DELTA( iuser4, DT_INTEGER, 32, 1.0 ), // NS custom parameter (needs 32 for AvHSpecialSound)
DEFINE_DELTA( fuser2, DT_FLOAT, 12, 1.0 ), // For player health (energy is predicted so this isn't needed for it)
DEFINE_DELTA( fuser2, DT_FLOAT, 14, 1.0 ), // For player health (energy is predicted so this isn't needed for it)
DEFINE_DELTA( vuser1[0], DT_ANGLE, 8, 1.0 ),
DEFINE_DELTA( vuser1[1], DT_ANGLE, 8, 1.0 ),
DEFINE_DELTA( vuser1[2], DT_ANGLE, 8, 1.0 ),
Expand Down
Binary file modified main/dlls/ns.dll
Binary file not shown.
Loading

0 comments on commit 611cb2a

Please sign in to comment.