VOGONS


Quake2 + Acebot for DOSBox (128mb)

Topic actions

First post, by ggorts

User metadata
Rank Member
Rank
Member

The Q2Dos project has archives which contained DOS binaries to play bot matches in Quake2 (Q2), Quake2 Mission Pack2 (MP2), and ActionQuake2 (AQ2). They require at least 128mb of RAM in DOSBox, but MP2 and AQ2 require 256mb; recommended to test with dosbox-x or ykhwong's build of dosbox, otherwise dosbox can be compiled with memory limit expanded. Their source code is partly derived from ID's Q2, Q2Dos, Acebot, the 3zb2 bot, and AQ2/LTK bot).

Q2Dos is available here:
https://bitbucket.org/neozeed/q2dos/downloads … S_EXE_LATEST.7Z

Notes on running mods: for CTF mode, the mod is downloaded as q2ctf102.zip. First, rename the CTF pak0.pak as pak1.pak so it doesn't overwrite the vanilla Q2 pak0.pak file under baseq2/. Second, add that pak1.pak file to the baseq2/ directory so there should now be 2 pak files there. The 3zb2 bot supports this mod.

The 3zb2 bot is a highly rated bot for DM and CTF modes (select mode by typing ctf 1 or ctf 0 at console in-game). Start a map via the bot match game menu , then type sv rspb 5 in the Q2 console to spawn 5 bots. Documentation is included, but the 3zb2 specific configuration file is now named 3ZB2.cfg.

AQ2 requires the AQ2 client named actn1ccl.zip. There is also a directory in that archive named players, and those files must be copied to the /players subdirectory under baseq2/ (preferably back up your Quake2 directory before adding or modifying files since this will change it to AQ2).

Additional maps and sounds are optional. If there are issues with the player skins then download the vwepfix and the vwepfix for AQ2.

Notes on djgpp 205/gcc423: there is no significant performance advantage over djgpp204/gcc295; however, there is a possible stability issue under stress which leads to a fpu stack overflow error in dosbox. Recommend building with the older gcc version since the resulting machine code is well tested. This result is particularly interesting because djgpp205 reportedly has CB Falconer's memory allocation improvement, but it doesn't seem to have a discernible effect in this particular case.

Troubleshooting: if connecting to a bot match there are DMA errors, then test with an older sound card in the dosbox emulation and/or try running the Q2 binary with the -dsp 2 parameter at the dos command line.

Last edited by ggorts on 2015-07-04, 09:44. Edited 21 times in total.

Reply 2 of 862, by ggorts

User metadata
Rank Member
Rank
Member

The ChaosDM mod requires a client here.

The inline assembly code of Q2 is not available outside the MSVC format. I ported some of these functions to increase performance in DOSBox. I recall that one remaining (major) function did not port, so instead the gcc pre-processor and optimizations per single function were used as an alternative method to reduce any bottleneck in performance. These features required GCC44 or higher, so GCC 4.5.3, alongside the DJGPP 204 environment, was used to build all binaries. This version is also reported to have good compatibility with DXE3.

To start a game mod, run q2dos.exe and press the key '~' to view the game console. Type game acebot to point to the ace directory containing the acebot files or any other directory name which has a quake2 modification. Then, type maxclients 12 to include up to 12 other bots (Rogue's mission pack maxclients no higher than 8), and deathmatch 1 for most cases; finally, map base2 where base2 is an example of a map file to load.
-Or instead use the Dos commandline-
Examples: q2dos +set game 3zb2 +map q2ctf1 +set ctf 1 +set maxclients 12
q2dos +set game rogue +map mine1 +set deathmatch 1 +set maxclients 8
q2dos +set game action +map punwar +exec autoexec.cfg +set deathmatch 1 +set maxclients 8
q2dos +set game dday +map dday1 +set maxclients 8 +set deathmatch 1 +set bots 1

Action Quake 2 Mod
This mod should reside in the action directory. Commands include ltk_skill to change the bot skill (1 - 10).

Dday Mod
The mod, Dday v5.0, is available here or here. To start a botmatch: bots 1; map dday1. Other settings for bots: playerminforbots #; alliedbots #; axisbots #.

ChaosDM Mod
Bots are deployed by this command: sv addbots 5. Where 5 is the number of bots. [This q2-dos.exe binary can replace that used in the q2-bots.v1.7z archive; the /chaos/ directory can likewise be added as a directory under /quake2/.]

Technical notes: libc functions appear in static table although it is possible to automatically load the dynamic library. The former method is suggested by the djgpp web pages since it avoids possible conflicts among libraries and warning messages about crt0 specific functions.

Last edited by ggorts on 2015-07-04, 09:48. Edited 5 times in total.

Reply 5 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie
ggorts wrote:

You're welcome to the source code posted above. An updated archive should be posted soon.

Please let me know, I'm very interested in trying out the converted assembly code. R_DrawParticles is supposed to be slow in nonwin32.

Reply 9 of 862, by ggorts

User metadata
Rank Member
Rank
Member

Attached is a patch to expand use of asm code and also the gcc optimization of that single function.

Attachments

  • Filename
    inline_asm.diff
    File size
    13.75 KiB
    Downloads
    94 downloads
    File comment
    patch for inline asm
    File license
    Fair use/fair dealing exception

Reply 10 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

can you post the entire source to everything as a single 7z for me to check out? Is your mods converted to use my gi.dprintfs with DEVELOPER_MSG_GAME for filtering?

Reply 11 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

i added the diff but it made no discernible speed difference. At least on real hardware. I ran timedemo 1, demomap demo1.dm2 4 times and got the same result every time.

This was tested on real hardware, a P2 400 with 1GB SDRAM.

Reply 12 of 862, by ggorts

User metadata
Rank Member
Rank
Member

The dprintf function was not updated so that mods port with less modification. I'll work on cleaning the source tree so it can be uploaded, too, but it may take some time.

As an aside, it is best to rename the dynamic libraries with the .dxe extension only. Otherwise, given that the dxe3 system is not patched for use of other extensions, it won't work fully with dxe3gen.

Reply 13 of 862, by ggorts

User metadata
Rank Member
Rank
Member

The timedemo does not recover the performance difference. Try leilei's quake1 port and observe the brief lag with color particles. This effect does not lead to widely different timedemo reports.

Reply 16 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

I don't understand what is the problem here? you just compile it like normally with dx3gen -U and if theres some warnings about exports you just add DXE_EXPORT.

Reply 17 of 862, by ggorts

User metadata
Rank Member
Rank
Member

The makefile can use the dxe3gen tool to dump the functions for a bug report. Without the dxe extension, the functions did not list, and this may have other effects, too. There may even be a way to auto-patch the sys_dos.c file with this method, but I'd have to confirm it; try other parameters in dxe3gen to observe.

Reply 19 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

I think you are supposed to be using dxe3res. If you run that against the dx3 it will show a header file you can use for easy exporting.

If it showing only for dxe but not dx3 it may be a bug in DJGPP 2.05 and should be reported as they are currently working on unifying everything regarding these types of issues.

EDIT: I reported the issue to DJGPP's dev mailing list. I'm also curious about using dxe3res as it showed using DXE_EXPORT_ASM for these functions instead of DXE_EXPORT and whether or not this could be a speed issue. But I haven't noticed any performance hits since switching to the DX3s over static built games.

Last edited by Maraakate on 2015-06-28, 03:17. Edited 1 time in total.