random123 VS bevy

Compare random123 vs bevy and see what are their differences.

random123

Counter-based random number generators for C, C++ and CUDA. (by DEShawResearch)

bevy

A refreshingly simple data-driven game engine built in Rust (by bevyengine)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
random123 bevy
1 574
79 32,614
- 2.8%
0.0 9.9
3 months ago 7 days ago
C++ Rust
GNU General Public License v3.0 or later MIT OR Apache-2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

random123

Posts with mentions or reviews of random123. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-14.
  • Intel CEO: 'The entire industry is motivated to eliminate the CUDA market'
    13 projects | news.ycombinator.com | 14 Dec 2023
    for GPGPU, the better approach is CBRNG like random123.

    https://github.com/DEShawResearch/random123

    if you accept the principles of encryption, then the bits of the output of crypt(key, message) should be totally uncorrelated to the output of crypt(key, message+1). and this requires no state other than knowing the key and the position in the sequence.

    moreover, you can then define the key in relation to your actual data. the mental shift from what you're talking about is that in this model, a PRNG isn't something that belongs to the executing thread. every element can get its own PRNG and keystream. And if you use a contextually-meaningful value for the element key, then you already "know" the key from your existing data. And this significantly improves determinism of the simulation etc because PRNG output is tied to the simulation state, not which thread it happens to be scheduled on.

    (note that the property of cryptographic non-correlation is NOT guaranteed across keystreams - (key, counter) is NOT guaranteed to be uncorrelated to (key+1, counter), because that's not how encryption usually is used. with a decent crypto, it should still be very good, but, it's not guaranteed to be attack-resistant/etc. so notionally if you use a different key index for every element, element N isn't guaranteed to be uncorrelated to element N+1 at the same place in the keystream. If this is really important then maybe you want to pass your array indexes through a key-spreading function etc.)

    there are several benefits to doing it like this. first off obviously you get a keystream for each element of interest. but also there is no real state per-thread either - the key can be determined by looking at the element, but generating a new value doesn't change the key/keystream. so there is nothing to store and update, and you can have arbitrary numbers of generators used at any given time. Also, since this computation is purely mathematical/"pure function", it doesn't really consume any memory-bandwidth to speak of, and since computation time is usually not the limiting element in GPGPU simulations this effectively makes RNG usage "free". my experience is that this increases performance vs CuRand, even while using less VRAM, even just directly porting the "1 thread = 1 generator" idiom.

    Also, by storing "epoch numbers" (each iteration of the sim, etc), or calculating this based on predictions of PRNG consumption ("each iteration uses at most 16 random numbers"), you can fast-forward or rewind the PRNG to arbitrary times, and you can use this to lookahead or lookback on previous events from the keystream, meaning it serves as a massively potent form of compression as well. Why store data in memory and use up your precious VRAM, when you could simply recompute it on-demand from the original part of the original keystream used to generate it in the first place? (assuming proper "object ownership" ofc!) And this actually is pretty much free in performance terms, since it's a "pure function" based on the function parameters, and the GPGPU almost certainly has an excess of computation available.

    In the extreme case, you should be able to theoretically "walk" huge parts of the keystream and find specific events you need, even if there is no other reference to what happened at that particular time in the past. Like why not just walk through parts of the keystream until you find the event that matches your target criteria? Remember since this is basically pure math, it's generated on-demand by mathing it out, it's pretty much free, and computation is cheap compared to cache/memory or notarizing.

    (ie this is a weird form of "inverted-index searching", analogous to Elastic/Solr's transformers and how this allows a large number of individual transformers (which do their own searching/indexing for each query, which will be generally unindexable operations like fulltext etc) to listen to a single IO stream as blocks are broadcast from the disk in big sequential streaming batches. Instead of SSD batch reads you'd be aiming for computation batch reads from a long range within a keystream.)

    Anyway I don't know how much that maps to your particular use-case but that's the best advice I can give. Procedural generation using a rewindable, element-specific keystream is a very potent form of compression, and very cheap. But, even if all you are doing is just avoiding having to store a bunch of CuRand instances in VRAM... that's still an enormous win even if you directly port your existing application to simply use the globalThreadId like it was a CuRand stateful instance being loaded/saved back to VRAM. Like I said, my experience is that because you're changing mutation to computation, this runs faster and also uses less VRAM, it is both smaller and better and probably also statistically better randomness (especially if you choose the "hard" algorithms instead of the "optimized" versions like threefish instead of threefry etc).

    That is the reason why you shouldn't do the "just download random numbers", as a sibling comment mentions (probably a joke) - that consumes VRAM, or at least system memory (and pcie bandwidth). and you know what's usually way more available as a resource in most GPGPU applications than VRAM or PCIe bandwidth? pure ALU/FPU computation time.

    buddy, everyone has random numbers, they come with the fucking xbox. ;)

bevy

Posts with mentions or reviews of bevy. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-26.
  • Voronoi, Manhattan, random
    6 projects | dev.to | 26 Apr 2024
    Bevy. A very young engine where you need to write the game entirely in Rust—that was appealing. But fatal flaws overshadowed everything: no editor, the engine brutally enforces the ECS approach, and the game's architecture must literally bend to fit this paradigm. So, you won't migrate to another engine at all—you just throw away all the code and start from scratch.
  • Web Game Engines and Libraries
    5 projects | news.ycombinator.com | 23 Apr 2024
    Missing one of the best choices as long as "maturity" isn't on the top of your list: Bevy - https://bevyengine.org/

    Game engine written in Rust, leveraging ECS in almost every place and way, with a really capable WASM export option. Wrestling ECS for the first time might take you some time, but in my experience helps you keep game code as clean and decoupled as game code could be.

  • 3D and 2D: Testing out my cross-platform graphics engine
    17 projects | news.ycombinator.com | 2 Apr 2024
    I don't see WASM/WebGPU changing anything when it comes to gaming, as an industry, personally. 3d visualizations and interactive websites? Yeah definitely a nice improvement over WebGL 2, if years late.

    WebGPU is pretty far behind what AAA games are using even as of 6 years ago. There's extra overhead and security in the WebGPU spec that AAA games do not want. Browsers do not lend themselves to downloading 300gb of assets.

    Additionally, indie devs aren't using Steam for the technical capabilities. It's purely about marketshare. Video games are a highly saturated market. The users are all on Steam, getting their recommendations from Steam, and buying games in Steam sales. Hence all the indie developers publish to Steam. I don't see a web browser being appealing as a platform, because there's no way for developers to advertise to users.

    That's also only indie games. AAA games use their own launchers, because they don't _need_ the discoverability from being on Steam. So they don't, and avoid the fees. If anything users _want_ the Steam monopoly, because they like the platform, and hate the walled garden launchers from AAA companies.

    (I work on high end rendering features for the Bevy game engine https://bevyengine.org, and have extensive experience with WebGPU)

  • What Are Const Generics and How Are They Used in Rust?
    3 projects | dev.to | 25 Mar 2024
    I was working through an example in the repo for the Bevy game engine recently and came across this code
  • WebAssembly Playground
    9 projects | news.ycombinator.com | 4 Feb 2024
    That's possible. I did spend quite a bit of time tinkering with compiler flags, and followed the recommendations.

    Some notes I found just now seems to agree with my results, though: https://github.com/bevyengine/bevy/issues/3978#issuecomment-...

  • Immediate Mode GUI Programming
    15 projects | news.ycombinator.com | 15 Jan 2024
    I cannot recommend immediate mode GUI programming based on the limitations I've experienced working with egui.

    egui does not support putting two widgets in the center of the screen: https://github.com/emilk/egui/issues/3211

    It's really easy to get started with immediate mode, it's really easy to bust out some UI, but the second you start trying to involve dynamically resized context and responsive layouts -- abandon all hope. The fact it has to calculate everything in a single pass makes these things hard/impossible.

    ... that said, I'm still using it for https://ant.care/ (https://github.com/MeoMix/symbiants) because it's the best thing I've found. I'm crossing my fingers that Bevy's UI story (or Kayak https://github.com/StarArawn/kayak_ui) become significantly more fleshed out sooner rather than later. Bevy 0.13 should have lots more in this area though (https://github.com/bevyengine/bevy/discussions/9538)

  • A minimal working Rust / SDL2 / WASM browser game
    6 projects | news.ycombinator.com | 15 Jan 2024
  • ECS, Finally
    4 projects | news.ycombinator.com | 30 Dec 2023
    I've also been enjoying building My First Game™ in Bevy using ECS. The community around Bevy really shines, but Flecs (https://github.com/SanderMertens/flecs) is arguably a more mature, open-source ECS implementation. You don't get to write in Rust, though, which makes it less cool in my book :)

    I'm not very proud of the code I've written because I've found writing a game to be much more confusing than building websites + backends, but, as the author notes, it certainly feels more elegant than OOP or globals given the context.

    I'm building for WASM and Bevy's parallelism isn't supported in that context (yet? https://github.com/bevyengine/bevy/issues/4078), so the performance wins are just so-so. Sharing a thread with UI rendering suuucks.

    If anyone wants to browse some code or ask questions, feel free! https://github.com/MeoMix/symbiants

  • Intel CEO: 'The entire industry is motivated to eliminate the CUDA market'
    13 projects | news.ycombinator.com | 14 Dec 2023
    These days, some game engines have done pretty well at making compute shaders easy to use (such as Bevy [1] -- disclaimer, I contribute to that engine). But telling the scientific/financial/etc. community that they need to run their code inside a game engine to get a decent experience is a hard sell. It's not a great situation compared to how easy it is on NVIDIA's stack.

    [1]: https://github.com/bevyengine/bevy/blob/main/examples/shader...

  • Trying to write a game with mods loaded at runtime
    1 project | /r/bevy | 10 Dec 2023
    This is the API you need: https://github.com/bevyengine/bevy/pull/9774

What are some alternatives?

When comparing random123 and bevy you can also consider the following projects:

Cgml - GPU-targeted vendor-agnostic AI library for Windows, and Mistral model implementation.

Amethyst - Data-oriented and data-driven game engine written in Rust

Godot - Godot Engine – Multi-platform 2D and 3D game engine

Fyrox - 3D and 2D game engine written in Rust

piston - A modular game engine written in Rust

RG3D - 3D and 2D game engine written in Rust [Moved to: https://github.com/FyroxEngine/Fyrox]

specs - Specs - Parallel ECS

ggez - Rust library to create a Good Game Easily

raylib - A simple and easy-to-use library to enjoy videogames programming

macroquad - Cross-platform game engine in Rust.

gdnative - Rust bindings for Godot 3

rust-sdl2 - SDL2 bindings for Rust