Giter Site home page Giter Site logo

yalter / bunnymodxt Goto Github PK

View Code? Open in Web Editor NEW
197.0 12.0 37.0 4.24 MB

Speedrun and TAS tool for Half-Life & friends.

License: Other

C++ 72.02% C 13.84% CMake 13.65% Batchfile 0.02% Python 0.48%
c-plus-plus speedrun tas linux windows half-life goldsource

bunnymodxt's People

Contributors

arianon avatar chinese-soup avatar eddio0141 avatar eim64 avatar fireblizzard avatar godlikehobbit avatar hobokenn avatar jcb936 avatar khanghugo avatar marckvdv avatar margen67 avatar matherunner avatar mxpph avatar philippthecat avatar quantumdude836 avatar smileyag avatar yalter 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

bunnymodxt's Issues

Bunnyhop bug

Hello tryed out bunnyhop XT on many clients, but still have some issues with commands.
On some HL Won clients (including goldsource) the bxt_autojump command is working, but not working bxt_hud commands.
On some clients nothing is working.
Main thing is that the autojump is not working at all.
System: windows 10.
Do you have some way to repair this bug?
Безымянный2
Безымянный3
Безымянный4
Безымянный

Allow client-side camera to be independent from the server

Add a command/cvar that toggles independence between client and server cameras, so that we'll be able to arbitrarily move the camera around without affecting the server physics. Primary use cases based on my experience:

  • visually monitor parts of a map before the character actually arrives there
  • view what's happening behind your back while you're moving forward

This can be done by e.g. modifying the pparam argument passed to V_CalcRefdef.

Training HUD for strafing

Strafing is one of the most fundamental skills in Half-Life speedrunning. Any decent TAS runner should also be reasonably competent in doing strafing-related tricks by hand, even though we will always automate them in our work.

I'm not sure if there's a demand for this. But we could consider adding a HUD similar to cgaz's HUD to aid practising various kinds of strafing. We do get questions about strafing from beginners occasionally.

Half-Life Opposing Force 1.1.2.2 crashes.

When I inject BXT in HL:OF and press New Game or Load Game it crashes. I use software mode because OpenGL lags REALLY hard. Why?
Screenshot_3
Screenshot_4
Label: Bug (forgot to insert it)

NPC information

Currently we do not display/log any information related to NPC AI and movement. Investigate what are the most relevant information to be displayed/logged on HUD or TAS log.

Some information that may be relevant:

  • tasks
  • NPC position
  • NPC yaw

Option to render triggers with TriAPI

Triggers are currently made visible by removing the EF_NODRAW bit and setting rendermode to kRenderTransColor. This is done in AddToFullPack before the server transmits these information to the client.

There are several shortcomings to this approach.

  1. If a demo is recorded while triggers are visible, they will remain visible in demo playback. This is because demos essentially record client-server communications. Removing them from demos requires special tools.
  2. Triggers do not show up if they somehow do not have an associated model despite collisions working correctly. While this is not a problem for the vast majority of the time, one exception can be found in the TWHL Tower mod maps.
  3. Despite the triggers looking translucent, they can make certain graphical effects behind them disappear completely. One example is TriAPI-rendered AI nodes. This is due to the use of kRenderTransColor which is required to assign colours to the triggers. They can also make some sprites disappear.

Since TriAPI rendering is done completely client-side, demos will not capture them. Also with TriAPI, all faces can be coloured even with other render modes such as kRenderTransAlpha.

The hardest part of implementing this enhancement would be to understand how to actually enumerate and render faces.

Suggestion for bxt_timer_autostop

Can you add more values which stand for others timer stop circumstance? For example, "2" means when you end a chapter, the timer will stop, we can use either map list or map's name to know what chapter we're playing. "3" means when you end a map, the timer will stop. I know bxt_autopause is a thing but this may be a bit more precise and easier to use since im a pleb

TAS Frame counter

Would it be possible to add a command that counts and displays how many frames
(depending on frametime) that have passed since a specified point?

More specifically on any framebulk you could specify when to start counting the frames
that have passed

For example:
s03lj-----|------|------|0.001|-|-|1|bxt_frame_counter 1

This would be of great help with iteration times on making TASes frame perfect.

For example if we want to take corners, press buttons, interact with NPCs
or pick up items on a frame perfect level.

Missing commands when using BXT in Half-Life mods

I've been encountering this issue for a while now but it hasn't bothered me enough to report it until recently. I don't require much of BXT, nor do I really understand how the mod really works. This is an issue with a number of singleplayer mods, but in particular I wish to experiment with speedrunning the mod Halfquake: Amen. Specifically the 2018 updated steam re-release contained within "Halfquake Trilogy". My two main issues are that for reasons I do not yet know or understand, bxt_autohop and bxt_bhopcap and their related commands are not available. There are almost definitely other commands that fail to appear also. Here's a screencap I took of the BXT debug console:
BXT pls
Any help in resolving this issue would be greatly appreciated, and apologies in advance if the solution is already lying around somewhere and I missed it.

GL Crosshairs

Add a crosshair that is rendered by the game itself, instead of using sprite files.

Not only this would make the crosshairs look sharp and clean, but commands for full crosshair customization could also be added.

Would be best if it worked like this: http://tools.dathost.net/, so you could generate crosshairs using this, or even use your crosshair settings from CSGO and it'd look the same.

HUD to track Nihilanth's AI for full game TASes or new players

The cvar may be called bxt_hud_nihilanth.

It may be helpful for a full game TAS or new player to track Nihilanth's AI to get a sense of progress on making his head open, which boils down to measuring a few state information, like level and irritation.

In addition, a time-saving trick that is rarely done in today's runs on the leaderboard, but was done in HL21, is to saveload after at least 10 health spheres have been absorbed. This will nullify the rest of the health spheres. This requires tracking the number of active health spheres.

See https://www.jwchong.com/hl/monsters.html for details on Nihilanth's AI.

nihilanth-hud

Purpose of these values:

  • health: affects the animation speed of Nihilanth (and therefore how quick level increments), minimising the health is a priority in an optimised run
  • level: if 10, the head should open immediately
  • irritation: if 0, Nihilanth does not attack; if 1, level may increment; if 2, the head is open; if 3, he is dead
  • recharger: determines whether Nihilanth has found a recharger, allowing him to use it
  • spheres: tells the runner when to saveload to nullify the rest of the spheres, which is when the count is less than or equal to 10

TAS Frame number indicator

Would it be possible to add a UI element that indicates how many
frames (depending on frametime) that have passed since the TAS script has been executed?

This would be of great help with iteration times on making TASes frame perfect.

HUD for detecting if any entity can be +used at the current position

This can be useful for quickly scanning along a wall to detect usable objects on the other side of the wall. This HUD can also confirm that some object of interest is within the +use radius without trial and error while TASing.

We could make the HUD configurable. Aspects include:

  • To display a list of entities, or to simply state that at least one entity is usable
  • Search radius
  • To highlight the entities on the screen

For example, we might have

bxt_hud_useable_entities_list (0|1)
bxt_hud_useable_entities_radius radius
bxt_hud_useable_entities_highlight (0|1)

The search radius should default to the player USE radius. In the entity list, the HUD should list out the entity's classname along with how far away the entity is from us. The list itself be sorted by the distance. For instance,

Usable Entities:
monster_scientist (34.8)
monster_scientist (55.2)
func_button (60.3)

To highlight the entities, use TriAPI to maybe render an indicator at the entity position on the HUD. This is so that even if the entity is behind a wall, we should still able to see the indicator.

Build issue on Linux

An error occured to me while trying to compile BXT on my machine

Scanning dependencies of target taslogger
[  2%] Building CXX object taslogger/CMakeFiles/taslogger.dir/src/writer.cpp.o
In file included from /usr/include/c++/5/deque:60:0,
                 from /home/szymex/BunnymodXT/taslogger/./taslogger/writer.hpp:3,
                 from /home/szymex/BunnymodXT/taslogger/src/writer.cpp:1:
/usr/include/c++/5/bits/stl_algobase.h:59:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
taslogger/CMakeFiles/taslogger.dir/build.make:62: recipe for target 'taslogger/CMakeFiles/taslogger.dir/src/writer.cpp.o' failed
make[2]: *** [taslogger/CMakeFiles/taslogger.dir/src/writer.cpp.o] Error 1
CMakeFiles/Makefile2:394: recipe for target 'taslogger/CMakeFiles/taslogger.dir/all' failed
make[1]: *** [taslogger/CMakeFiles/taslogger.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

OS: Linux mint 17.3

RapidJSON is downloaded from releases page and the dir passed to cmake is include/rapidjson from the repo
BOOST is installed through apt (libboost1.58-all-dev)
CLang v3.8.0
GCC v5.4.0

Highlighting specific entity types

Implement a way to highlight specific entity types in the map, making them more visible. For example, highlight all func_pushable. Or highlight all func_ladder. The colour, pulse rate, etc can be customised.

This feature is a generalisation of trigger display, in fact, making bxt_show_triggers merely a shorthand for "highlighting different trigger types with different default colours".

The highlighting can be done by drawing using TriAPI over the entity surface.

crossfire copy

BXT Console Commands missing

Not all of the console commands listed in the wiki are present in game, such as bxt_taslog.
https://i.imgur.com/5ODo3Dc.png
I've tried several different ways of opening both hl.exe and injector.exe together, and in some ways, there are even more commands missing, and I could not find a way to have all of them.
Here are the screencaps for the log as well:
http://i.imgur.com/Vqtzn9y.png
http://i.imgur.com/YCVtbSo.png
http://i.imgur.com/xc4aJPK.png
http://i.imgur.com/yZbl7Mx.png

I used a .bat file to open the injector and hl.exe.

Visualise AI nodes

AI nodes are sort of guides directing where an NPC should move to. Being able to see where the nodes are can be helpful.

Unfortunately, nodes do not have a model associated with them, unlike triggers. Visualisation can be done with TriAPI. Alternatively, we could attach an existing model to them, though this is less ideal.

Hud element not showing

desktop screenshot 2018 05 28 - 20 39 21 20
desktop screenshot 2018 05 28 - 20 39 49 64
desktop screenshot 2018 05 28 - 20 40 49 27
Hud elements do not show!
Same results in and outside of program files (on an ssd anyway not real program files) and on goldsrc package and NGHL
Tried w/steam and without steam (NGHL)
Same result with similar errors.
I tried updating drivers and it worked for one session but then I restart my computer and it's back to this
I have no idea what causes this.
Tried other stuff to no avail either.

Pastebin for bxt log: https://pastebin.com/azKvBKnb

Wallhack

Wallhack has always been on our TODO list, but it's not really high priority. Explore if it's possible to adjust the alpha of walls.

Facility to quickly test save warping

Inspired by hlstuff's SWT which is a testing tool to quickly save warp from one map to another without the need to manually specify the intermediate maps and landmarks.

In order to figure out the intermediate steps, BXT must have knowledge of an undirected graph linking all maps together. The graph should be stored in a file and specified by

bxt_save_warp_graph filename

The file should contain an undirected graph with maps as vertices and landmarks associated with the edges. It is yet undecided as to what format the file might take.

When save warping, BXT should by default take the path with the least intermediate steps. However this may not always be desirable. Therefore we can consider adding a command that generates an indexed list of all possible paths sorted by the number of steps.

bxt_save_warp_paths dest

This should generate a list that looks like this:

[0] map1 -> map2 -> map5
[1] map1 -> map3 -> map4 -> map5
[2] map1 -> map6 -> map7 -> map8 -> map4 -> map5

To actually save warp, we might have a command that takes the destination map name and an optional index to the path list.

bxt_save_warp dest [index]

Note that this is a cheat command. It should only be enabled with sv_cheats 1.

Visualise projectile trajectory

It can be useful in more complex runs to be able to quickly visualise the full trajectory of projectiles, primarily hand and MP5 grenades, without actually tossing/firing them. This is more useful for hand grenades as predicting how it's going to bounce around without tossing can be non-trivial. Figuring out the exact view angles, position, velocity, and time to toss a hand grenade so that it lands on the right spot is often an exercise in frustration.

Normally, the trajectory plots should be updated in real time as you move your position or camera around. But it should be possible to make them fixed in place temporarily so that you can move around to explore and study the full trajectory.

This feature may require reimplementing the essential parts of entity physics for trajectory prediction. Plotting the trajectory can be done using TriAPI.

bxt_autorecord is still not fixed (FIXED)

They Hunger Steampipe v1.1 and 1.1.0.0 (idk the liblist says it) on Half-Life latest steam version cant use your feature. I really fuck up about it
maybe the game just fucks up itself

Cheat commands for setting origin and velocity

At times it can be useful to set origin and velocity during the planning or testing phase. Setting velocity can be used for quickly checking the feasibility of routes and strategies without pulling out a gauss or doing damage boosts.

The command for setting origin should be straightforward:

bxt_ch_set_origin x y z

We could also have a command for offsetting origin:

bxt_ch_offset_origin dx dy dz

There could be three ways to set velocity:

bxt_ch_set_velocity_cartesian x y z
bxt_ch_set_velocity_spherical pitch yaw mag
bxt_ch_set_velocity_viewangles mag

The commands should be self-explanatory. The first sets the x, y, z components directly. The second takes two angles and the magnitude of velocity as part of a spherical coordinate system. The third is equivalent to the second except pitch and yaw are set to the current viewangles.

Build issues on (arch) linux

I'm currently trying to build the master branch of this project.
the cmake output looks like this (seems fine to me)

➜ cmake -DRapidJSON_ROOT=/usr/include/rapidjson -Wno-dev .. 
-- The C compiler identification is GNU 8.1.1
-- The CXX compiler identification is GNU 8.1.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- cotire 1.7.0 loaded.
-- Boost version: 1.67.0
-- Found RapidJSON include directory.
-- CXX target BunnymodXT cotired.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jonas/.repos/BunnymodXT/build

although the compiling itself fails at 58% with this error

/home/jonas/.repos/BunnymodXT/BunnymodXT/modules/ServerDLL.cpp: In static member function ‘static void ServerDLL::GetTriggerColor(const char*, bool, bool, float&, float&, float&, float&)’:
/home/jonas/.repos/BunnymodXT/BunnymodXT/modules/ServerDLL.cpp:1214:99: error: too many initializers for ‘const std::array<std::array<float, 2>, 2>’
 constexpr std::array<std::array<float, 2>, 2> common_alphas{ { 120.0f, 50.0f }, { 50.0f, 20.0f } };
                                                                                                  ^

make[2]: *** [CMakeFiles/BunnymodXT.dir/build.make:203: CMakeFiles/BunnymodXT.dir/BunnymodXT/modules/ServerDLL.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:102: CMakeFiles/BunnymodXT.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

GCC version: gcc version 8.1.1 20180531 (GCC)
boost version: 1.67.0-4
rapidjson version: 1.1.0-2

TAS editor: "sketch" short segments in real-time

I've been thinking about my experience with GoldSource TASing, particularly about the reasons for me being unmotivated to do any TAS work, and about the possible ways of improving the state of affairs with regards to those reasons. I'm writing the ideas down in this issue so that they aren't lost; I cannot say that I am motivated enough to actually try implementing them in BXT.

Issue

TASing suffers because trying out route ideas is very slow and requires a lot of effort. TASing (even an established route) is filled with lots of automatable manual labor (finding the perfect strafe angles).

Idea: visual strafe trajectory builder

Improve finding the perfect strafe angles by adding a way of doing it visually in-game, partially automated.

Make it possible to pause in-game at the end of a .hltas script and activate an interface for selecting the next strafe path. Moving the mouse across the screen controls the next strafing yaw. The predicted strafing path for the given yaw is shown as a line, which moves in real-time according to the mouse position. It’s possible to see speed drops (e.g. from collisions) on the line, perhaps with color changes. It “snaps” to perfect strafing angles (perhaps by snapping to angles corresponding to sudden changes in velocity). By clicking you can select the strafing yaw and have it appended to the script as a framebulk.

image
image
The predicted path is drawn in green, and red means there was a sudden speed drop.

Extend this by allowing the TASer to select multiple subsequent strafing paths. Clicking another button could “split” the predicted path at a point and subsequently moving the mouse will control the strafing yaw past that point (effectively resulting in two subsequent framebulks). Make it possible to adjust the splitting point after setting up the subsequent strafing angle, effectively controlling the number of frames in the first framebulk. This should also snap (think strafing forward, then strafing left to turn around a corner, and adjusting the number of frames in the first framebulk so strafing left starts as soon as possible so as not to bump into the corner).

image
You can move the splitting point back and forth, the predicted path updates in real-time as you do.

This could be further extended by allowing as many split points as possible, so you can work on the future strafe path like that. Could probably be extremely useful for bhop maps.

Additionally, a top-down view can be shown to allow for more convenient strafing path construction.

image
Constructing a strafe trajectory with a top-down view, except it should be orthographic and show entities.

Idea: "sketch" short .hltas segments in real-time

Allow experimenting with route ideas quickly with a smart real-time recording.

You should be able to record your actions in real-time or slow-motion into framebulks. Obviously plain recording into framebulks produces a result that’s not exactly useful, so instead the tool should take the approximate average angles the player took while recording and convert them to a handful of perfect strafing framebulks, which could then be adjusted via a visual method from the above idea.

One possible way to ease this process is by re-introducing some kind of +bxt_tas_strafe (similar to TASMod v1.4). On every frame it will try to perfect-strafe to where the player is currently facing (the camera angle won’t get overridden by strafing while it’s active). If the player turns the camera to the side faster than the strafing can “catch up”, only the final angle (when the strafing catches up) will be recorded, resulting in one long framebulk instead of many very short ones. This way the player can record themselves perfect-strafing a short segment in slow-motion and get a small number of framebulks back, which they can subsequently “snap” to perfect angles and frame counts with the visual trajectory builder.

Uninject

Just kill the process? Or need additional actions?

"bxt_hud_color" doesn't appear to work in config files.

So in my userconfig.cfg I have this line:

bxt_hud_color "0 206 209"

And when I launch my game and inject BmodXT, the HUD is the default yellow-ish color, and typing bxt_hud_color in the console returns two empty quotation marks, as if the command didn't have a value. However, when in game, the command works fine and I can change the HUD colors properly.

Error:/usr/lib32/libGL.so.1: undefined symbol: xcb_dri3_get_supported_modifiers

i have a 7.5 gen intel haswell gt1 igpu, i'm using the modesetting driver with dri. whenever i try to run runhl.sh, i get this error:

...
Error:/usr/lib32/libGL.so.1: undefined symbol: xcb_dri3_get_supported_modifiers
Could not load hw.so.
Please try again at a later time.[DevMsg] SPTLib: Modules contain 3 entries.
[DevMsg] SPTLib: Unhooking ...
[DevMsg] SPTLib: Unhooking ...
[DevMsg] SPTLib: Unhooking ...
[DevMsg] BXT: Closed the message queue.

what i've tried:

  1. ran xorg with both dri3 and dri2
  2. used both the binary version of libBunnymodXT.so and the version i manually compiled from source.

none of them solved it and the error always stayed the same. what should i do?

here's my /etc/X11/xorg.conf.d/20-modesetting.conf:

Section "Device"
    Identifier  "Intel Graphics"
    Driver      "modesetting"
    Option      "AccelMethod"    "glamor"
    Option      "DRI"            "3"
    Option      "TearFree" "true"
EndSection

Custom triggers

Add custom triggers, same style as Bunnymod Pro's cl_autocmd.

Another type of those could be custom triggers for LiveSplit, which would force the program to split once entered. This would allow for custom splits that aren't Maps or Chapters.

Make them exportable to a file (with mapnames and coordinates inside) so it could be loaded the next time you launch the game.

Issues with installing/compiling(?)

Im on ubuntu 16.04, with limited experience on the linux terminal, and I've followed the steps to the best of my ability but the final step with cmake is throwing a few errors,

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
I have no idea what this means
CMake Error at taslogger/CMakeLists.txt:11 (message): Could not find RapidJSON include directory.
this one I vaguely understand but not why its happening(I have rapidJSON, )
CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1677 (message): Unable to find the requested Boost libraries. Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.

and the third one is the same as the second one, but I understand it even less...

cmake -BOOST_ROOT=home/me/boost/ -DRapidJSON_ROOT=/home/rapidjson -Wno-dev . .

is the command I have been messing with, I tried changing -DRapidJSON_ROOT to -RapidJSON_ROOT`, fiddled with the file location things, and I looked up what to do on google but didn't find anything. Im hoping that someone can help me out here, although I don't know if this page can really be used for that(I'm just going to assume its for any issues)

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.