Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Animation with a lot of frames.  (Read 4444 times)

0 Members and 1 Guest are viewing this topic.

adventure

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
    • View Profile
Animation with a lot of frames.
« on: October 23, 2008, 07:25:14 PM »

Hi, I have another question again.

I have menu and in it's background is animated sprite, it has 70 frames. (each frames size is 1024*768)
Everything looks and works fine, but menu loading is much longer than without moving background.
What should I do to optimize loading. (Change picture format, compress something or do something else?)  ::)

Thanks in advance.  :)
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Animation with a lot of frames.
« Reply #1 on: October 23, 2008, 07:35:43 PM »

70 1024x768 frames is a massive ammount of data to be decompressed from the package, decoded to raw data (for png, jpg etc) & loaded into memory. The only thing you can do is to convert those files to theora video and play that as a background.
Logged
fl*p

adventure

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
    • View Profile
Re: Animation with a lot of frames.
« Reply #2 on: October 23, 2008, 08:18:48 PM »

Thanks, I will try that, but is it possible to put clickable buttons in front of that video?
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: Animation with a lot of frames.
« Reply #3 on: October 24, 2008, 08:19:18 AM »

yes. Play the theora in a scene entity and you can put it anywhere in the scene - z-order wise.
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: Animation with a lot of frames.
« Reply #4 on: October 25, 2008, 12:23:10 AM »

Here is what I would do, as I do something similar to this for "instant" loading of very large sprites that need to change often. I create a game entity and assign said large sprite to it. This should keep it in your main RAM if my understanding is correct.

When this entity needs to be visible assign it to the visible on screen entity. It should appear pretty much instantly with no load time since RAM is far faster than loading from a hard drive. when you want to unload it, unassign that entity. It should still be assigned to your global game entity for when you want to load it again.

I could be wrong that it works this way, but it seems to work perfectly in my own game. The video thing would be another way of doing it, the tradeoff for that one is high CPU utilization.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Animation with a lot of frames.
« Reply #5 on: October 26, 2008, 05:37:30 PM »

In any case, loading 70 frames 1024x768 big is total overkill and you shouldn't do it. It would take HUGE amounts of memory and you can easily bring the computer to its knees this way. If you REALLY need to animate the ENTIRE screen, use video.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

adventure

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
    • View Profile
Re: Animation with a lot of frames.
« Reply #6 on: October 30, 2008, 11:43:53 AM »

I allready solved problem using Theora video. Wasn't that hard that I thought it will be.  :)
Logged
 

Page created in 0.038 seconds with 19 queries.