Coder Social home page Coder Social logo

berserkerquake2's Introduction

Berserker@Quake2 Engine

Original project hosted at: Quake Gate, ModDB

This is a port of Berserker@Quake2 engine (1.45) to SDL2 library. It is currently known to compile and run on Linux and Windows.

Building on Linux

The makefile is provided in the root of this source tree, which should, provided you have all needed libraries setup, produce "berserkerq2" executable file and game logic library "game.so". These libraries are:

libjpeg (v8)
libpng
libogg
libvorbis
libvorbisfile
SDL2 (v2.0.4 or newer recommended)
zlib
libminizip

Code::Blocks project files are also provided.

Building on Windows

Visual Studio 2015 solution is provided, along with header files and .libs for linking with required libraries. Libraries are provided along with precompiled engine binaries in the Releases section.

Running the game

To make use of this engine, you will need original Quake II data. If you have Steam version, you can find needed files in its install directory, in baseq2 folder. These are:

DIR players
DIR video
FILE pak0.pak
FILE pak1.pak
FILE pak2.pak

If you have original Quake II CD, the data can be found in Install/Data/baseq2. In addition to the data on the CD, you will need the data from the official Quake II 3.20 patch, which you can get from http://deponie.yamagi.org/quake2/idstuff/q2-3.20-x86-full-ctf.exe The content can be extracted using any utility for working with ZIP files.

Make a distintctive folder where you want to run Berserker from. The folder must be writable, so somewhere under home folder should do for Linux users. Inside it, create baseq2 folder in which you put the above mentioned files.

Then you will have to get some extra data that comes with this engine. You can get it from my Google Drive. Extract the zip in your Berserker directory. The content itself is identical to those hosted at official website and ModDB, except all file names were converted to lower case and references to them, as well as paths have been fixed to use slashes instead of backslashes so hopefully there isn't any problem with file access on Linux systems.

Now, you just need to put compiled executable files in their places:
(assuming Quake2 is the folder where you put the data)

berserkerq2 or berserkerq2.exe -> Quake2
game.so or game.dll -> Quake2/baseq2

Finally, you can run the game. Make sure it's executed from its own directory so it can find the data.

One final tip, if you're on Windows and have NVIDIA graphics card, you should disable threaded optimizations for the game, they seem to dramatically decrease the performance.

berserkerquake2's People

Contributors

ucyborg avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

berserkerquake2's Issues

Joystick support

Still need to write new code using SDL2 for joystick support.

Edit: converted the ancient joystick code to SDL2, would be better if everything was handled in the event loop.

CL_ParseServerMessage: Illegible server message

Hi, looks like net_compatibility 1 is not enough to play on most servers online since most of them are q2pro servers on which u get this kind of error while connecting or on map change, the same error happens on original quake 2 version 3.20.

Here is my console log from berserker client:
q2b_console.log

Q2pro author Skuller told me what might be wrong:

Thanks for testing! I think I know what this issue is. It's an old Quake 2 bug whereas any literal 0xff bytes in a string would be read as -1 on the client, which would mess up message parsing because -1 also acts as EOF marker. Apparently Yamagi fixes this but the bug is still present in Berserker and original 3.20 client of course.

What's actually happening is a combination of two bugs: original bug in client message parsing code, and a bug in OpenTDM version that PacketFlinger.com servers use which triggers it by including random uninitialized bytes from stack at the end of global CS_STATUSBAR configstring. See here:

02a0 : 66 20 32 38 20 78 6c 20 31 30 20 79 62 20 2d 31 : f 28 xl 10 yb -1
02b0 : 00 0d 0e 00 38 30 20 73 74 61 74 5f 73 74 72 69 : ....80 stat_stri
02c0 : 6e 67 20 32 38 20 65 6e 64 69 66 20 ff 03 00 0d : ng 28 endif ....
02d0 : 1d 00 30 00 0d 1e 00 32 35 00 0d 1f 00 38 30 37 : ..0....25....807

ff 03 bytes are just junk. So this issue is definitely not Q2PRO server issue.

OpenTDM mod is already in progress to fix issue mod side, but i tried connecting to some other mod servers and issue is still there so is there any chance you guys can fix it in berserker please? Here is the link to issue on q2pro github skullernet/q2pro#305

Startup crash - Error during initialization

Just compiled the latest snapshot and tried running it. An error dialogue box opens stating 'Error during initialization'. Running the executable in a terminal doesn't reveal any other information. The last version I tried, compiled over a week ago, works fine.

Compiled in Ubuntu 16.04 32bit & tested in Ubuntu 16.10 64bit w/ NVIDIA 375.20

Lemme know how I can help troubleshoot, if you'd like/need.

100% CPU usage

Some engines don't utilize whole CPU core when the frame rate is capped.

Right, that's what cl_sleep is for...

Process priority / affinity

The original Windows version had options to set those, perhaps put them back and make something similar for non-Windows platforms.

Req: 64bit support

Hey UCyborg,

Just noticed you added commits a couple of months ago. Nice work!

Perhaps it might be a good idea to look into a 64bit version (for compiling & run-time). The process of compiling it in Ubuntu x64 w/ 32bit libs is proving to be a pain. :)

Aside from that, great work dude!

Update SDL to 2.0.6

SDL 2.0.6 has been released, which includes full Vulkan support, as well as many bug fixes and some optimizations. There are no builds, yet, but the source code is at 2.0.6 now.

Error: couldn't load maps/ntro.inn.bsp

I did everything according to the instruction. The engine can be launched but when I try to start the game (Game -> $difficulty), the console shows up with this error Error: couldn't load maps/ntro.inn.bsp. If I press the ~ to hide the console, a demo starts playing. In the demo everything looks fine, without any issues, everything is working: graphics, sound, music.

I'm on Linux, berserkerq2 is in the main game folder, game.so is in the baseq2 subfolder.

Fast video subsystem restart

Perhaps it would be possible to allow for resolution, fullscreen/windowed mode changes without the need to reload a lot of stuff? Though reloading only happens when map is loaded.

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.