SyntaxBomb - Indie Coders

Languages & Coding => AppGameKit ( AGK ) => Topic started by: Pfaber11 on July 21, 2021, 19:48:22

Title: Memblocks in AGK
Post by: Pfaber11 on July 21, 2021, 19:48:22
At the moment I know nothing about memblocks but am going to find out over the next week or two what they are and what you can do with them. I do not own any books on how to use AGK and am going to acquire my knowledge from the internet and the documentation in Studio. I have seen the term bounced around in talks but never Knew what they were on about so I'm gonna make it my business to find out . If anybody has any knowledge to share then that would be great . Bonjour , over and out. 
Title: Re: Memblocks in AGK
Post by: blinkok on July 22, 2021, 01:27:36
I think what you are after is fairly straight forward;
1) To encode files follow the tutorial i posted before (Use a .PNG file)
2) To decode and use files;
    2.1) Use the decode method described in the tutorial
    2.2) Replace CreateFileFromMemBlock() with CreateImageFromPNGMemblock() (https://www.appgamekit.com/documentation/Reference/Memblock/CreateImageFromPNGMemblock.htm)
For sound use CreateSoundFromOGGMemblock (https://www.appgamekit.com/documentation/Reference/Memblock/CreateSoundFromOGGMemblock.htm)

3D models may be a bit more tricky but first i think you should have a go a .PNG's and .OGG's
Title: Re: Memblocks in AGK
Post by: Pfaber11 on July 22, 2021, 08:54:53
Yes indeed thankyou for your time . I'm onto it .
Title: Re: Memblocks in AGK
Post by: Pfaber11 on July 25, 2021, 20:21:37
Been too busy so haven't put much time into it but kind of understand how they work . A bit like an array if I'm correct . Another thing I know little about . Never used either but that's about to change I hope . Been working hard on my latest game the last few days and in the last few hours it has all come together . Whenever I think I'm on top of it all it all goes to shit but I have reached a save point and all is good . And yes Adam I am brilliant just like my games . Bonjour .
Title: Re: Memblocks in AGK
Post by: Pfaber11 on July 27, 2021, 22:06:35
Was taking a look through the Studio user manual and stumbled across code folding . Seems very useful and have dramatically tidied up my program. Not sure if this is available on classic and can't be bothered to install it and find out. I was looking for memblock stuff and although didn't find exactly what I was looking for I did learn something new .
SimplePortal 2.3.6 © 2008-2014, SimplePortal