Tech demos: Difference between revisions

From Ouroboros
Jump to navigation Jump to search
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= ioq3 =
= ioq3 =


As a demo, we have added O7s support to the [https://github.com/ioquake/ioq3 ioq3] game engine. ioq3 is a fork of ID software’s Quake III Arena GPL Source Release. The port is available as a patch. The servers currently only work in dedicated mode (there is no way yet to start a server from the client).
As a demo, we have added O7s support to the [https://github.com/ioquake/ioq3 ioq3] game engine. ioq3 is a fork of ID software’s [https://github.com/id-Software/Quake-III-Arena Quake III Arena GPL Source Release]. The servers currently only work in dedicated mode (there is no way yet to start a server from the client).


To get the demo, first get the latest ioq3 sources:
To get the demo, build the latest ioq3 sources from our fork:


  $ git clone https://github.com/ioquake/ioq3.git
  $ git clone https://codeberg.org/o7s/ioq3
  $ cd ioq3
  $ cd ioq3
$ mkdir build
$ cd build
$ cmake ..
$ make -j


Copy the patch via the link above, or get it via wget:
You may need to install some dependencies like [https://wiki.libsdl.org/SDL2/Installation SDL2], see [https://ioquake3.org/help/building-ioquake3/building-ioquake3-on-linux/ the ioq3 documentation].


$ wget https://ouroboros.rocks/patches/ouroboros-ioq3.patch
The ioq3 project only supplies the game engine. To play Quake III Arena, you need the original game files and a valid key. Various open source games make use of the engine. We will detail the procedure for running OpenArena in your ioq3 build directory.


Apply the patch to the ioq3 code:
Go to your build directory:
 
$ cd build/Release/
 
To run OpenArena, you only need to the game files. First download the zip archive (openarena-0.8.8.zip) from the [http://www.openarena.ws/ OpenArena website] (or via wget) and then extract the baseoa folder:
 
$ wget http://www.openarena.ws/request.php?4 -O openarena-0.8.8.zip
$ unzip -j openarena-0.8.8.zip 'openarena-0.8.8/baseoa/*' -d ./baseoa
 
To test the game, start a server:
 
$ ./ioq3ded +set com_basegame baseoa +map aggressor
 
Create a local layer, bind the correct pid of the server to a name and register it in the local layer:
 
$ irm ipcp bootstrap type local name local layer local
$ irm bind proc <pid> name q3
$ irm name reg q3 layer local
 
To connect, start a client (in a different terminal):
 
$ ./ioquake3 +set com_basegame baseoa
 
When the client starts, go to the console by typing ~ (tilde) and enter the following command


  $ git apply ouroboros-ioq3.patch
  connect -O q3


With Ouroboros installed, build the ioq3 project in standalone mode:
The client should now connect to the ioq3 dedicated server over Ouroboros. Register the name in non-local layers to connect from other machines. Happy Fragging!


  $ STANDALONE=1 make
=== OS X Notes ===
The build requires pkgconfig to find the ouroboros library:
  $ brew install pkgconfig


You may need to install some dependencies like SDL2, see the ioq3 documentation.
The binary will be inside the ioquak3.app folder, an option is to start the client binary directly:
$ ./ioquake3.app/Contents/MacOS/ioquake3 +set com_basegame  baseoa


The ioq3 project only supplies the game engine. To play Quake III Arena, you need the original game files and a valid key. Various open source games make use of the engine. We wil detail the procedure for running OpenArena in your ioq3 build directory.
The client may seem to hang on a black screen because you need to give microphone permissions the first time you run this, just option-cmd-esc out and allow microphone access.


Go to your build directory:
= netcat =
 
Ouroboros-netcat instructions:
 
Clone the repo (somewhere):


  $ cd build/<release_dir>/
  git clone https://github.com:dstaesse/netcat
cd netcat


To run OpenArena, you only need to the game files. First download the zip archive (openarena-0.8.8.zip) from the OpenArena website (or via wget) and then extract the baseoa folder:
To compile this Ouroboros version:


  $ wget http://www.openarena.ws/request.php?4 -O openarena-0.8.8.zip
  LIBS=-louroboros-dev ./configure
$ unzip -j openarena-0.8.8.zip 'openarena-0.8.8/baseoa/*' -d ./baseoa


Make sure you have a local Ouroboros layer running in your system (see this tutorial).
Or, to enable debugging output (the netcat -d flag):


To test the game, start a server (replace with the correct architecture extension for your machine, eg x86_64):
LIBS=-louroboros-dev ./configure --enable-debug=yes


$ ./ioq3ded.<arch> +set com_basegame baseoa +map aggressor
And give it a simple "make" command:


Bind the pid of the server to a name and register it in the local layer:
make


$ irm bind proc <pid> name my.ioq3.server
Ouroboros support is toggled with the -O flag.
$ irm name reg my.ioq3.server layer <your_local_layer>


To connect, start a client (in a different terminal):
To start netcat in Ouroboros listen mode (assuming you are in the src/ folder):


  $ ./ioquake3.<arch> +set com_basegame baseoa
  ./netcat -Ol


When the client starts, go to the console by typing ~ (tilde) and enter the following command
To send some data to the netcat instance:


  connect -O my.ioq3.server
  ./netcat -Oc <name>


The client should now connect to the ioq3 dedicated server over Ouroboros. Register the name in non-local layers to connect from other machines. Happy Fragging!
Brief example over the "local" IPCP (you may need up to 3 terminal windows).


= netcat =
#start the irmd
sudo irmd --stdout
#create a "local" IPCP.
irm ipcp bootstrap type local name local layer local
# register the netcat name in the local layer
irm name register nc layer local 
# bind the netcat program to <name>
irm bind prog ./netcat
# start an Ouroboros listen server (with some verbosity)
./netcat -Ovvl
# and from another terminal, send it a couple of bytes:
echo "Here's Johnny!" | ./netcat -Oc nc
# if all went well, you should see the following output on the server side
$ ./netcat -Ovvl
Flow received (new fd=64)
Here's Johnny!
^CExiting.
Total received bytes: 15
Total sent bytes: 0

Latest revision as of 16:50, 17 September 2025

ioq3

As a demo, we have added O7s support to the ioq3 game engine. ioq3 is a fork of ID software’s Quake III Arena GPL Source Release. The servers currently only work in dedicated mode (there is no way yet to start a server from the client).

To get the demo, build the latest ioq3 sources from our fork:

$ git clone https://codeberg.org/o7s/ioq3
$ cd ioq3
$ mkdir build
$ cd build
$ cmake ..
$ make -j

You may need to install some dependencies like SDL2, see the ioq3 documentation.

The ioq3 project only supplies the game engine. To play Quake III Arena, you need the original game files and a valid key. Various open source games make use of the engine. We will detail the procedure for running OpenArena in your ioq3 build directory.

Go to your build directory:

$ cd build/Release/

To run OpenArena, you only need to the game files. First download the zip archive (openarena-0.8.8.zip) from the OpenArena website (or via wget) and then extract the baseoa folder:

$ wget http://www.openarena.ws/request.php?4 -O openarena-0.8.8.zip
$ unzip -j openarena-0.8.8.zip 'openarena-0.8.8/baseoa/*' -d ./baseoa

To test the game, start a server:

$ ./ioq3ded +set com_basegame baseoa +map aggressor

Create a local layer, bind the correct pid of the server to a name and register it in the local layer:

$ irm ipcp bootstrap type local name local layer local
$ irm bind proc <pid> name q3
$ irm name reg q3 layer local

To connect, start a client (in a different terminal):

$ ./ioquake3 +set com_basegame baseoa

When the client starts, go to the console by typing ~ (tilde) and enter the following command

connect -O q3

The client should now connect to the ioq3 dedicated server over Ouroboros. Register the name in non-local layers to connect from other machines. Happy Fragging!

OS X Notes

The build requires pkgconfig to find the ouroboros library:

$ brew install pkgconfig

The binary will be inside the ioquak3.app folder, an option is to start the client binary directly:

$ ./ioquake3.app/Contents/MacOS/ioquake3 +set com_basegame  baseoa

The client may seem to hang on a black screen because you need to give microphone permissions the first time you run this, just option-cmd-esc out and allow microphone access.

netcat

Ouroboros-netcat instructions:

Clone the repo (somewhere):

git clone https://github.com:dstaesse/netcat
cd netcat

To compile this Ouroboros version:

LIBS=-louroboros-dev ./configure

Or, to enable debugging output (the netcat -d flag):

LIBS=-louroboros-dev ./configure --enable-debug=yes

And give it a simple "make" command:

make

Ouroboros support is toggled with the -O flag.

To start netcat in Ouroboros listen mode (assuming you are in the src/ folder):

./netcat -Ol

To send some data to the netcat instance:

./netcat -Oc <name>

Brief example over the "local" IPCP (you may need up to 3 terminal windows).

#start the irmd
sudo irmd --stdout

#create a "local" IPCP.
irm ipcp bootstrap type local name local layer local

# register the netcat name in the local layer
irm name register nc layer local   

# bind the netcat program to <name>
irm bind prog ./netcat

# start an Ouroboros listen server (with some verbosity)
./netcat -Ovvl

# and from another terminal, send it a couple of bytes:
echo "Here's Johnny!" | ./netcat -Oc nc

# if all went well, you should see the following output on the server side
$ ./netcat -Ovvl
Flow received (new fd=64)
Here's Johnny!
^CExiting.
Total received bytes: 15
Total sent bytes: 0