Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Simple feature request for AGK Classic / Studio

Author
Message
JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 20th May 2021 12:28
I currently keep all assets in a single resource file, built using a dotnet app. Reading parts of the file into memblocks is a bit slow using ReadInteger() and ReadByte().

It would be handy if there was an overload for the CreateMemblockFromFile() function that allowed me to specify a starting offset and size.

The author of this post has marked a post as an answer.

Go to answer

Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 21st May 2021 08:10
I agree such a (built-in) Function would be useful.
With this said., here's said Function in AppGameKit Script.

JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 22nd May 2021 21:28
This post has been marked by the post author as the answer.
I prefer something like this. Is uses SetFilePos for quick file random access and uses ReadInteger() for most of the time to read in 4-bytes chunks.

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd May 2021 05:51
I'm guessing you are doing some massaging of data but if not there is a CreatememBlockFromFile() function

Login to post a reply

Server time is: 2024-11-23 11:37:40
Your offset time is: 2024-11-23 11:37:40