Jump to content


Photo

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


  • Please log in to reply
99 replies to this topic

#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

#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
  • 1180 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

#39 Marchal_Mig12

Marchal_Mig12

    The Rhouan

  • GMC Member
  • 1180 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

#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

#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
  • 4922 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
  • 4922 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
  • 4922 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

#50 wurdup

wurdup

    GMC Member

  • GMC Member
  • 854 posts

Posted 31 August 2007 - 09:29 AM

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

#51 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 01 September 2007 - 08:31 AM

Heh, OK... I'll see about those soon. Tomorrow maybe... Right now I'm gonna go to sleep.
  • 0

#52 XboxKing

XboxKing

    GMC Member

  • New Member
  • 5 posts

Posted 10 September 2007 - 03:24 AM

I can't get it to extract anything.
  • 0

#53 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 13 September 2007 - 11:30 PM

Uh, OK. So what exactly are you doing with it? Are you getting error messages or what?
  • 0

#54 XboxKing

XboxKing

    GMC Member

  • New Member
  • 5 posts

Posted 14 September 2007 - 08:57 AM

No errors or anything thats why i didn't write much
any ways heres the code:

REAL_init("mainmenu.7z","TEST",working_directory+'\dll\',-1,true,"",0)
REAL_include("setup.list",working_directory+"\scripts")
REAL_execute()

And this part is in the step event
if global.Loaded=true{execute_file("setup.list")}

All i have in the setup.list file is:
show_message('Test Completed')

Edited by XboxKing, 14 September 2007 - 09:39 AM.

  • 0

#55 Potnop

Potnop

    GMC Member

  • GMC Member
  • 3102 posts

Posted 21 September 2007 - 12:20 AM

Uh, OK.

Well to have the file be fully loaded you have to do real_return().

So you do something like

global.setup_list = REAL_include(args go in here);

Then in a script that runs after REAL_execute you need to do this or something...

global.setup_list = REAL_return(global.setup_list);
  • 0

#56 SLarouche

SLarouche

    GMC Member

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

Posted 21 September 2007 - 05:58 PM

Heh, OK...  I'll see about those soon.  Tomorrow maybe... Right now I'm gonna go to sleep.

<{POST_SNAPBACK}>


Yep... download link to Example projects still doesn't work.

For some sad reason, I get:
Failed to initialize loading engine

error message or
Error defining an external function.

Probably something I didnt setup properly when merging or creating directories?

... ^_^

thanks

Smon
  • 0

#57 blue123

blue123

    GMC Member

  • New Member
  • 365 posts

Posted 29 September 2007 - 11:27 AM

Potnop, can you re-host the files? The links don't work.
  • 0

#58 SLarouche

SLarouche

    GMC Member

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

Posted 08 October 2007 - 11:05 AM

Potnop, can you re-host the files? The links don't work.

<{POST_SNAPBACK}>


So, the links are still not working... Anyone got a working example?

thanks,

Smon

Edited by SLarouche, 08 October 2007 - 01:19 PM.

  • 0

#59 dender

dender

    GMC Member

  • New Member
  • 308 posts

Posted 08 October 2007 - 12:10 PM

Okei I thought I'm gonna upload it somewhere.
It has REAL Demo, Core files and 5.1 update.

http://www.sponest.c...LLoading5.1.rar
  • 0

#60 SLarouche

SLarouche

    GMC Member

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

Posted 08 October 2007 - 01:20 PM

Okei I thought I'm gonna upload it somewhere.
It has REAL Demo, Core files and 5.1 update.

http://www.sponest.c...LLoading5.1.rar

<{POST_SNAPBACK}>


Cheers, works great. thanks.

Smon
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users