Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (degenerate_762, AndrewAMD, Ayumi), 1,321 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bitmaps killing memory #31169
07/26/04 09:56
07/26/04 09:56
Joined: May 2004
Posts: 32
F
Felipe_Luiz Offline OP
Newbie
Felipe_Luiz  Offline OP
Newbie
F

Joined: May 2004
Posts: 32
Hi.

My company are creating a game with GS. But, as the game "grows", more and more images (bitmaps) are inserted into the game. I realized that all the bitmaps declared with the instruction (e.g.) "bmap picture = <picture.tga>" are preloaded to the RAM of the computer. Due to this, the game uses 130MB of RAM without doing anything, not even loading a level. Is there anything I can do to declare the bitmaps but don't load all them in the computer's memory? I mean, how can I load the bitmaps only when I need them and free my memory when I don't need them anymore?

Thanks everybody

PS: Sorry about my poor english!!

Felipe.

Re: Bitmaps killing memory [Re: Felipe_Luiz] #31170
07/26/04 10:20
07/26/04 10:20
Joined: Oct 2003
Posts: 1,258
Virginia, USA
qwerty823 Offline
Senior Developer
qwerty823  Offline
Senior Developer

Joined: Oct 2003
Posts: 1,258
Virginia, USA
If in your code, you do not need them, you can "purge" them with bmap_purge(). This will cause the engine to reload them if they come into view again. You can also use bmap_preload, to make sure its loaded before its needed, or else you might take a small fps hit waiting for the engine to load it off disk.


Never argue with an idiot. They drag you down to their level then beat you with experience
Re: Bitmaps killing memory [Re: qwerty823] #31171
07/26/04 12:31
07/26/04 12:31
Joined: Jan 2002
Posts: 644
USA
tesanders Offline
Developer
tesanders  Offline
Developer

Joined: Jan 2002
Posts: 644
USA
I'm also a fan of bmap_load(), which you can read about in the beta docs. This will load an image from disk into a previously allocated chunk of memory.

Re: Bitmaps killing memory [Re: qwerty823] #31172
07/26/04 17:14
07/26/04 17:14
Joined: Jan 2003
Posts: 710
T
Templar Offline
Developer
Templar  Offline
Developer
T

Joined: Jan 2003
Posts: 710
Maybe I'm wrong, but doesn't "purge" remove bitmaps from texture memory only? In such case it would not free RAM but only video memory...

Re: Bitmaps killing memory [Re: Templar] #31173
07/30/04 07:27
07/30/04 07:27
Joined: Mar 2004
Posts: 70
M
Matan_Golan_A6 Offline
Junior Member
Matan_Golan_A6  Offline
Junior Member
M

Joined: Mar 2004
Posts: 70
look all the textures and skins are loaded to the video memory
so the bigger video memory you have, more textures to load...
when you use purge function its remove it from video memory.
there is a lot of ways to make this process lighter(less memory) and quicker
read the manual
search for : predefines variables & pointers and look to enviroment and video subs...
there are some predefines that can free you video memory and make the loading quicker

and that last way is to change the resulotion. bigger res = bigger file;


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1