帖子
RussiaGrimMaple10 months ago

tl;dr It's a timer that injects itself into the game, which allows the script to run exactly on each frame, making timing more accurate. If you're interested to test, source code is available at github https://github.com/3RD-Maple/SpeedTool  download is available on itch https://3rdmaple.itch.io/speedtool . Please note that the project is still a WIP; some things might be broken, buggy, or missing. I would appreciate any feedback or contribution!

Now let me explain. I had a few gripes with LiveSplit for quite a while now, and I finally figured out a way to improve some of the things. First, let's talk about how scripting works in LiveSplit. ASL is a language that's transpiled to C# code, which then runs on a background thread with (I believe) 120 Hz refresh rate. This has a few implications. First of all, ASL allows for any C# code to be executed, which is unsafe. If you don't pay attention to what you run as an ASL script, it can potentially do harm to your PC. Either intentionally, or unintentionally. Second of all, that background thread is not necessarily in perfect synchronization to the game it runs for. It's possible for it to start executing script inbetween frames, adding a few milliseconds to the inaccuracy, or to completely miss some of the loading screens if they are short enough and the game runs on much higher refresh rate. There are also OS timing issues, which make background thread approach a little inconsistent. In my timer, SpeedTool, the script is injected into the target game. It then hijacks the graphics API function that presents a game frame to the screen, and executes your script at that time. So it will achieve perfect synchroniztion with the game's refresh rate no matter what. In a sense, it works similar to how FPS counter, or any other, overlay works :) Here's a fancy pic to help illustrate the difference.

As for the safety aspect, I used LUA sandbox to run scripts in a safe environment that can only do harmless things. It should be impossible to do any harm with a script this way. Regarding user interface, I tried doing something different from the usual wall-of-text approach of conventional speedrunning timers. It's a default display option, and I do hope you like it. However, a "Classic" interface option is available in case you want something more familiar.

I tried coming to this project with a fresher look on how things are, therefore SpeedTool might feel different. For one, I moved away from "Splits" idea to a "Game" idea, which combines splits, categories, scripts, and other necessary stuff into a single Game file. I believe it should be easier to share pre-made solutions this way. A side effect of this is I didn't implement per-split personal bests YET, as it gets complicated trying to match splits from game file to saved personal best, especially when something changes. On a plus side, I will create game vaults that will have full run history, with splits and everything.

Did I already mention that this timer runs natively on Linux too? It should work on MacOS as well, but I have no way of testing it, as I don't own any of the Mac hardware. Unfortunately, the scripting part only works on Windows, as I have no idea how to approach dll injection on other systems. If you do - please, consider making a PR :) Scripting should work with OpenGL, DirectX 9, and DirectX 11 games. I will add DirectX 10 and 12 support in some near future (or, you can make a PR if you beat me to it). Please note that injection might be impossible for some games, due to anti-cheat measures, game-specific implementation quirks, or because it's a wrong Moon phase.

As a specific bonus, splits structure allows for infinite subsplit nesting - you can now make as many subsplit levels as you want. I know we all secretly wanted that ;)

Some of the future plans include:

  • Runs vault, to store full speedrunning history
  • Automatic Game file loading, depending on what game is currently open
  • Web source capture support for OBS
  • More display options
  • More customisation options

All of this said, I do hope you enjoy and find this idea to be useful. I'd appreciate any feedback, idea, or contribution. Let's make a great new timer!

RaggedDan YUMmy_Bacon5 喜欢这个
RussiaGrimMaple7 years ago

Hello there everyone.

Recently I started a project to train a neural network that would have a speedrun video as an input and that would output Time without loads. And it seems that I'm having a stunning success with it at this moment!

I've used Need for Speed: Carbon game as a baseline since I happen to mod it, and that it uses time without loads. Even though the network is not working completely as I intended so far, it manages to hit 1 second accuracy on any% NG+ runs, making it already useful for retiming runs in that particular category.

If there are any active mods reading this, I could use some of your feedback please. Particularly, I would like to know what would you expect from such a thing - PC requirments, accuracy, analysis speed etc. Would you think it will be acceptable to use AIs for such a task, given it has a good accuracy?

Also feel free to ask questions.

Tenka, Quivico 5 其他 喜欢这个
GrimMaple的介绍
加入时间
7 years ago
在线
6 months ago
记录
9
已玩过的游戏
Test Drive Unlimited
Test Drive Unlimited
最近一次游戏记录 6 years ago
9
记录
关注的游戏
Need for Speed: ProStreet
Need for Speed: ProStreet
最近一次访问时间 10 months ago
1
访问
Need for Speed: Most Wanted
Need for Speed: Most Wanted (2005)
最近一次访问时间 9 months ago
180
次访问
Need for Speed: Carbon
Need for Speed: Carbon
最近一次访问时间 8 months ago
200
次访问
Need for Speed: Underground
Need for Speed: Underground
最近一次访问时间 8 months ago
55
次访问
Juiced
Juiced
最近一次访问时间 9 months ago
87
次访问
Need for Speed: Most Wanted 5-1-0
Need for Speed: Most Wanted 5-1-0
最近一次访问时间 5 years ago
13
次访问
Need for Speed: Underground Rivals
Need for Speed: Underground Rivals
最近一次访问时间 6 years ago
3
次访问
负责管理的游戏
Juiced
Juiced
最近一次操作 5 years ago
2
操作