#bun-memory

1 messages · Page 1 of 1 (latest)

sonic wigeon
#

Im not sure when I need to need this package

golden delta
vocal kindle
#

Nice, I wonder if you can make a cool cross platform one using the tinycc thing bun has which shoukd allow you to use low level apis without build step

golden delta
#

I would copy the examples line-by-line and it would fail.

vocal kindle
#

ah weird, ill look into it

#

must be a weird windows bug

golden delta
fluid rain
#

Hol on 👀

golden delta
vocal kindle
#

Oh I forgot, I use macos mainly these days so needed to find windows

#

I should be able to look into it a little today while waiting for builds tho

vocal kindle
#

works for me™

#

oh wait is the issue it doesn't work for bun build?

golden delta
golden delta
vocal kindle
golden delta
#

I updated methods to be more in line with Bun's FFI methods.

For example, readInt32LE is now just i32. readBigUint64LE is now just u64… etc.

If you do not provide a value, the method will read. If you provide a value, it will write:

// Read my ammo…
const ammo = cs2.i32(ammoAddress);

// Write my ammo…
const myAmmo = 99;
cs2.i32(ammoAddress, myAmmo);

String methods now use Bun's CString:

const playerName = cs2.cString(playerNameAddress);

console.log(`My name is: ${playerName}.`);

There are also new methods for array types:

// Read 32 i32s from myAddress…
const i32Array = cs2.i32Array(myAddress, 32);

// Write 32 i32s to myAddress…
const myArray = new Int32Array(32);
cs2.i32Array(myAddress, myArray);

// Read 32 Vector3s…
const vector3Array = cs2.vector3Array(myAddress, 32);
reef bay
#

awesome, thanks for making this

#

I think making cheats can a super fun project and this would make it really easy to get into

golden delta
reef bay
#

having something like this would have been really fun

golden delta
#

Oh wicked! Cheers, brother!

golden delta
turbid shell
#

for the ui

#

I don't do game cheating but I think of memory hacking as super cool

#

I have done some C++, qt and glfw stuff but never too much low level stuff

#

Also I saw the ticks value and thought like "that's gonna lose precision if the number gets too high" but I noticed you're resetting it every second at the end of the file

#

Also now deadass I want to make bun-imgui

turbid shell
#

Should work in msys not sure about visual studio build tools

#

oh also you will have to follow the steps on the msys site, use msys ucrt64 and install mingw gcc

#

Saying it might not work in vs build tools because msvc shit is a bit special at times

golden delta
# turbid shell Ok but bun imgui when

I actually have a bunch bun-overlay that uses OpenGL that I’ve been working on. You can draw in 2D or 3D space on the same overlay. No need for hacky worldToScreen functions. 🙂

turbid shell
golden delta
#

I’m actually going to look into that. I’m curious about its performance in comparison

turbid shell
#

Imgui itself is C++ but there are programmatically generated C bindings

#

It's a very good lightweight ui library

#

Also yea the generator is implemented in lua

golden delta
turbid shell
#

You just have to configure it's opengl renderer

turbid shell
#

Has a sample opengl backend and system interface too

#

It's just a UI framework and a markup language mostly based on xhtml

golden delta
turbid shell
#

I doubt it'd be a large change

#

Largest thing would be compiling bun to test since zig is slooow to compile

golden delta
golden delta
#

Added some massive performance gains for repeated loops. It now avoid a second FFI hop by using typed array scratches for common methods such as f32, f64, i16, etc.

bun update bun-memory

Just waiting for #22973 to be merged and I can put more work into strings and such!

Original message.

stone fog
#

Very nice package, btw!

golden delta
stone fog
#

Help me to keep more distance from windows

golden delta
#

Added pattern searching!

// Find a byte pattern in memory (supports wildcards: ** and ??)
const needle = 'deadbeef';
// const needle = 'de**beef';
// const needle = 'de????ef';
const address = cs2.pattern(needle, 0x10000000n, 0x1000);
if (address !== -1n) {
  console.log(`Found at 0x${address.toString(16)}`);
}