Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Pages: [1] 2  All

Author Topic: Performance?  (Read 7860 times)

0 Members and 1 Guest are viewing this topic.

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Performance?
« on: August 10, 2006, 06:39:32 AM »

I would like to know how to optimize performance for animation and such. I'm working on some scenery animation, and while my scene isnt even close to be optimized graphically, the memory being used by the process skyrockets when I enter the scene with the waterfall animation, by a factor of about 5x.

I am trying to use optimized file sizes such as png and jpg for where it is best appropriate with a good balance of quality and compression. However I am beginning to wonder if internally this doesn't matter in the engine. What is the best way to try and optimize performance? I noticed that in debug mode the framerate is not affected by this rather large animation but, again, the memory shoots way up. I'm just wondering if there is a way to get around this aside from the obvious "have crappy animation." Thanks!
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Performance?
« Reply #1 on: August 10, 2006, 09:01:19 AM »

Hi,

it doesn't matter what format you are using.  In the scene all frames will be uncompressed in memory. But of course you can consider
using theora video entity if it's just a background animation.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Re: Performance?
« Reply #2 on: August 10, 2006, 06:35:58 PM »

No it's a waterfall the character has to walk behind so I would have to use sprites...shoot.

What is a good spec to design a game for then? I want it to be accessible but I wouldn't want the animation to be bad either...I'm not sure how we can tell how much video memory is being used in each scene.
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Performance?
« Reply #3 on: August 10, 2006, 07:12:33 PM »

it's easy. in true color it's sprite width * sprite height * 4 (RGBA).  (in bytes)

So if your animation has 10 frames 100*100 it would result into 400kb
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Re: Performance?
« Reply #4 on: August 10, 2006, 08:17:52 PM »

Oh ok, thanks very much for your help!

You would multiply by 2 for 16 bit color correct?
« Last Edit: August 10, 2006, 08:24:26 PM by DocBass »
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Performance?
« Reply #5 on: August 10, 2006, 11:19:49 PM »

by 3. it's 2 bytes for RGB and one for Alpha.

usually it depends in hicolor what model zou use. The most common is to have six bits for green, five for blue and five for red. But anyway multiplier by 3 remains.

Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Re: Performance?
« Reply #6 on: August 10, 2006, 11:38:58 PM »

Even for a 16 bit jpeg with no alpha?
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Performance?
« Reply #7 on: August 11, 2006, 12:01:17 AM »

hmm, the thing is, how it's stored internally. This would be for Mnemonic. But since you can make alpha fading with jpg's too, I guess it converts them to 24bit everytime.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Re: Performance?
« Reply #8 on: August 11, 2006, 06:31:31 AM »

Another question for anyone who can answer. Does WME convert image files to the next power of 2 size up? For example if I have a picture that is 300x400  would that then internally convert to a 512x512 image in memory?

Also Project Joe appears to use quite a bit of video memory according to a memory dump mneumonic posted. Yet one of our team members was able to play it on his 64 meg card with no problems. How does this work? I imagine if you had more than 64 megs of graphics in a scene that it would slow things down quite a bit.

I apologize for all the questions, I just do not want to go for more than is feasible. I have to give mneumonic his due on this engine. It's a joy to work with so far.

Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Performance?
« Reply #9 on: August 11, 2006, 07:19:11 AM »

it converts them (I forgot about that). And  Project Joe is completely sprite animated with AFAIK lots of animations and
very detailed number of them in high resolution on top of that.

See this thread:

http://forum.dead-code.org/index.php?topic=714.0

It has been discussed thousand times already.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Performance?
« Reply #10 on: August 11, 2006, 07:38:21 AM »

re: 16bit. If we are talking about 16bit *textures* (enabled in troubleshooting settings), each pixel takes up indeed 16 bits (2 bytes). But of course for the price of quality. Only one bit is used for alpha. It is definitely not intended for normal use.

Textures are indeed resized to the nearest higher power of 2, so be careful about very large images and try to optimize them with respect to that.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Re: Performance?
« Reply #11 on: August 11, 2006, 07:44:06 AM »

Thank you.
Logged

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Re: Performance?
« Reply #12 on: August 11, 2006, 07:46:52 AM »

re: 16bit. If we are talking about 16bit *textures* (enabled in troubleshooting settings), each pixel takes up indeed 16 bits (2 bytes). But of course for the price of quality. Only one bit is used for alpha. It is definitely not intended for normal use.

Textures are indeed resized to the nearest higher power of 2, so be careful about very large images and try to optimize them with respect to that.

Wow really? So it's an on or off type thing. That's a bummer. The game we are making is currently at 1280x1024. To me 1024x768 just seems a little small for what we are trying to do. Now I'm thinking high quality animation might have to be out the window.

Mneumonic how can Project Joe run ok on my friends 64 meg card if the scenes take up so much memory? Wouldn't that bog the system down?
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Performance?
« Reply #13 on: August 11, 2006, 07:56:10 AM »

as I believe this was one (extreme) scene. So most of the scenes have much lower reqirements.

Also the 16bit textures are different thing than 16bit resolution.

Mnemonic: do you internally use truecolor textures even for 16bit resolution?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Performance?
« Reply #14 on: August 11, 2006, 08:14:19 AM »

The game we are making is currently at 1280x1024. To me 1024x768 just seems a little small for what we are trying to do. Now I'm thinking high quality animation might have to be out the window.
Although I do realize one has to plan ahead when designing a game, I'd still be careful about that resolution. You might run into trouble with older CRT monitors not supporting it at all.

Mneumonic how can Project Joe run ok on my friends 64 meg card if the scenes take up so much memory? Wouldn't that bog the system down?
Well I guess it was a bit slower than it could have been if all the gfx was stored on video card. It was loading some textures from system RAM.


Mnemonic: do you internally use truecolor textures even for 16bit resolution?
Yes.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
Pages: [1] 2  All
 

Page created in 0.045 seconds with 19 queries.