Replies: 1 comment
-
Drive by comment:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As someone that works a lot with binary formats, I find Godot's
File.*
(orFileAccess.*
in GD 4?) functions incredibly lacking and janky (especially coming from Gamemaker, where thebuffer_*
functions are very nearly perfect to me, though are lacking in some text-oriented functions).Originally I had a large list of points about
FileAccess
's methods and how bizzare and disjointed they are compared tobuffer_*
's, but then I took a look atPackedByteArray
's methods and hey! It's fairly synonymous with GM'sbuffer_*
functions! Except it lacks the cursor capabilities ofbuffer
andFileAccess
. And bothFileAccess
andPackedByteArray
lack the cursor handling modes and alignment abilitiesbuffer
has to offer (IEbuffer_fixed/grow/wrap
).So I want to look into what can be done about this. Ideally, I'd just have GM's
buffer
ported over near-verbatim into GD, with the added feat that it's general purpose (IE can work withPackedByteArray
or file streams, of whichbuffer
can only do the GM equivalent of the former). However that's probably an undertaking and a half, so it'd probably just be easier to make the two (FA and PBA) on-par with each other and eventually that could be condensed into one genericBuffer
system.Or maybe just port
buffer
over verbatim but have it not be a generic takeover of FA and PBA's encoding/decoding abilities, and just have it be its own thing that can be dumped to a PBA. I think that one's the easiest of the 3, but I'd like to know from someone more familiar with GD's internals than I am.Beta Was this translation helpful? Give feedback.
All reactions