mouseboyx

Member
  • Content count

    90
  • Joined

  • Last visited

  • Raffle Tickets

    0

Reputation Activity

  1. Enclusion liked a post in a topic by mouseboyx in Game Replay   
    I like the idea, it seems difficult to do a seek feature with that though.  For each piece of data that didn't change it's true value could be any arbitrary length from the desired tick that's animating.  It becomes easier if there's an ID associated with each object that didn't change, then seek backward through the file until you find each piece of data that you need.  I can see how it would work, like if some float didn't change from the previous tick then write a single character in place of the float indicating to look to the previous tick, and do that every time it doesn't change.  It seems like a necessary tradeoff, the file size will be smaller, but PHP will have to work harder, rewinding the file, parsing each line, checking if the data is there until it finds everything, then sending it off to js.  js could then see that certain data hasn't changed from the seek position tick and fill that in as necessary.  It gets a little complicated while buffering the animation data too, as well as buffering data while the animation is playing in reverse.
     
    Lmao the optimization never ends, in all seriousness though I'm glad I'm getting feedback to improve this.
     
    In other news I figured out an ok method of latency compensation while using SJ.  Only have to set the camera's aim to a certain number of ticks in the future based on that player's ping.  Ended up having a toggle to switch to use either average ping or instantaneous ping from each tick (seems like it might be necessary for certain warping conditions)
     
    Edit (Progress):
    Added a simple yet effective way to save space, vehicles, and flags and oddballs are the main culprit for bloating the file, because they can sit idle for long periods of time.
    An example string of how a vehicle was saved previously:
    ObjectID,tag_name,obj_x_coord,obj_y_coord,obj_z_coord,obj_front_x,obj_front_y,obj_front_z,obj_up_x,obj_up_y,obj_up_z,player_in_vehicle 3800236052,mp_warthog,46.338062286377,-64.705101013184,1.4689781665802,0.64794391393661,-0.758948802948,-0.064540214836597,-0.04084175080061,-0.11922907084227,0.99202638864517,-1 If none of that data changes in the next tick it's reduced to:
    3799056386,p,69
    ObjectID, the character 'p' to indicate to look to previous data, and 69 as the line number of it's last known data change.
     
    PHP then finds all of the 'p' occurrences and fills in the the first and last line of buffer data with the appropriate true values, then echos out the same 3799056386,p,69 like data for the rest of the stuff that doesn't change, and JavaScript fills in the spaces based on the first and last line.  (I think this should work for reverse buffering because the last line true values are found based on the line numbers from the last line)
     
    With the latency compensation I'm going to add another toggle to compensate all player cameras and not only the SJ view.  As long as the positions and rotations of objects remains true to the current tick, then all player cameras can be set into the future by an individual compensation factor to show where any player is currently aiming via a 3D object.
     
     
  2. Takka liked a post in a topic by mouseboyx in info for event warp   
    A collection of tests that might help someone with event_warp in lua scripting.
     
    Put 'antiwarp 3' without quotes into the sapp init.txt to enable the firing of the EVENT_WARP callback.
     
    While continuously moving, on the 3rd time that a player warps, with 'antiwarp 3', event_warp is fired.  If the player stands still for a moment, there's a cooldown effect where they must move and warp 3 times again to trigger event_warp.
     
    Adding 200-300ms of latency then restoring a normal connection every 0.5-1.0 seconds is enough to trigger a warp event, but somewhere in the 180-220ms range and below the player can still warp, but the warp is very subtle and doesn't always trigger event_warp.  Adding and subtracting a network delay above 300ms will surely trigger event_warp if it's applied continuously.
     
    I was using this quick and dirty linux bash script to simulate warp through the localhost, there is a tool called clumsy for windows on github that can simulate delayed, dropped, etc, packets that can also be useful for testing.
    for i in {0..10000} do sudo tc qdisc del dev lo root netem delay 150ms sleep 0.5 sudo tc qdisc add dev lo root netem delay 150ms sleep 0.5 done Run:  sudo tc qdisc del dev lo root netem delay 150ms  after testing to restore normal latency.
     
     
    Pushing a player with a vehicle can trigger EVENT_WARP even if both players have a perfect connection.  I included an lua script that attempts to find warping distance of players who aren't in vehicles.  It works ok, but doesn't take into account all the variables of what can happen in a game, like gravity, falling, player speed, being pushed by a vehicle, walking up an incline, or other things like that.
     
    The main motivation for testing is, players who apply a warp cheat, then do flag runs, I was hoping there might be a way to auto-kick abusive players like that.  It may be possible, taking into account how many warp events happen in a time period, how far the player is warping each time, etc...  My main concern is that I wouldn't want a script solution to auto kick an innocent player.
     
    event_warp.lua
  3. Takka liked a post in a topic by mouseboyx in info for event warp   
    A collection of tests that might help someone with event_warp in lua scripting.
     
    Put 'antiwarp 3' without quotes into the sapp init.txt to enable the firing of the EVENT_WARP callback.
     
    While continuously moving, on the 3rd time that a player warps, with 'antiwarp 3', event_warp is fired.  If the player stands still for a moment, there's a cooldown effect where they must move and warp 3 times again to trigger event_warp.
     
    Adding 200-300ms of latency then restoring a normal connection every 0.5-1.0 seconds is enough to trigger a warp event, but somewhere in the 180-220ms range and below the player can still warp, but the warp is very subtle and doesn't always trigger event_warp.  Adding and subtracting a network delay above 300ms will surely trigger event_warp if it's applied continuously.
     
    I was using this quick and dirty linux bash script to simulate warp through the localhost, there is a tool called clumsy for windows on github that can simulate delayed, dropped, etc, packets that can also be useful for testing.
    for i in {0..10000} do sudo tc qdisc del dev lo root netem delay 150ms sleep 0.5 sudo tc qdisc add dev lo root netem delay 150ms sleep 0.5 done Run:  sudo tc qdisc del dev lo root netem delay 150ms  after testing to restore normal latency.
     
     
    Pushing a player with a vehicle can trigger EVENT_WARP even if both players have a perfect connection.  I included an lua script that attempts to find warping distance of players who aren't in vehicles.  It works ok, but doesn't take into account all the variables of what can happen in a game, like gravity, falling, player speed, being pushed by a vehicle, walking up an incline, or other things like that.
     
    The main motivation for testing is, players who apply a warp cheat, then do flag runs, I was hoping there might be a way to auto-kick abusive players like that.  It may be possible, taking into account how many warp events happen in a time period, how far the player is warping each time, etc...  My main concern is that I wouldn't want a script solution to auto kick an innocent player.
     
    event_warp.lua
  4. Takka liked a post in a topic by mouseboyx in info for event warp   
    A collection of tests that might help someone with event_warp in lua scripting.
     
    Put 'antiwarp 3' without quotes into the sapp init.txt to enable the firing of the EVENT_WARP callback.
     
    While continuously moving, on the 3rd time that a player warps, with 'antiwarp 3', event_warp is fired.  If the player stands still for a moment, there's a cooldown effect where they must move and warp 3 times again to trigger event_warp.
     
    Adding 200-300ms of latency then restoring a normal connection every 0.5-1.0 seconds is enough to trigger a warp event, but somewhere in the 180-220ms range and below the player can still warp, but the warp is very subtle and doesn't always trigger event_warp.  Adding and subtracting a network delay above 300ms will surely trigger event_warp if it's applied continuously.
     
    I was using this quick and dirty linux bash script to simulate warp through the localhost, there is a tool called clumsy for windows on github that can simulate delayed, dropped, etc, packets that can also be useful for testing.
    for i in {0..10000} do sudo tc qdisc del dev lo root netem delay 150ms sleep 0.5 sudo tc qdisc add dev lo root netem delay 150ms sleep 0.5 done Run:  sudo tc qdisc del dev lo root netem delay 150ms  after testing to restore normal latency.
     
     
    Pushing a player with a vehicle can trigger EVENT_WARP even if both players have a perfect connection.  I included an lua script that attempts to find warping distance of players who aren't in vehicles.  It works ok, but doesn't take into account all the variables of what can happen in a game, like gravity, falling, player speed, being pushed by a vehicle, walking up an incline, or other things like that.
     
    The main motivation for testing is, players who apply a warp cheat, then do flag runs, I was hoping there might be a way to auto-kick abusive players like that.  It may be possible, taking into account how many warp events happen in a time period, how far the player is warping each time, etc...  My main concern is that I wouldn't want a script solution to auto kick an innocent player.
     
    event_warp.lua
  5. Enclusion liked a post in a topic by mouseboyx in Recent Purchases   
    When first doing wiring I got a 5 pack of 25ft Cat 6 ethernet cable from microcenter, but every one of these from the 5 pack would eventually drop connection at 1gbps, so I had to manually set all my devices to 100mbps, so that the connection wouldn't drop out and auto-negotiate to 100mbps anyway.  I replaced the ethernet cable for my main desktop quite a while ago and haven't had any issues since, but I just got around to getting some Cat 6a for my 2nd desktop, hoping this will work.  https://www.amazon.com/dp/B077H4KPD7?th=1
  6. Jerry liked a post in a topic by mouseboyx in (Development Example) Call C from Chimera Script   
    This script itself does nothing to extend the client.
    If you're not looking for a development example I would not recommend downloading and running this script.
    The code is really only a boilerplate of basic calls for someone to use as a starting point if they want to learn or figure out how to call C functions from a chimera lua script.
    I spent days trying to figure out how to do this, so I wanted to share the fruits of my labor in case someone else wants or needs this example.  I still don't fully understand how it works, but I know that the code runs.
     
    The instructions for calling C from lua are included in the readme.txt in the zip.
     
    https://www.lua.org/pil/24.htm
    Is a good starting point to learn more about how to call C from lua.
    chimeralib.zip
  7. mouseboyx liked a post in a topic by PiRate in 30 fps lock slow ping updates   
    I can't speak to SAPP's modifications, but the vanilla Halo Dedicated Servers periodically (every 3 seconds) broadcast a super_ping_update to the connected machines, which conveys the pings of the players on the server. When a client receives this message, it replies with a client_to_server_pong. When the server receives the pong, it samples the round-trip latency for that player by determining the amount of time that elapsed between issuing the last super_ping_update and processing the client's client_to_server_pong.
    This has a few immediate consequences on vanilla servers:
    Clients modified to not reply to a super_ping_update will show up as 0 ping, regardless of the amount of time that passes. Clients with just over 3000 milliseconds of round-trip latency will appear to have low ping. Depending on when a client joins, their ping will be 0 until they reply to a super_ping_update and the server receives their pong, which could be 3 seconds and then some. The ping and pong are not sent on the reliable channel; Halo's ping is optimistic and does not reflect packet loss, which explains why for some players, servers that read out under 30 ping for them will have over 130 in practice. Relevant code and technical data is spoilered below.
     
     
  8. Takka liked a post in a topic by mouseboyx in Game Replay   
    This project is currently unfinished, there's a few more things I need to add and also figure out how to work out the logistics of how things will work server side with the vps.  I wouldn't have made it this far without Pirate's hlm.lua library, sunstriker7's help, and also a few lua functions from Enclusion and pROPs.
    The way it works is that an lua script saves halo's tick data in plaintext to a file with the current unix time (1670292207.txt) that's created when a map loads.  The first line of the file is the map name, mode data, and all of the scenery info, names,x,y,z and rotational vectors.  After that, each tick it saves data for players, vehicles, projectiles, and I'm working on adding objectives like flags and oddballs.  It writes out to that file every tick, it could very well be above 1GB per hour of data depending on how much is going on in the game.  But a lot of that data is redundant (compressing the file with 7z makes it a fraction of the filesize).  The render application is written in PHP and JavaScript, it buffers 1000 ticks of data at a time so that it can be animated.  You can Sight Jack any player in the animation.  I'm soon going to implement something so you could send a link to someone like:  http://localhost/halo_game_replay/render.php?file=1670292207&start=1234&sj=5 if the application was hosted publicly, it would start on tick 1234 and begin sight jacking player index 5.  Something like that could help with server administration, you wouldn't necessarily need to be there to catch someone in the act of using an aimbot. 
     
    I was trying to think of a way to save the float data as binary rather than plaintext which would probably reduce the file size significantly, but so far haven't come up with a solution.  Because each tick is separated by newline in the data structure, binary data could contain a newline character and break the data.
     
    I'll release the code when I get this to a more complete state. I also have no experience with animation of 3D models so all the models are just static placeholders to mimic whats going on.  I'm going to extract the bsp and scenery from all the default maps and include that with the project.  The script should technically work with custom maps, but you would have to provide all the models for the vehicles, bsp, and players in wavefront obj format.  I've put a lot of work into this, but I'm getting to a point where I'm slowing down on development.
     
    More info:
    You can tell lua to only save data if there's a minimum of X number of players in the server, for this reason it would probably be best to setup afk_kick, alternatively the lua script could be setup to only record data on command.
     
    In the renderer vehicle models are loaded dynamically, so you could technically spawn 50 warthogs at any time in the game, and it should be able to accommodate it.
     
    For the vps side of things, I was considering maybe a 2 vps setup one vps for the halo server, and one as a web host for the renderer, I was thinking if you had both at the same time it might lag a game in progress.  Or you could use this only as an administrative tool and save the recordings without ever having them be public.  Possibly thinking about multiple cron jobs on the vps where it could compress and upload the data to another vps, or delete the oldest recording if the vps was running out of storage. The last line of the file is written on game end, it writes `game_end,1670292207` to help with writing cron jobs on what to do with the data at the end.
     
  9. Enclusion liked a post in a topic by mouseboyx in Game Replay   
    I like the idea, it seems difficult to do a seek feature with that though.  For each piece of data that didn't change it's true value could be any arbitrary length from the desired tick that's animating.  It becomes easier if there's an ID associated with each object that didn't change, then seek backward through the file until you find each piece of data that you need.  I can see how it would work, like if some float didn't change from the previous tick then write a single character in place of the float indicating to look to the previous tick, and do that every time it doesn't change.  It seems like a necessary tradeoff, the file size will be smaller, but PHP will have to work harder, rewinding the file, parsing each line, checking if the data is there until it finds everything, then sending it off to js.  js could then see that certain data hasn't changed from the seek position tick and fill that in as necessary.  It gets a little complicated while buffering the animation data too, as well as buffering data while the animation is playing in reverse.
     
    Lmao the optimization never ends, in all seriousness though I'm glad I'm getting feedback to improve this.
     
    In other news I figured out an ok method of latency compensation while using SJ.  Only have to set the camera's aim to a certain number of ticks in the future based on that player's ping.  Ended up having a toggle to switch to use either average ping or instantaneous ping from each tick (seems like it might be necessary for certain warping conditions)
     
    Edit (Progress):
    Added a simple yet effective way to save space, vehicles, and flags and oddballs are the main culprit for bloating the file, because they can sit idle for long periods of time.
    An example string of how a vehicle was saved previously:
    ObjectID,tag_name,obj_x_coord,obj_y_coord,obj_z_coord,obj_front_x,obj_front_y,obj_front_z,obj_up_x,obj_up_y,obj_up_z,player_in_vehicle 3800236052,mp_warthog,46.338062286377,-64.705101013184,1.4689781665802,0.64794391393661,-0.758948802948,-0.064540214836597,-0.04084175080061,-0.11922907084227,0.99202638864517,-1 If none of that data changes in the next tick it's reduced to:
    3799056386,p,69
    ObjectID, the character 'p' to indicate to look to previous data, and 69 as the line number of it's last known data change.
     
    PHP then finds all of the 'p' occurrences and fills in the the first and last line of buffer data with the appropriate true values, then echos out the same 3799056386,p,69 like data for the rest of the stuff that doesn't change, and JavaScript fills in the spaces based on the first and last line.  (I think this should work for reverse buffering because the last line true values are found based on the line numbers from the last line)
     
    With the latency compensation I'm going to add another toggle to compensate all player cameras and not only the SJ view.  As long as the positions and rotations of objects remains true to the current tick, then all player cameras can be set into the future by an individual compensation factor to show where any player is currently aiming via a 3D object.
     
     
  10. mouseboyx liked a post in a topic by Sunstriker7 in Game Replay   
    Not sure if you are already doing this but an easy way to trim the size of data files is to only write values that have changed from the previous frame. If you are not already doing that then that is probably the main reason why the file size upon compression is so much smaller. The compression algorithm in the end would do something similar.
  11. Enclusion liked a post in a topic by mouseboyx in Game Replay   
    I think the data collection is going to influenced by latency, here's a video of an aimbot that does horizontal aiming only, on the aimbot client the horizontal aim is always spot on, but the data collected is late, and this is through the localhost so it might be an even greater difference over the internet.  Not sure if there's a way to account for this in the code, or if the person viewing the render will have to assume and compensate for latency. 
     
    It's definitely possible to do a realtime render, but would take some extra work to make it possible.
     
    Edit: It might be possible using get_var(PlayerIndex,"$ping") and using that data to account for latency.
     
    Edit2:
    It looks like the data is late independent from sapp's custom_sleep command, or at least the data seems to be late relative to tick.
    For the player being sightjacked if their ping is anywhere from 1-33ish then their aim needs to be 2 ticks ahead of the current animation, then add 1 tick for every 33ms of ping-ish.
    For the rest of the players not being sightjacked their data needs to be 2 ticks behind the current animation from 1-33 then minus 1 extra tick for every 33ms.
    It may be challenging to find each "tick slot" a player falls into based on ping, then apply that delay in the render, lots of testing to be done...
  12. mouseboyx liked a post in a topic by Enclusion in Game Replay   
    In terms of cheating, you could have a 30 second to a minute buffer. Also even if it was just private it would be extremely useful to be able to check for cheaters, assuming the rendering is accurate enough, without even joining a server.
  13. Enclusion liked a post in a topic by mouseboyx in Game Replay   
    It would take me a while and some motivation to figure out how to make it work, but mysql has a C/C++ api that could be used to create an ffi dll for sapp so that you could call a mysql_query() function directly from an lua script. 
    https://dev.mysql.com/doc/c-api/8.0/en/
     
    I thought about the real time option, if it was a public service I was worried about players using it to cheat, but if it was a private setup, that wouldn't be as much of an issue, the renderer code is built around a fixed recording file size but with a bit of tinkering it could work in near real time, there's currently a sync issue where the js animation runs slightly faster than halo's ticks.  The issue is probably due to using the js setInterval() function for animation frame increments which technically isn't supposed to be used for timing precise events.  Switching to using a timer like performance.now() might solve the issue.
     
    I've had bad experiences with vps hosts in the past where I feel like I can't trust their connection enough not to lag a halo game in progress, I should probably do some testing beforehand to see what happens in different circumstances.
  14. mouseboyx liked a post in a topic by Enclusion in Game Replay   
    If you were able to get it hooked up with a database of some sort it would probably handle some of this for you, not sure how that would be done since I've had issues getting the SAPP lua to do this in the past. 
     
    For the future, it would be cool to hook this up to a web server in real time and be able to watch a game in near real-time. Performance might be an issue, but then again I have ran full servers on the same box that I run other services and it went fine.
  15. Takka liked a post in a topic by mouseboyx in Game Replay   
    This project is currently unfinished, there's a few more things I need to add and also figure out how to work out the logistics of how things will work server side with the vps.  I wouldn't have made it this far without Pirate's hlm.lua library, sunstriker7's help, and also a few lua functions from Enclusion and pROPs.
    The way it works is that an lua script saves halo's tick data in plaintext to a file with the current unix time (1670292207.txt) that's created when a map loads.  The first line of the file is the map name, mode data, and all of the scenery info, names,x,y,z and rotational vectors.  After that, each tick it saves data for players, vehicles, projectiles, and I'm working on adding objectives like flags and oddballs.  It writes out to that file every tick, it could very well be above 1GB per hour of data depending on how much is going on in the game.  But a lot of that data is redundant (compressing the file with 7z makes it a fraction of the filesize).  The render application is written in PHP and JavaScript, it buffers 1000 ticks of data at a time so that it can be animated.  You can Sight Jack any player in the animation.  I'm soon going to implement something so you could send a link to someone like:  http://localhost/halo_game_replay/render.php?file=1670292207&start=1234&sj=5 if the application was hosted publicly, it would start on tick 1234 and begin sight jacking player index 5.  Something like that could help with server administration, you wouldn't necessarily need to be there to catch someone in the act of using an aimbot. 
     
    I was trying to think of a way to save the float data as binary rather than plaintext which would probably reduce the file size significantly, but so far haven't come up with a solution.  Because each tick is separated by newline in the data structure, binary data could contain a newline character and break the data.
     
    I'll release the code when I get this to a more complete state. I also have no experience with animation of 3D models so all the models are just static placeholders to mimic whats going on.  I'm going to extract the bsp and scenery from all the default maps and include that with the project.  The script should technically work with custom maps, but you would have to provide all the models for the vehicles, bsp, and players in wavefront obj format.  I've put a lot of work into this, but I'm getting to a point where I'm slowing down on development.
     
    More info:
    You can tell lua to only save data if there's a minimum of X number of players in the server, for this reason it would probably be best to setup afk_kick, alternatively the lua script could be setup to only record data on command.
     
    In the renderer vehicle models are loaded dynamically, so you could technically spawn 50 warthogs at any time in the game, and it should be able to accommodate it.
     
    For the vps side of things, I was considering maybe a 2 vps setup one vps for the halo server, and one as a web host for the renderer, I was thinking if you had both at the same time it might lag a game in progress.  Or you could use this only as an administrative tool and save the recordings without ever having them be public.  Possibly thinking about multiple cron jobs on the vps where it could compress and upload the data to another vps, or delete the oldest recording if the vps was running out of storage. The last line of the file is written on game end, it writes `game_end,1670292207` to help with writing cron jobs on what to do with the data at the end.
     
  16. Takka liked a post in a topic by mouseboyx in Game Replay   
    This project is currently unfinished, there's a few more things I need to add and also figure out how to work out the logistics of how things will work server side with the vps.  I wouldn't have made it this far without Pirate's hlm.lua library, sunstriker7's help, and also a few lua functions from Enclusion and pROPs.
    The way it works is that an lua script saves halo's tick data in plaintext to a file with the current unix time (1670292207.txt) that's created when a map loads.  The first line of the file is the map name, mode data, and all of the scenery info, names,x,y,z and rotational vectors.  After that, each tick it saves data for players, vehicles, projectiles, and I'm working on adding objectives like flags and oddballs.  It writes out to that file every tick, it could very well be above 1GB per hour of data depending on how much is going on in the game.  But a lot of that data is redundant (compressing the file with 7z makes it a fraction of the filesize).  The render application is written in PHP and JavaScript, it buffers 1000 ticks of data at a time so that it can be animated.  You can Sight Jack any player in the animation.  I'm soon going to implement something so you could send a link to someone like:  http://localhost/halo_game_replay/render.php?file=1670292207&start=1234&sj=5 if the application was hosted publicly, it would start on tick 1234 and begin sight jacking player index 5.  Something like that could help with server administration, you wouldn't necessarily need to be there to catch someone in the act of using an aimbot. 
     
    I was trying to think of a way to save the float data as binary rather than plaintext which would probably reduce the file size significantly, but so far haven't come up with a solution.  Because each tick is separated by newline in the data structure, binary data could contain a newline character and break the data.
     
    I'll release the code when I get this to a more complete state. I also have no experience with animation of 3D models so all the models are just static placeholders to mimic whats going on.  I'm going to extract the bsp and scenery from all the default maps and include that with the project.  The script should technically work with custom maps, but you would have to provide all the models for the vehicles, bsp, and players in wavefront obj format.  I've put a lot of work into this, but I'm getting to a point where I'm slowing down on development.
     
    More info:
    You can tell lua to only save data if there's a minimum of X number of players in the server, for this reason it would probably be best to setup afk_kick, alternatively the lua script could be setup to only record data on command.
     
    In the renderer vehicle models are loaded dynamically, so you could technically spawn 50 warthogs at any time in the game, and it should be able to accommodate it.
     
    For the vps side of things, I was considering maybe a 2 vps setup one vps for the halo server, and one as a web host for the renderer, I was thinking if you had both at the same time it might lag a game in progress.  Or you could use this only as an administrative tool and save the recordings without ever having them be public.  Possibly thinking about multiple cron jobs on the vps where it could compress and upload the data to another vps, or delete the oldest recording if the vps was running out of storage. The last line of the file is written on game end, it writes `game_end,1670292207` to help with writing cron jobs on what to do with the data at the end.
     
  17. Takka liked a post in a topic by mouseboyx in Game Replay   
    This project is currently unfinished, there's a few more things I need to add and also figure out how to work out the logistics of how things will work server side with the vps.  I wouldn't have made it this far without Pirate's hlm.lua library, sunstriker7's help, and also a few lua functions from Enclusion and pROPs.
    The way it works is that an lua script saves halo's tick data in plaintext to a file with the current unix time (1670292207.txt) that's created when a map loads.  The first line of the file is the map name, mode data, and all of the scenery info, names,x,y,z and rotational vectors.  After that, each tick it saves data for players, vehicles, projectiles, and I'm working on adding objectives like flags and oddballs.  It writes out to that file every tick, it could very well be above 1GB per hour of data depending on how much is going on in the game.  But a lot of that data is redundant (compressing the file with 7z makes it a fraction of the filesize).  The render application is written in PHP and JavaScript, it buffers 1000 ticks of data at a time so that it can be animated.  You can Sight Jack any player in the animation.  I'm soon going to implement something so you could send a link to someone like:  http://localhost/halo_game_replay/render.php?file=1670292207&start=1234&sj=5 if the application was hosted publicly, it would start on tick 1234 and begin sight jacking player index 5.  Something like that could help with server administration, you wouldn't necessarily need to be there to catch someone in the act of using an aimbot. 
     
    I was trying to think of a way to save the float data as binary rather than plaintext which would probably reduce the file size significantly, but so far haven't come up with a solution.  Because each tick is separated by newline in the data structure, binary data could contain a newline character and break the data.
     
    I'll release the code when I get this to a more complete state. I also have no experience with animation of 3D models so all the models are just static placeholders to mimic whats going on.  I'm going to extract the bsp and scenery from all the default maps and include that with the project.  The script should technically work with custom maps, but you would have to provide all the models for the vehicles, bsp, and players in wavefront obj format.  I've put a lot of work into this, but I'm getting to a point where I'm slowing down on development.
     
    More info:
    You can tell lua to only save data if there's a minimum of X number of players in the server, for this reason it would probably be best to setup afk_kick, alternatively the lua script could be setup to only record data on command.
     
    In the renderer vehicle models are loaded dynamically, so you could technically spawn 50 warthogs at any time in the game, and it should be able to accommodate it.
     
    For the vps side of things, I was considering maybe a 2 vps setup one vps for the halo server, and one as a web host for the renderer, I was thinking if you had both at the same time it might lag a game in progress.  Or you could use this only as an administrative tool and save the recordings without ever having them be public.  Possibly thinking about multiple cron jobs on the vps where it could compress and upload the data to another vps, or delete the oldest recording if the vps was running out of storage. The last line of the file is written on game end, it writes `game_end,1670292207` to help with writing cron jobs on what to do with the data at the end.
     
  18. Takka liked a post in a topic by mouseboyx in Game Replay   
    This project is currently unfinished, there's a few more things I need to add and also figure out how to work out the logistics of how things will work server side with the vps.  I wouldn't have made it this far without Pirate's hlm.lua library, sunstriker7's help, and also a few lua functions from Enclusion and pROPs.
    The way it works is that an lua script saves halo's tick data in plaintext to a file with the current unix time (1670292207.txt) that's created when a map loads.  The first line of the file is the map name, mode data, and all of the scenery info, names,x,y,z and rotational vectors.  After that, each tick it saves data for players, vehicles, projectiles, and I'm working on adding objectives like flags and oddballs.  It writes out to that file every tick, it could very well be above 1GB per hour of data depending on how much is going on in the game.  But a lot of that data is redundant (compressing the file with 7z makes it a fraction of the filesize).  The render application is written in PHP and JavaScript, it buffers 1000 ticks of data at a time so that it can be animated.  You can Sight Jack any player in the animation.  I'm soon going to implement something so you could send a link to someone like:  http://localhost/halo_game_replay/render.php?file=1670292207&start=1234&sj=5 if the application was hosted publicly, it would start on tick 1234 and begin sight jacking player index 5.  Something like that could help with server administration, you wouldn't necessarily need to be there to catch someone in the act of using an aimbot. 
     
    I was trying to think of a way to save the float data as binary rather than plaintext which would probably reduce the file size significantly, but so far haven't come up with a solution.  Because each tick is separated by newline in the data structure, binary data could contain a newline character and break the data.
     
    I'll release the code when I get this to a more complete state. I also have no experience with animation of 3D models so all the models are just static placeholders to mimic whats going on.  I'm going to extract the bsp and scenery from all the default maps and include that with the project.  The script should technically work with custom maps, but you would have to provide all the models for the vehicles, bsp, and players in wavefront obj format.  I've put a lot of work into this, but I'm getting to a point where I'm slowing down on development.
     
    More info:
    You can tell lua to only save data if there's a minimum of X number of players in the server, for this reason it would probably be best to setup afk_kick, alternatively the lua script could be setup to only record data on command.
     
    In the renderer vehicle models are loaded dynamically, so you could technically spawn 50 warthogs at any time in the game, and it should be able to accommodate it.
     
    For the vps side of things, I was considering maybe a 2 vps setup one vps for the halo server, and one as a web host for the renderer, I was thinking if you had both at the same time it might lag a game in progress.  Or you could use this only as an administrative tool and save the recordings without ever having them be public.  Possibly thinking about multiple cron jobs on the vps where it could compress and upload the data to another vps, or delete the oldest recording if the vps was running out of storage. The last line of the file is written on game end, it writes `game_end,1670292207` to help with writing cron jobs on what to do with the data at the end.
     
  19. Takka liked a post in a topic by mouseboyx in Game Replay   
    This project is currently unfinished, there's a few more things I need to add and also figure out how to work out the logistics of how things will work server side with the vps.  I wouldn't have made it this far without Pirate's hlm.lua library, sunstriker7's help, and also a few lua functions from Enclusion and pROPs.
    The way it works is that an lua script saves halo's tick data in plaintext to a file with the current unix time (1670292207.txt) that's created when a map loads.  The first line of the file is the map name, mode data, and all of the scenery info, names,x,y,z and rotational vectors.  After that, each tick it saves data for players, vehicles, projectiles, and I'm working on adding objectives like flags and oddballs.  It writes out to that file every tick, it could very well be above 1GB per hour of data depending on how much is going on in the game.  But a lot of that data is redundant (compressing the file with 7z makes it a fraction of the filesize).  The render application is written in PHP and JavaScript, it buffers 1000 ticks of data at a time so that it can be animated.  You can Sight Jack any player in the animation.  I'm soon going to implement something so you could send a link to someone like:  http://localhost/halo_game_replay/render.php?file=1670292207&start=1234&sj=5 if the application was hosted publicly, it would start on tick 1234 and begin sight jacking player index 5.  Something like that could help with server administration, you wouldn't necessarily need to be there to catch someone in the act of using an aimbot. 
     
    I was trying to think of a way to save the float data as binary rather than plaintext which would probably reduce the file size significantly, but so far haven't come up with a solution.  Because each tick is separated by newline in the data structure, binary data could contain a newline character and break the data.
     
    I'll release the code when I get this to a more complete state. I also have no experience with animation of 3D models so all the models are just static placeholders to mimic whats going on.  I'm going to extract the bsp and scenery from all the default maps and include that with the project.  The script should technically work with custom maps, but you would have to provide all the models for the vehicles, bsp, and players in wavefront obj format.  I've put a lot of work into this, but I'm getting to a point where I'm slowing down on development.
     
    More info:
    You can tell lua to only save data if there's a minimum of X number of players in the server, for this reason it would probably be best to setup afk_kick, alternatively the lua script could be setup to only record data on command.
     
    In the renderer vehicle models are loaded dynamically, so you could technically spawn 50 warthogs at any time in the game, and it should be able to accommodate it.
     
    For the vps side of things, I was considering maybe a 2 vps setup one vps for the halo server, and one as a web host for the renderer, I was thinking if you had both at the same time it might lag a game in progress.  Or you could use this only as an administrative tool and save the recordings without ever having them be public.  Possibly thinking about multiple cron jobs on the vps where it could compress and upload the data to another vps, or delete the oldest recording if the vps was running out of storage. The last line of the file is written on game end, it writes `game_end,1670292207` to help with writing cron jobs on what to do with the data at the end.
     
  20. Takka liked a post in a topic by mouseboyx in Game Replay   
    This project is currently unfinished, there's a few more things I need to add and also figure out how to work out the logistics of how things will work server side with the vps.  I wouldn't have made it this far without Pirate's hlm.lua library, sunstriker7's help, and also a few lua functions from Enclusion and pROPs.
    The way it works is that an lua script saves halo's tick data in plaintext to a file with the current unix time (1670292207.txt) that's created when a map loads.  The first line of the file is the map name, mode data, and all of the scenery info, names,x,y,z and rotational vectors.  After that, each tick it saves data for players, vehicles, projectiles, and I'm working on adding objectives like flags and oddballs.  It writes out to that file every tick, it could very well be above 1GB per hour of data depending on how much is going on in the game.  But a lot of that data is redundant (compressing the file with 7z makes it a fraction of the filesize).  The render application is written in PHP and JavaScript, it buffers 1000 ticks of data at a time so that it can be animated.  You can Sight Jack any player in the animation.  I'm soon going to implement something so you could send a link to someone like:  http://localhost/halo_game_replay/render.php?file=1670292207&start=1234&sj=5 if the application was hosted publicly, it would start on tick 1234 and begin sight jacking player index 5.  Something like that could help with server administration, you wouldn't necessarily need to be there to catch someone in the act of using an aimbot. 
     
    I was trying to think of a way to save the float data as binary rather than plaintext which would probably reduce the file size significantly, but so far haven't come up with a solution.  Because each tick is separated by newline in the data structure, binary data could contain a newline character and break the data.
     
    I'll release the code when I get this to a more complete state. I also have no experience with animation of 3D models so all the models are just static placeholders to mimic whats going on.  I'm going to extract the bsp and scenery from all the default maps and include that with the project.  The script should technically work with custom maps, but you would have to provide all the models for the vehicles, bsp, and players in wavefront obj format.  I've put a lot of work into this, but I'm getting to a point where I'm slowing down on development.
     
    More info:
    You can tell lua to only save data if there's a minimum of X number of players in the server, for this reason it would probably be best to setup afk_kick, alternatively the lua script could be setup to only record data on command.
     
    In the renderer vehicle models are loaded dynamically, so you could technically spawn 50 warthogs at any time in the game, and it should be able to accommodate it.
     
    For the vps side of things, I was considering maybe a 2 vps setup one vps for the halo server, and one as a web host for the renderer, I was thinking if you had both at the same time it might lag a game in progress.  Or you could use this only as an administrative tool and save the recordings without ever having them be public.  Possibly thinking about multiple cron jobs on the vps where it could compress and upload the data to another vps, or delete the oldest recording if the vps was running out of storage. The last line of the file is written on game end, it writes `game_end,1670292207` to help with writing cron jobs on what to do with the data at the end.
     
  21. Takka liked a post in a topic by mouseboyx in Your first car!   
    My first car was a 1988 Honda Accord, it had a manual transmission, really fun to drive.  I remember driving it home in a blizzard after taking it in for servicing.  It eventually developed problems where if you shifted into neutral the rpm's would drop dangerously low and it would start sputtering while it was idling, so I would keep one half of my foot on the accelerator to prevent it from dying.  The fix was to increase it's idling idling speed, I think that may have been a slow torturous death for that engine, it was still running when it was finally retired, but the torque was nowhere near it's original state.  Having a manual transmission car as a teenager probably contributed to my delinquency, being able to rev up a carbonated 4 cylinder at the high school parking area seemed fun at the time.  Dumping the clutch was also fun, doing mini burnouts or squeals.  Even when I had acquired a newer Nissan Altima I still prefered to drive the '88 Honda to go places that were in town.
  22. ShikuTeshi liked a post in a topic by mouseboyx in Make your own hit sound melody optic pack   
    I used an optic pack by Devieth for some of the functionality in script.lua.
     
    The default melody is the intro to Cannon in D.  I've included a JavaScript app that will convert guitar tabs to be used within the script.lua.  Convert the tab and replace melody={...} in script.lua with the line generated by the converter.
     
    The sound samples are simple square waves generated by audacity, starting at 82hz then incrementing by semitone up to 2637hz, using this pattern you can replace the samples with your own if you want to.  I would recommend a sample length of 0.150 seconds to 0.250 seconds.  The lower the better to avoid backing up the sound playing api.
     
    release_melody.zip
  23. Takka liked a post in a topic by mouseboyx in Your first car!   
    My first car was a 1988 Honda Accord, it had a manual transmission, really fun to drive.  I remember driving it home in a blizzard after taking it in for servicing.  It eventually developed problems where if you shifted into neutral the rpm's would drop dangerously low and it would start sputtering while it was idling, so I would keep one half of my foot on the accelerator to prevent it from dying.  The fix was to increase it's idling idling speed, I think that may have been a slow torturous death for that engine, it was still running when it was finally retired, but the torque was nowhere near it's original state.  Having a manual transmission car as a teenager probably contributed to my delinquency, being able to rev up a carbonated 4 cylinder at the high school parking area seemed fun at the time.  Dumping the clutch was also fun, doing mini burnouts or squeals.  Even when I had acquired a newer Nissan Altima I still prefered to drive the '88 Honda to go places that were in town.
  24. Takka liked a post in a topic by mouseboyx in Your first car!   
    My first car was a 1988 Honda Accord, it had a manual transmission, really fun to drive.  I remember driving it home in a blizzard after taking it in for servicing.  It eventually developed problems where if you shifted into neutral the rpm's would drop dangerously low and it would start sputtering while it was idling, so I would keep one half of my foot on the accelerator to prevent it from dying.  The fix was to increase it's idling idling speed, I think that may have been a slow torturous death for that engine, it was still running when it was finally retired, but the torque was nowhere near it's original state.  Having a manual transmission car as a teenager probably contributed to my delinquency, being able to rev up a carbonated 4 cylinder at the high school parking area seemed fun at the time.  Dumping the clutch was also fun, doing mini burnouts or squeals.  Even when I had acquired a newer Nissan Altima I still prefered to drive the '88 Honda to go places that were in town.
  25. mouseboyx liked a post in a topic by PiRate in Buttery Smooth: Upgrade Your Encoding Class   
    NOTE: No client changes are performed; the code to handle all of this is already in the clients.

    When a server issues a challenge to a connecting client, it also informs that client of the encoding class to be used for communication.
    The encoding class determines the number of bits used to encode certain fields; sightjacking and spectating fall victim to the encoding class used for public servers, but we can get buttery-smooth results if we force the encoding class:
    (The player that recorded this footage had ~200 ping to this server)

    TECHNICAL DETAILS
    It is a common misconception that the global sv_public only controls whether or not the server advertises on the master server list; it also used to select the encoding class and connection class (determines throttling limits).
    sv_public 0 sets the encoding class to the LAN encoding class in addition connection class four, the effects of which are demonstrated above. sv_public 1 sets the encoding class to the internet encoding class. The attached script effectively forces sv_public 0 only for the purposes of determining encoding and connection class - the global is not modified and when used for other purposes (e.g. determining whether or not to advertise on the master server list) sv_public behaves as normal.

    The changes have the following effects on encoding behaviour (from internet to LAN encoding class):
    angular_velocity number of bits per component increased from 16 to 31 (fixed-width encoding in range [-8, 8]) relevant fields: equipment_update.angular_velocity vehicle_update.angular_velocity vehicle_new.angular_velocity projectile_new.angular_velocity equipment_new.angular_velocity local_player_vehicle_update.angular_velocity remote_player_vehicle_update.angular_velocity remote_player_total_update_vehicle.vehicle_data.angular_velocity translational_velocity number of bits per component increased from 16 to 31 (fixed-width encoding in range [-100, 100]) relevant fields: projectile_update.translational_velocity equipment_update.translational_velocity weapon_update.translational_velocity vehicle_update.translational_velocity vehicle_new.translational_velocity biped_new.translational_velocity projectile_new.translational_velocity equipment_new.translational_velocity weapon_new.translational_velocity local_player_vehicle_update.translational_velocity remote_player_vehicle_update.vehicle_data.translational_velocity fixed_width_normal_8bit number of bits for theta (pitch) increased from 8 to 20 resolution improved from ~0.7 degrees to ~0.00017 degrees number of bits for phi (yaw) increased from 8 to 20 resolution improved from ~1.4 degrees to ~0.00034 degrees relevant fields: vehicle_update.forward and vehicle_update.up vehicle_new.forward and vehicle_new.up biped_new.forward and biped_new.up projectile_new.forward and projectile_new.up equipment_new.forward and equipment_new.up weapon_new.forward and weapon_new.up local_player_vehicle_update.forward and local_player_vehicle_update.up remote_player_action_update.facing_vector super_remote_players_action_update.facing_vector remote_player_vehicle_update.forward and remote_player_vehicle_update.up remote_player_total_update_biped.action_data.facing_vector remote_player_total_update_vehicle.vehicle_data.forward and remote_player_total_update_vehicle.vehicle_data.up fixed_width_normal_16bit number of bits for theta (pitch) increased from 16 to 20 number of bits for phi (yaw) increased from 16 to 20 relevant fields: item_accelerate.direction field type: locality_reference_position position is always encoded as an absolute position, rather than conditionally switching between a small-distance delta and absolute in the best case, improves the resolution per component from 1/64 ingame units to 4.7e-7 ingame units this change should drastically reduce the jitter observed when used with remote_player_position_update_rate 0 and similar configurations servers running HUGE maps may not want this patch, because absolute position has a range of [-5000, 5000] per component in the worst case, increases the number of bits per component from 25 to 31 relevant fields: projectile_update.position vehicle_update.position projectile_new.position local_player_vehicle_update.position remote_player_position_update.position remote_player_vehicle_update.position remote_player_total_update_biped.biped_data.position remote_player_total_update_vehicle.vehicle_data.position  
    WARNING
    I do not often program in lua, so there are probably a few errors.
    This script should be loaded in as early as possible (e.g. in an init.txt) so that the code paths that are targeted are patched before the process runs through them.
    This script increases the amount of data sent and received, but the amount is probably marginal by today's standards.
     
    For admins: this script will make packet loss and throttling stand out like a sore thumb when players are turning; do not assume a player is aimbotting on the sole basis that their aim presents a lot of jerks.

    CREDITS
    Vitor, for helping me test this, providing video, and general support.
     
     
     
    buttery_smooth.lua