How do i know how much memory my program is using?
How do i know how much memory my program is using?
Just came to my mind how all games have been specifying how much memory and power they need to be run, that is there any way to know how much memory my hollywood program reguires to run?
And if there is, then is there difference between platforms, that can it be that Amiga version takes 2 Mb while pc.exe takes 4 Mb of memory to run?
And if there is, then is there difference between platforms, that can it be that Amiga version takes 2 Mb while pc.exe takes 4 Mb of memory to run?
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: How do i know how much memory my program is using?
Well, I think on non-Amiga systems we won't have to worry about memory. On Amiga systems memory usage depends whether your script is running on a 16-bit or 24-bit screen. On 16-bit screens Hollywood will only need half of the memory for all graphics data. You can check memory consumption on Amiga using "avail" while your script is running.
Re: How do i know how much memory my program is using?
By that half the memory you mean that if i display a 1 Mb sized picture, it only take 500 Kb of memory to actually display it?
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: How do i know how much memory my program is using?
No, you have to think in terms of raw pixels. The file size doesn't matter at all as most formats are usually compressed. A 1024x768 image will need 1024*768*4 bytes in 32-bit mode and 1024*768*2 bytes in 15/16-bit mode.Bugala wrote:By that half the memory you mean that if i display a 1 Mb sized picture, it only take 500 Kb of memory to actually display it?
Re: How do i know how much memory my program is using?
So do i calculate right that the example 32-bit picture would take about 350 Kb of memory?
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: How do i know how much memory my program is using?
No, 1024*768*4 = 3145728 bytes which are exactly 3 MB.Bugala wrote:So do i calculate right that the example 32-bit picture would take about 350 Kb of memory?
Re: How do i know how much memory my program is using?
Ah,. taht explains. I read it as BITs and was wondering how come it is x 2 BIT and x 4 BIT only. with bytes it makes more sense.
Edit:
more questions regarding this.
I just did some calculations. It seems currnetly Kings Of Israel cards take 600 Kb each cards (if they are displayed on 32-bit screen), if i calculate tehre being 120 cards (there is bit less actually), then I suppose that is close to the whole amount the game will require from graphics poitn of view.
With this logic, it would require 120 Mb, which would be already bit difficult for many classic machines. However, if I could get it to 16-bit instead, then machines with 64 Mb of extra Ram would have a chance for it to work too, and that would already be quite satisfactory target, for i guess those who have monitor in their machines and are still using it more or less seriously, would also have that 64 mb of memory.
Hence the question, Is there how much difference if i save pictures in 16-bit or 32-bit? For isnt it so that 4-bit is 16 colors, 8-bits - 256 colors, hence making 16-bit - 65536 and 32-bit 4 billion colors. But in practice i guess you wont notice difference between 16 or 32 bit pictures, at least not normally. But is there some other difference between them?
And how does this work with Hollywood. That do i simply save those pictures as 16-bit pictures, or can i save them as 32-bit pictures and then Hollywood could with some command downgrade them to 16-bit? Or how?
Edit:
more questions regarding this.
I just did some calculations. It seems currnetly Kings Of Israel cards take 600 Kb each cards (if they are displayed on 32-bit screen), if i calculate tehre being 120 cards (there is bit less actually), then I suppose that is close to the whole amount the game will require from graphics poitn of view.
With this logic, it would require 120 Mb, which would be already bit difficult for many classic machines. However, if I could get it to 16-bit instead, then machines with 64 Mb of extra Ram would have a chance for it to work too, and that would already be quite satisfactory target, for i guess those who have monitor in their machines and are still using it more or less seriously, would also have that 64 mb of memory.
Hence the question, Is there how much difference if i save pictures in 16-bit or 32-bit? For isnt it so that 4-bit is 16 colors, 8-bits - 256 colors, hence making 16-bit - 65536 and 32-bit 4 billion colors. But in practice i guess you wont notice difference between 16 or 32 bit pictures, at least not normally. But is there some other difference between them?
And how does this work with Hollywood. That do i simply save those pictures as 16-bit pictures, or can i save them as 32-bit pictures and then Hollywood could with some command downgrade them to 16-bit? Or how?
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: How do i know how much memory my program is using?
The file format doesn't matter at all. Even if you save it in two colours (1 bit), Hollywood will convert the imagery to 16 or 32bit depending on the current screen mode. By the way, 32-bit is actually only 24-bit, i.e. 16.7 million colours and a padding byte which is often used for transparency information. You will see the difference between 16 and 32 bit with pictures that have fine colour graduations like colour gradients etc. In photographs, you can often see the difference between 16 and 32 bit images by looking at the sky which looks better in 32 bit.Bugala wrote:Hence the question, Is there how much difference if i save pictures in 16-bit or 32-bit? For isnt it so that 4-bit is 16 colors, 8-bits - 256 colors, hence making 16-bit - 65536 and 32-bit 4 billion colors. But in practice i guess you wont notice difference between 16 or 32 bit pictures, at least not normally. But is there some other difference between them?
Yes, just save it as 32 bit. On 16 bit screens, Hollywood will automatically turn the pictures into 16 bit ones.And how does this work with Hollywood. That do i simply save those pictures as 16-bit pictures, or can i save them as 32-bit pictures and then Hollywood could with some command downgrade them to 16-bit? Or how?
Re: How do i know how much memory my program is using?
In continuation to this question still.
I am making the game in HD resolution, but since Hollywood is capable of autoscaling them down, then how does it work from memory point of view.
That suppose game takes 128 Mb of memory to be run on HD resolution on 32-bit mode. Could classic user then choose to run it on 16-bit mode on 800x600 screen, and that way be able to play it with 32Mb of memory only?
Or does the scaling work so that the pictures a still taking 1920x1080x2 of memory despite only 800x600x2 is shown?
I am making the game in HD resolution, but since Hollywood is capable of autoscaling them down, then how does it work from memory point of view.
That suppose game takes 128 Mb of memory to be run on HD resolution on 32-bit mode. Could classic user then choose to run it on 16-bit mode on 800x600 screen, and that way be able to play it with 32Mb of memory only?
Or does the scaling work so that the pictures a still taking 1920x1080x2 of memory despite only 800x600x2 is shown?
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: How do i know how much memory my program is using?
Autoscaling down won't save you any memory because, as the very name says, it's autoscaling everything down, i.e. all imagery is first computed in the full resolution and then scaled down. So it won't need less memory, but a few megabytes moreBugala wrote:In continuation to this question still.
I am making the game in HD resolution, but since Hollywood is capable of autoscaling them down, then how does it work from memory point of view.
Yup, see above.That suppose game takes 128 Mb of memory to be run on HD resolution on 32-bit mode. Could classic user then choose to run it on 16-bit mode on 800x600 screen, and that way be able to play it with 32Mb of memory only?
Or does the scaling work so that the pictures a still taking 1920x1080x2 of memory despite only 800x600x2 is shown?