Jump to content


Photo

R.e.a.l. External Resource Extraction (ver 5.1b)


  • Please log in to reply
99 replies to this topic

#1 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 20 March 2007 - 10:06 AM

OK somehow the original R.E.A.L. topic has disapeared. So I made this and uploaded all the files. Just know I'm not the creator. kow is. He stopped working on this and went on to real programming or something... So I kinda took over and made a few modifications to suit my needs in my game.

I think this is pretty much the best external resource extraction system for GM. It has a progress bar to show how the resources are being extracted. Or you can have the game play itself be happening while loading resources. All other loading systems I've seen tend to freeze the game while they load the resources since you can't create multiple threads in GM. If you don't know what that means, never mind...

This extracts from 7zip files, so you can have password protection and keep your resources secure. To make your own archives you can just use the 7zip program.
www.7-zip.org

Here's kow's words from the manual. I think these were also his words from the original topic.

Gm currently has no way of Loading external files directly from inside an archive (like zip files or 7z). files must be extracted - then loaded - then deleted.
this system was designed to manage all that for you while keeping your resources safe! in fact it takes the whole loading concept to the next step by helping you create interactive loading screens like a pro console game, thus keeping your players glued to the screen while you manage your resources. it also includes a set of scripts to help you create archives in REALTIME on the fly without interrupting gameplay! so now you can save your games or highscores and not worry about anyone modifying them! works amazing for netplay too! imagine sharing multiplayer maps! just archive the resources and send away!

im sure many of you have played console games that have Loading screens when you go from one level to the next. Many times, these games will have neat animations or even interactions like super simple mini games. REAL allow you to create such interactive Loading rooms. It includes its own Loading bar (fully customizable and easy to replace with your own), support for tons of archive formats, is the most secure during its extraction and load, and best of all .. its REAL easy to use. =)

[ -Features- ]:

* allows you to import sprites/backgrounds/sounds and even use it as a regular file extractor.
* Support for loading SXMS audio. ( requires some uncommented lines in Load_Step script) supports SXMS 3 as well as 2
* Loading progress bar with 2 modes of messages. display file loading / display percent loaded. (easily replacable)
* can run from anywhere as well as extract TO anywhere or archive anything as long as DLL and EXE are together.
* secure archiving of files --uses top of the line file and password encryptions.
* supports the following formats:
o 7z
o ZIP
o GZIP
o TAR
o BZIP2
o RAR (only browsing and decompression)
o CAB (only browsing and decompression)
o ARJ (only browsing and decompression)
o Z (only browsing and decompression)
o CPIO (only browsing and decompression)
o RPM (only browsing and decompression)
o DEB (only browsing and decompression)
o LZH (only browsing and decompression)
o SPLIT (only browsing and decompression)
o CHM (only browsing and decompression)
* scripts return index values like the _add functions in the manual (note: for sound it can only obtain these AFTER the files are physicaly loaded.)
* Realtime, you can have animations, movies, simple gameplay happening while stuff loads!
* allows you to Store your external files into archives!
o supports
+ 7z
+ zip
+ gzip
+ bzip2
+ Z
+ tar
* Always welcoming suggestions for improvement.


He also said to give credit to these people if you use this in our games...

Credits
kow
porfirio
kickboxer89
battlegorge.

potnop(if you use my upgrade)

Trouble Shooting
Problem: This isn't working at all, I keep getting errors:
Solution You most likely downloaded my 5.1 update but didn't download version 4 as well. Download either Real Loading 4 Core or Real Loading 4. This includes all documentation and required files, while 5.1 is only the Game Maker file that contains internal code to use the system.

I might also upload my way of extracting with REAL, because I know this seems complicated and you guys want a good example. The one that comes with REAL Loading is also a bit complicated. My way of using REAL is more efficient I think and simpler to understand. I might upload that some time...

Real Loading 4 Core
Here's the original REAL loading core made by kow. It has all the required stuff like the dlls and executable files and a manual. You need this. If you want my little upgrade download the 5.1 file below also. This is a light download without the sample stuff included.

Posted Image

Mirror:
Real Loading Core 4


Real Loading 4
This also has all required files but it also includes a sample file and archive. If you never used REAL you might want this to have a better idea of how to work with REAL.
Posted Image

Real Loading 5.1b (Mostly a patch, you need the other files)
Here's the editable core file with scripts modified by me. It makes it so the engine only extracts needed files instead of the whole archive. Just use it as you normally would but replace all your REAL scripts with mine. I think you only need a couple but just to be safe replace em all since I'm not sure exactly each modified script. You need to download Real Loading 4 or Real Loading 4 Core for all the other required files including the manual. BTW, this is an upgrade over my original upgrade so if you had this before you need this one. It solves a pretty major problem with the old one. The old one didn't do what it said it would.

Also all the code that kow wrote, I reformatted so it's a lot more readable. For me it's so much better on the eyes because now I can understand what all the code does. I decided not to add all the semicolons where they need to be in case I mess something up. If there are problems someone tell me because I might have messed something up just by reformatting the code. I tested it in my game and it all still worked but you never know.

Also when creating archives with 7zip or any other program be sure the "create a solid archive" option is set to off if using 5.1b. Extracting a solid archive requires that the whole archive be extracted. I think it's fine if you have this option on for the original versions since those actually extract the whole archive.

ATTENTION!! This game maker file simply contains code that I modified. For the system to actually work you need to download either Real Loading 4 or Real Loading 4 Core and use the files that come with it. The needed files are "7za.exe" and "run.dll"


Oh and one more thing before you download this file, read the above attention statement if you haven't already!!!

Posted Image

Mirror:
Real Loading Core 5.1b -my little update

Edited by Potnop, 18 June 2008 - 03:10 AM.

  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#2 dender

dender

    GMC Member

  • New Member
  • 308 posts

Posted 20 March 2007 - 10:47 AM

I'm glad you have taken time to upload your update. I'm gonna test it right away.

Right now I have a little error with "LevelLoader.extractList" in "REAL_step" 29-th line.
Unknown variable.

_________________________________________

Anyway if someone wants to put image instead of "healthbar" to add more professionality, delete "draw_healthbar()" from "REAL_draw()" script and replace it with:
-e.g:

draw_sprite_part(sprite,-1,0,0,sprite_width/100*loadbar,sprite_height,x,y)

So this works in horisontal way. And notice that, that loading bar is just as long as your image size.

Edited by dender, 20 March 2007 - 12:13 PM.

  • 0

#3 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 20 March 2007 - 04:18 PM

Error in my thing? Damn, it worked on my comp. I only tested it in my game...
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#4 dender

dender

    GMC Member

  • New Member
  • 308 posts

Posted 20 March 2007 - 05:45 PM

When I removed "+string(LevelLoader.extractList)" in ret variable, then there were no problems. There is no such thing in original REAL core too. I don't know does it affects anything or not, but game still loads.

Edited by dender, 20 March 2007 - 05:45 PM.

  • 0

#5 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 20 March 2007 - 10:35 PM

Wow, I don't know how that bit of code got back in there. THat was from 5.0 and I took it out in 5.1. Yea it works if you remove that because it shouldn't even be there in the first place.

I'm gonna upload a fix for future downloaders. It's now 5.1a due to the tiny fix.

Edited by Potnop, 20 March 2007 - 10:39 PM.

  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#6 Porfirio

Porfirio

    GMC Member

  • GMC Member
  • 1209 posts

Posted 24 March 2007 - 05:19 PM

Wow, old REAL is still alive :GM058:
It taked me and KOW alllllooootttt of time to figured it out
Unfortanly kow have desapeard
Our times are fully incompatible

Thank you for keeping this up :unsure:
  • 0

#7 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 24 March 2007 - 07:48 PM

Yea, I'm using this thing for my game, and I love the loading bars.
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#8 gm man

gm man

    GMC Member

  • New Member
  • 98 posts
  • Version:Unknown

Posted 29 March 2007 - 02:58 AM

Thanks a lot for uploading this! I have spent the last few hours trying to find it...
  • 0

#9 kickassgames

kickassgames

    GMC Member

  • GMC Member
  • 230 posts

Posted 30 March 2007 - 05:47 AM

Awesome i can't believe that the topic for this disappeared :( but you revived it so thankyou :blink: and works fine for me!
  • 0
Come fight me fool:
Click HERE

#10 dgm

dgm

    GMC Member

  • GMC Member
  • 80 posts

Posted 19 April 2007 - 04:42 AM

This looks very useful, but I can't find the license information for the 7za executable. I need to know if I can use this without being obligated to release my source code.

If not, I need another tool that doesn't have such restrictions.
  • 0

#11 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 21 April 2007 - 04:49 AM

I think it's free... I never heard of being obligated to release source code or anything... I heard of paying a license fee or soemthing, but yeah...

Don't worry about it though. I'm sure if there were issues with it, Kow would've said so, or used a different tool to extract.
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#12 dgm

dgm

    GMC Member

  • GMC Member
  • 80 posts

Posted 23 April 2007 - 07:26 AM

I can't get the Store_Directory script to work. Here's the line:

Store_Directory("dungeon4.7z", "E:\GM7.0\REAL\TheDungeon\Test\", "", 0);

When I try this I get an archive file, but it's apparently empty (it shows as being 0KB and yes, there are files in the Test folder). And no matter how long I let it sit it never seems to finish; after I stop the program I can't delete the .7z file because it's considered to be in use.

When I try to create any other kind of archive besides .7z I get nothing at all, not even an empty archive.

I'm using the 5.1a scripts and I haven't modified any of them.

Edited by dgm, 23 April 2007 - 07:27 AM.

  • 0

#13 dgm

dgm

    GMC Member

  • GMC Member
  • 80 posts

Posted 23 April 2007 - 03:35 PM

I have to ammend what I said before. Store_Directory() will not only create .tar files, but it will create them properly. As in, the .tar file is the correct size and the contents can be extracted and used.

Everything else is still screwed up, though. .7z files are still created empty and nothing else gets created at all (I want to create .zip files).
  • 0

#14 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 23 April 2007 - 04:17 PM

I never tried using those functions before. So you say it creates tar files correctly?
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#15 dgm

dgm

    GMC Member

  • GMC Member
  • 80 posts

Posted 23 April 2007 - 10:51 PM

...And only .tar files. That's using Store_Directory(). I don't need the other two store functions, so I haven't tried them.
  • 0

#16 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 24 April 2007 - 12:16 AM

Weird...

From the way you are writing the function call it looks like it should work fine according to the manual. I'll look into it more when I have time...

Weird though that it writes tar files successfully and not anything else. For leaving the password blank try not having the quotation marks at all. Just leave that argument totally blank. See if that works. In the REAL manual it says to just leave it blank if there's no password.

Edited by Potnop, 24 April 2007 - 12:17 AM.

  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#17 dgm

dgm

    GMC Member

  • GMC Member
  • 80 posts

Posted 24 April 2007 - 12:52 AM

For leaving the password blank try not having the quotation marks at all.  Just leave that argument totally blank.  See if that works.  In the REAL manual it says to just leave it blank if there's no password.

<{POST_SNAPBACK}>


It made the .tar files just fine with empty quotes, and it still screwed up other formats even when I tried using a password. That can't be the problem.

EDIT: I should also mention that I'm using GM7.0, in case it matters.

Edited by dgm, 24 April 2007 - 12:58 AM.

  • 0

#18 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 24 April 2007 - 01:14 AM

IDK if GM causes problems. GMphysics seems to have problems with GM 7 though. Well that's weird that it still had problems...

I beleive zip files can't be passworded though. So if you're trying to create zip files try leaving the field blank?

What do you need this for though?
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#19 dgm

dgm

    GMC Member

  • GMC Member
  • 80 posts

Posted 24 April 2007 - 01:26 AM

What do you need this for though?

<{POST_SNAPBACK}>


The one limitation GM has that I can't work around is the lack of multi-platform support. I intend to port my game later, and when I do I want to be able to use the same data files. I want to use the .zip format because it's the most common, which means it should be the easiest to find tools for working with in other game engines.

I can work with .tar for now, while I'm still coding. But I'll need to switch over to .zip before I publish.

EDIT: I just tested using a blank field for the password. As I expected, the program crashed. That's not the reason Store_Directory() isn't working.

Edited by dgm, 24 April 2007 - 01:28 AM.

  • 0

#20 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 24 April 2007 - 04:20 PM

So instead, why don't you use winzip and zip up your games? Or are you making some kind of resource tool thing?
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#21 dgm

dgm

    GMC Member

  • GMC Member
  • 80 posts

Posted 24 April 2007 - 04:33 PM

I'm creating an editor which will allow end users to create and share additional content for the game, and I can't expect each of them to master Winzip and use it manually every time. That would drive off customers. I have to build archive manipulation into the game so the program can do it for them at the click of a button.
  • 0

#22 Rpeter

Rpeter

    GMC Member

  • New Member
  • 72 posts

Posted 24 April 2007 - 06:18 PM

I have a problem!
The first time when i used this source it worked fine!
But now it always freezes the whole computer and the game uses 160mb memory!!!!
What is this?
EDIT:
Now i know what is it!
I resized my backgrounds to 1x1 and then the problem came out!
But why?
EDIT:
This source uses tons of memory and cpu too.
My game uses 160MB(!!!!) memory and 50%cpu!!!!!!
I think this engine is not so good...

Edited by Rpeter, 24 April 2007 - 06:39 PM.

  • 0

#23 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 24 April 2007 - 10:37 PM

It must be the way you are doing something. The engine itself isn't what must be causing the problem. It's the 7za.exe program that is doing stuff. You must have programmed it to do soemthing wrong and take up a lot of resources. I never ran into any of these problems. My game uses 23 % CPU and 17 MB of RAM.

Then again if you have a large amount of stuff loading don't be too surprised. While the 7za.exe program is extracting it's using up a lot of resources. And if you read the manual for 7zip under the part for creating archive setting it talks about how various settings like Dictionary size and stuff increase the memory usage required by 7zip when extracting.

As for your archive making program for now I'd stick to tar. Zip files are too easy to open. You want the archive to be secure right? Tar is less common than zip so it's harder to gain access. Personally I stick to 7zip since it has password protection. I really have no idea why your thing doesn't work. Maybe send me the source and I'll see if maybe you're doing soemthing wrong. I ran into that problem many times. REAL isn't very good at telling what's wrong.

potnop@gmail.com is my email...

Edited by Potnop, 24 April 2007 - 10:40 PM.

  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#24 dgm

dgm

    GMC Member

  • GMC Member
  • 80 posts

Posted 25 April 2007 - 02:23 AM

My source is basically your 5.1a version, which I'm testing in a new, otherwise-blank program. Other than the 5.1a stuff the only non-trivial code being used is the line I've already shown you. The only thing I'm changing between attempts is the dot extension in the first arguement (to change formats). So if the .tar extension works then .zip or .7z should as well, since nothing else is being altered.

As for .zip being too common, I already said that commonality is the main reason I want to use that format. I'll accept that password protection may be good to have, so maybe .7z would be a better choice if you can get it working, but pointing out that .tar is less-known is only going to steer me away from that format.

Edited by dgm, 25 April 2007 - 02:24 AM.

  • 0

#25 death-droid

death-droid

    GMC Member

  • GMC Member
  • 2600 posts

Posted 25 April 2007 - 06:48 AM

can you please host Real Loading 4 using rocket soft
  • 0

Posted Image


#26 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 27 April 2007 - 04:41 AM

Try seeing if it works with the version 4 that I didn't update. I actually didn't even touch the archive creation scripts so IDK if it's because of my update or not, but try it.

And the version 4 that I uploaded on Rocketsoft works fine. THe other version I can't post on rocketsoft because for soem reason it no longer allows uploads that are over a certain filesize. I'm not sure what the max is, but it's a pretty low one, which sucks. I can only upload things around 500 kb on it. Do you need a mirror for the other file?
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#27 death-droid

death-droid

    GMC Member

  • GMC Member
  • 2600 posts

Posted 27 April 2007 - 12:14 PM

yes please becuase it downloads to slow from the current host of it
  • 0

Posted Image


#28 smaksak

smaksak

    It's a matter of taste

  • New Member
  • 208 posts

Posted 28 May 2007 - 09:00 PM

Sorry for bumping this one, but the download link for the sample file seems to be broken. Can you please host it elsewhere? I really need it.
Thanks.
  • 0
Who in their right mind would ever need more than 640K of RAM!?
Bill Gates, 1981

#29 xDanielx

xDanielx

    GMC Member

  • GMC Member
  • 1002 posts
  • Version:Unknown

Posted 28 May 2007 - 09:30 PM

Sorry for bumping this one, but the download link for the sample file seems to be broken. Can you please host it elsewhere? I really need it.
Thanks.

<{POST_SNAPBACK}>

Ditto.
  • 0

#30 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 29 May 2007 - 01:06 AM

OK, works for me. But yeah, I need a mirror for that. Rocket soft doesn't allow big files anymore for soem reason. So what's a good host now? There are becoming less and less good ones.
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#31 xDanielx

xDanielx

    GMC Member

  • GMC Member
  • 1002 posts
  • Version:Unknown

Posted 29 May 2007 - 02:01 AM

The Real Loading 4 file with the example redirects me to the home page of the uploader, though I haven't had any trouble with the other links. I've been using SendMeFile - it's not really a good host, but if you can't find anything else it's at least easy to upload files.

Thanks,
Daniel

Edited by _Daniel_, 29 May 2007 - 02:01 AM.

  • 0

#32 dender

dender

    GMC Member

  • New Member
  • 308 posts

Posted 09 June 2007 - 07:38 AM

[...]
OKei just forget about it :S

Edited by dender, 09 June 2007 - 07:41 AM.

  • 0

#33 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 10 June 2007 - 04:52 AM

Aww man, sorry for forgetting to reupload under a different mirror. i hope this one works for you guys.

Here's another link.

Real Loading 4 Mirror

I took the suggestion of using sendmefile. I'll register with an actual site sometime soon maybe.

Edited by Potnop, 10 June 2007 - 04:52 AM.

  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#34 Deri

Deri

    GMC Member

  • New Member
  • 70 posts

Posted 12 June 2007 - 06:40 PM

the REAL loading 4 works fine for me, but when I try to run REAL_LOADING5_1a at the game maker loading screen (not the custom one you made) I get the error "Error: Error in resource data." What's up with that?
  • 0

#35 dender

dender

    GMC Member

  • New Member
  • 308 posts

Posted 13 June 2007 - 07:41 PM

To previous, I think that REAL isn't meant for replacing GM loading bar, as It does all the things in-game.

Anyway I have come to a point where I want to load from different archives in one loading session. Right now I haven't accomplished it with REAL. Can REAL even do it or what I have to do, to accomplish it?

//--------------------

Right now I thought that as long as the new update create's a list of which resources need to be extracted, it should't be any problem compiling all the data in one archive and load it in one session.

But still, multiple archive loading in one loading session might come in handy. Especially when you have archives in many different locations.

dender.

Edited by dender, 13 June 2007 - 07:52 PM.

  • 0

#36 xDanielx

xDanielx

    GMC Member

  • GMC Member
  • 1002 posts
  • Version:Unknown

Posted 13 June 2007 - 11:35 PM

Aww man, sorry for forgetting to reupload under a different mirror.  i hope this one works for you guys.

Here's another link.

Real Loading 4 Mirror

I took the suggestion of using sendmefile.  I'll register with an actual site sometime soon maybe.

<{POST_SNAPBACK}>

Thanks, the mirror works fine now. :)
  • 0

#37 Marchal_Mig12

Marchal_Mig12

    The Rhouan

  • GMC Member
  • 1182 posts
  • Version:GM:Studio

Posted 15 June 2007 - 01:30 AM

Guys, you should know that this DLL isn't really loading stuff. But the only thing it do is that it extract 7z files with given password to a directory then load the file and delete them. That's it.

After that how could your game uses 160 mb of memory. Do you mean while the main game is running or while it is externally loading. Because after you loaded the files the dll is gonna be released so...

See ya,
Miguel
  • 0

#38 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 15 June 2007 - 05:40 PM

@Marchal_Mig12

The dll simply allows the 7zip thing to work in the background. The scripts are what load everything.

This extracts the files, then has your game load all the resources that you have extracted, then it deletes them from the harddrive because you no longer need them.

It's the scripts that do most of the work, not the dll that comes with it.


@dender

And the loading bar is to show progress of loading the files. Normally when your game is waiting for 7zip to complete it would freeze until everything is loaded. But with the loading bar you have a nice estimation of how long to wait for it to load. With R.E.A.L. you can also have a mini game running in the background.

And I really don't know if I can make it load multiple archives in one session. That's why I made a modification so it extracts only the needed files from one archive instead of the whole archive. I was originally going to have multiple archives too.


@Deri
The 5.1a is the custom one I made. Do you mean when the game is loading and it shows that game maker loading bar it has an error? Maybe your download got a bit corrupted. Try redownloading.

Or is it an error when loading the resources from a 7zip file? It could be that you have "create a solid archive" set to on when you use 7zip to create the archive. This makes it so the whole archive has to be extracted even though it takes up a bit less space. I guess I should also mention that on page one.
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#39 Marchal_Mig12

Marchal_Mig12

    The Rhouan

  • GMC Member
  • 1182 posts
  • Version:GM:Studio

Posted 17 June 2007 - 01:59 AM

Yeah, Yeah I knew that. In reality this DLL should be used for security.

See ya,
Miguel
  • 0

#40 Deri

Deri

    GMC Member

  • New Member
  • 70 posts

Posted 17 June 2007 - 02:28 AM

@Marchal_Mig12

@Deri
The 5.1a is the custom one I made.  Do you mean when the game is loading and it shows that game maker loading bar it has an error?  Maybe your download got a bit corrupted.  Try re downloading.

<{POST_SNAPBACK}>


Yes, the GM loading bar shows an error. Ill download now.

edit: I re downloaded, but I'm still getting the same error.
Posted Image
oh well, version 4 still works.

Edited by Deri, 17 June 2007 - 02:37 AM.

  • 0

#41 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 17 June 2007 - 06:17 PM

OK this error also happens when trying to run REAL_LOADING_CORE 4.

First of all you shouldn't even try to run it. There are no rooms. The core just contains the scripts and objects that are needed for this to run. What you do is merge your game with the Core game maker file under file->merge game.

If you want to try running this, then I guess you can merge it with the Real Loading 4 example and delete the old scripts.
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#42 Armageddon

Armageddon

    Earth, Wind & Fire

  • New Member
  • 64 posts

Posted 05 August 2007 - 03:06 AM

Damn, and I was just looking for an update!
  • 0
...

#43 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 06 August 2007 - 08:01 AM

What do you mean?
  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#44 dender

dender

    GMC Member

  • New Member
  • 308 posts

Posted 08 August 2007 - 12:56 PM

Hello again. I wonder where did all these help files gone?
I would really need thos right now.
Or then I'll ask it right away.
Was there a way to free memory from loaded stuff in middle of the game?
  • 0

#45 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 28 August 2007 - 04:52 PM

Hope there is a manual. I was looking for something exactly like this! THANKS!

Ok, so let me get this straight. You have a LevelLoader object that is persistent? And then you can call a script and it will read the sprite right from the 7z file?

So say i had my 7z set up like this:

Root
-\Images
-----\Something.png
\Sounds
-----\Something.mp3

How would i read these files. Im sorry but the README isnt very clear.

Edit:
When i run that init script, my game shuts down...

Edited by Revel, 28 August 2007 - 05:13 PM.

  • 0

#46 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 28 August 2007 - 05:19 PM

___________________________________________
ERROR in
action number 1
of Create Event
for object object837:

In script REAL_sprite:
Error in code at line 18:
LevelLoader.filetype[LevelLoader.arraycounter] = "sprite" // filetype to load -- what to do with file (sprite/background/sound/movie/include) (string)

at position 35: Unknown variable arraycounter
  • 0

#47 dender

dender

    GMC Member

  • New Member
  • 308 posts

Posted 28 August 2007 - 08:45 PM

So say i had my 7z set up like this:

Root
-\Images
-----\Something.png
\Sounds
-----\Something.mp3

How would i read these files. Im sorry but the README isnt very clear.

Edit:
When i run that init script, my game shuts down...

<{POST_SNAPBACK}>


You really cant load files in folders in 7z compressed file. Everything has to be in Root. As long as I know you can't.

ERROR in
action number 1
of Create Event
for object object837:

In script REAL_sprite:
Error in code at line 18:
LevelLoader.filetype[LevelLoader.arraycounter] = "sprite" // filetype to load -- what to do with file (sprite/background/sound/movie/include) (string)

at position 35: Unknown variable arraycounter


well you really should not to edit those REAL_sprite, /_background etc scripts unless you are very aware what you are editing.
  • 0

#48 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 29 August 2007 - 05:05 PM

i didnt edit anything :P
  • 0

#49 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 31 August 2007 - 02:40 AM

OK, so the only way for that to happen is if you did something wrong. This was really complicated for me to figure out as well and I'm not the creator.

Anyway, the manual is in the readme folder that comes with the older versions. My newer version only has additional code and doesn't come with all the required files.

I think you can load files when everythting is in folders but to keep things simple I just keep everything jumbled together. It helps to have prefixes in front of the filenames to tell the different resources apart just like you would in GM so no conflicts between names occur.


To free memory from stuff in the game you simply use GM's functions like sprite_delete for sprites or whatever...

OK here's a little help on how I use REAL. It works very nicely for me. I might upload an example later, but here it is described in words.



So first I create a room called something like roLoadRoom. I also have a room called roPostLoadRoom.

For loading I have scripts for every time you need to load a set of resources. Like for the menus I have scLoadMenu, scLoadMenu_, and scUnloadMenu.

scLoadMenu is the initial script for all the loading and runs in the room roLoadRoom. scLoadMenu_ is the script that runs afterwards and is executed in roPostLoadRoom. scUnloadMenu can be executed any time you need to unload the set of resoruces.

So here is how I start the process.

room_set_code(roLoadRoom,"scLoadMenu();");
room_set_code(roPostLoadRoom,"scLoadMenu_(); room_goto(global.nextRoom);");
room_goto_(roLoadRoom);

I have it set the room creation codes to run the scripts upon creation. Then I have it go to the load room.

Here's an example of what would go in scLoadMenu();

global.nextRoom = roMenu;

//loads menu resources
REAL_init("Resources.7z","password goes here",0,0,true,"Menu Resources",roPostLoadingRoom);

/////////////////////////
//sprites

//------wall sprites----------//
//square
if(not variable_global_exists("spWall")) global.spWall = REAL_sprite(0,"spWall.gif",-1,false,false,false,true,0,0);

//diagonal
if(not variable_global_exists("spWallDUT")) global.spWallDUT = REAL_sprite(0,"spWallDUT.gif",-1,true,true,false,true,0,0);

/////////////////////////
//backgrounds

//------tilesets----------//
if(not variable_global_exists("baT_Doom")) global.baT_Doom = REAL_background(0,"baT_Doom.bmp",true,false,true);

/////////////////////////
//sound effects

//------items-------//
global.soItmWeaponPickup = REAL_include("soItmWeaponPickup.wav",temp_directory);

//////////////////////////
//music
global.soMusHangar = REAL_include("soMusHangar.mid",temp_directory);

//////////////////////////
//level file
global.Demo = REAL_include("Demo.d2m",temp_directory);

REAL_execute();

In the beginning I call that REAL_init script. "Menu Resources" is the message that shows up on the loading bar during REAL's loading bar drawing. Then I call all the REAL load scripts. Notice how I check if the global variable exists already or not. That way it won't load it if it's already loaded or else you'd be getting memory leaks since things like sprites are still in memory even when you overwrite the variable that references them. This is why it's important to always remove resources from memory when U no longer need them.


This is the code that would go into scLoadMenu_(); It executes all the needed stuff afterwards like REAL_return. It's not needed for things like sprites and backgrounds since REAL loads those into the game straight away after the first script.
////////////////////////////////////
//sounds

//------items-------//
global.soItmWeaponPickup = REAL_return(global.soItmWeaponPickup);
global.soItmWeaponPickup = scSXMSsoundAdd(global.soItmWeaponPickup,sxms.FMOD_DEFAULT,fal
se);

//////////////////////////
//music
global.soMusHangar = REAL_return(global.soMusHangar);
global.soMusHangar = scSXMSsoundAdd(global.soMusHangar,sxms.FMOD_DEFAULT|sxms.FMOD
_CREATESTREAM|sxms.FMOD_LOOP_NORMAL,false);


//////////////////////////
//level file
global.Demo = REAL_return(global.Demo);

In this example for the sounds and music I used REAL_include because I use the SXMS sound system instead of loading the sounds into GM. I know REAL had some way to automatically load sounds into SXMS but I didn't bother with that because I was confused enough at the time just as you guys are confused now. And I also don't want to mess with something that works so I'm not using REAL's builtin SXMS loading thing...

Anyway after this script is done, the game will go to the level you specified as global.nextRoom in the first script because the room create event for the post loading room is set to do so.

Hopefully this will help push you guys in the right direction when using REAL.

BTW for those of you who are wondering, I think the way this works is the 7za executable extracts all files which is fairly fast. During this time the game is frozen. Then once it starts to load all the resources that are extracted that's when the game is unfrozen, and the LevelLoader object does its work loading all resources. I think it loads only 1 or a few per step which allows the game to still be playing, or having a loading bar display progress. Afterwards, the post loading actions such as REAL_return happen, which is also relatively fast and the game is frozen during this time until the script is complete.

Edited by Potnop, 31 August 2007 - 02:44 AM.

  • 0
Vegeta! What does the scouter say about his powerlevel?!? It's ovER 9000!!!!!
I ownt read da script, script reads me.


Link To The Super Crew Topic / Link To Colonial Commando Topic
Platform Pathfinding Example Download it here!
Editable Early Version Level Editor(Nice @$$ stuff, check it out) Download it here!

#50 wurdup

wurdup

    GMC Member

  • GMC Member
  • 863 posts

Posted 31 August 2007 - 09:29 AM

all the links for 'real loading 4' are broke
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users