livesplit / livesplit-core Goto Github PK
View Code? Open in Web Editor NEWlivesplit-core is a library that provides a lot of functionality for creating a speedrun timer.
Home Page: https://livesplit.org/
License: Apache License 2.0
livesplit-core is a library that provides a lot of functionality for creating a speedrun timer.
Home Page: https://livesplit.org/
License: Apache License 2.0
I'm trying to build using the instructions in the README and I get this output:
$ cargo build --release -p livesplit_core_capi
error: package id specification `livesplit_core_capi` matched no packages
Version info if it helps (macOS 10.12.3):
$ cargo --version
cargo-0.17.0-dev (f9e5481 2017-03-03)
$ rustc --version
rustc 1.16.0
Any urn file I try and parse segfaults if it is missing the 'start_delay' key in the json.
I can't really determine if this is a bug in ls-core or from something else, I had issues with both emscripten and a basic C program.
The urn spec says that all keys are optional so not having 'start_delay' shouldn't error.
I don't have any issues loading the same file in the actual urn application.
The fractional part is rounded, so it can sometimes show as .100, which is not what we want. So we should add a small epsilon, truncate and get rid of the .100 case.
In the Python bindings, class Run.parse_file is doing a:
bytes = bytearray(file.read())
But it needs to pick an encoding, at least in my Python 3.6.2 just installed from python.org, such as:
bytes = bytearray(file.read(), 'utf8')
Algorithms shouldn't run while typing.
Port this from here: LiveSplit/LiveSplit.Title@81091e8
The Splits Editor should act similar to a component. So pretty much everything about it should be implemented in livesplit-core. The Splits Editor provides a state object that contains all the necessary information for visualizing it in any kind of UI.
Things to clear up: Should the Splits Editor directly modify the Run object that is in use by the timer and keep a clone in case we need to cancel our progress, or should we just modify the clone in the first place and replace the Run used by the timer once the changes are approved? The former case has a lot of issues with potential race conditions and forces us to introduces reference counting and reader writer locks in most of the code we already wrote. However it models what the original LiveSplit is doing more closely.
I don't have an Android phone, so I have no idea how these splits look like. Help anyone?
So far there's no layouts in livesplit-core at all. They obviously should be handled in some way.
Detected by cargo-fuzz:
For some reason I completely forgot about that.
Similarly to the Run Editor, the Layout Editor should also have a UI independent implementation in livesplit-core, that allows placing components, moving them around and changing their settings. The settings of each component should be available in some kind of general description of the settings. So there would be some kind of enum like this:
pub enum Setting {
Integer { name: String, value: i32 },
String { name: String, value: String },
Table(...),
List(...),
}
This allows for representing 584.554531 years while also being maximally precise.
Update: Actually this seems mostly like an issue when it comes to algorithms that use a seconds / milliseconds / nanoseconds representation. So those should potentially be rewritten to use TimeSpan instead (i.e. extend it to support those use cases). If TimeSpan can't be made to support those use cases, they should at least switch to a u64 nanoseconds representation. Summing up and averaging could theoretically be problematic in case the sum overflows the 584 years, which is unlikely but could happen.
With the components supporting most "logic settings" by now, we want to be able to also implement the color and font settings. This is however blocked by the Layout Settings, as that's where the default colors and fonts are specified.
LiveSplitCore is not defined.
Looks like something changed for the typescript bindings but didn't get changed for the JS bindings.
We should reduce unnecessary allocations as much as possible. I wasn't all too sure if Cow plays well with serde, so I didn't use it until now, but I just tested it and it works to seem fine, so yeah, we should use it.
Seems to be an issue in normal LiveSplit as well, except that we prevent you from entering negative times there.
Best Segment times should be fixed based on the comparison times before the Segment History times are adjusted to be at least as long as the Best Segment.
Seems like we don't properly handle this in most of the language bindings.
Languages to check / fix:
Output:
Input (apparently we have no function that takes a nullable string as input atm):
Detected through cargo-fuzz:
I'm not sure if it even should be a component
Requires Speedrun.com API Support
This is far enough into development that we can move it over.
It is way too large and causes huge diffs, which increases the size of this repository. Maybe use GitHub Releases to provide the current version of the JavaScript library.
They should finally merge in livesplit-core.
We have all the information necessary for calculating the extended category name, so we should show it.
We most likely want something less passive, but also not too intrusive. ESA wants this, so this should be implemented fairly soon. For it to be done so soon, it probably won't stay the final solution, as I want to be able to switch around all kinds of timer sources for synchronization and unit testing purposes, which the initial design probably won't entail.
There's now Automatic, Left and Centered as the Text Alignment Options.
In the Detailed Timer an uninitialized Game Time is shown as a dash on the segment timer, which is not what the original LiveSplit is doing there. I presume that's because I don't reuse any of logic of the Timer Component for the Segment Timer in livesplit-core, only the State, while the original LiveSplit uses more of it.
It generally doesn't make much sense too store super large images, so we re-encode them as JPEGS < 256x256 (while keeping the aspect ratio in mind).
BTreeMap automatically solves this problem, so it should be preferred over a HashMap.
Splitting, resetting and other operations should affect the scroll offset like it does in the old LiveSplit.
I'm not quite sure how this would work yet, as you need the emscripten compiler, and that requires you to compile LLVM which takes over an hour, so that's not a feasible solution. However the rust repository has automatic cross compilations of the standard library via CI, so we can potentially replicate what they do.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.