Skip to main content
Inspiring
July 10, 2013
Answered

Central folder for images and sounds to reuse them or NOT???

  • July 10, 2013
  • 1 reply
  • 6763 views

Hi.

I am producing a large amount of graphics and sounds for an online elearning course.

Can I just confirm one thing please?

Should I put most of my graphics that are going to be shared with other swfs into its own dedicated swf.

As it is cached I suppose that would be the best idea.

BUT

Doesn't it also take longer for a game or screen to load if it has to import the particular mc inside the large resources.swf.

Also, how exactly does it get to that mc.

For example I want mountain mc (which resides inside resources.swf) in my flyingGame.swf.

Does flyingGame have to import resources.swf and then "look inside" for mountain mc EVERYTIME.

Is this good or bad.

I getconfused as to the best way to go about this. So,ebody mentioned RSLs - is that better or am I in fact doing that already as the libraries are cached and shared anyway?

This topic has been closed for replies.
Correct answer sinious

Nesting libraries inside others will do exactly as you've said, cause you to load unnecessary things. It also creates a dependancy that could be highly unnecessary. If one game is updated that uses a shared asset, all the other games will update for nothing. 

To take an example for speedy web design (other than sprite sheets), it's always been highly suggested to limit the number of HTTP requests. If you need to load 50 images, 30 audio files, etc, this isn't going to work terribly efficiently as external assets.

If you can manage to get the assets on sprite sheets, I feel these are the most flexible overall, especially with an atlas. Keep in mind external files are easy to edit, don't have the SWF bloat and are also cached.

The only thing SWF gives you is development speed and perhaps a speed advantage if you're loading dozens and dozens of external assets. If you went external and found you needed to load 50-100+ assets then wrapping it in a single SWF is far more advantageous.

Audio is an ideal target to bundle in SWF if you can because each file must be a separate download. That said, there's nothing SWF is doing to make the audio any smaller than you could make it at similar settings in any other audio encoder at the right settings. MP3 is MP3, etc.

Your answer could lie in between multiple per-game strategies. SWFs for some games, external assets where possible elsewhere and a combination of both as well. It really depends on your game.

1 reply

sinious
Legend
July 10, 2013

How complex are the graphics assets? Any reason not to load them off the server as regular graphics and audio rather than in a SWF? The most efficient way is going to be literally only loading what you need and nothing more. If there's tons of little graphics in games then you'll optimize it even more with sprite sheets.

Inspiring
July 10, 2013

Hi.

Well, I should say that they are not pictures as such but vocabulary.

Food: has orange, apple etc...

These mcs are used hundreds of times by different games so are imported as you comment at the end.

The other example is more for larger game apps such as a crossword I have. I import the graphics because I thought I would use them in other games and I certainly will but for now I'm thinking that there is a lag because of what I am doing.

The game has to import another swf and look for the assets it needs etc... So in that repect would it be better to put those graphics back into the game fla that requires them.

I just thought it would be a great idea especially for music because some tracks can get up to 500k. I am looping them but they are still big.

btw: when I put sounds inside a swf they get compressed even more so that should be good shouldn't it?

Inspiring
July 16, 2013

Hi guys.

Just a quick update.

I have decided to interrogate the hosting company. I am on a shared server and so I asked if loading times would be better on a dedicated server and they said, of course. OK but please have a look at my situation and tell me if I am getting my moneys worth. I am fine about paying ten times the fee if I get ten times the results. So hopefully tomorrow I will get some good answers.

AKAMI and amazon cloud etc... Well I go on the site and understand nothing but here in Spain there is a large company called Arsys which have monthly rents of around 200-250 euros. If I see the loads at where they should be then I'm there next week.

btw: reading about CLOUD vs DEDICATED server. Mixed reviews. If I have an elearning site with 1MB here 1MB there and 100 concurrent users I need it to work fast, so I suppose I should have a dedicated server anyway. I suppose if I give them my details they can advise me which plan to take out. Cloud instead of dedicated server - is that best?

Anyway, I'll keep you guys posted as know you can't sleep at night till you find out

Cheers


Didn't know what a CDN was, so wikipedia...

WOW - looks good. We don't know if the problem is the network or our code yet but as I haven't got a lot of time to waste and seeing as there  will be a lot of traffic next year I am going to switch hosting companies.

Now I am faced with the choice of CLOUD or CDNs which seem to be a hybrid of dedicated servers and other "things".

Andrei mentioned Amazon and Akami.

Just read about telcos advantages so that looks like a good choice too. Perhaps Telefonica Spain shouls have some good deals going and their sales support is great.

Telco CDN advantages[edit]

Because they own the networks over which video content is transmitted, telco CDNs have advantages over traditional CDNs.

They own the last mile and can deliver content closer to the end user because it can be cached deep in their networks.[18] This deep caching minimizes the distance that video data travels over the general Internet and delivers it more quickly and reliably.

Telco CDNs also have a built-in cost advantage since traditional CDNs must lease bandwidth from them and build the operator’s margin into their own cost structures.