Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by nutbutter

So how do you guys keep your levels lightweight? It seems that if my levels start getting to a decent size (ex. 900x600) then the resources are just overwhelming. How do you keep down level bloat?

1 decade ago by fugufish

what do you mean by "overwhelming resources"?

too many sprites used in the game? too slow loading time? lower FPS? let us know

1 decade ago by nutbutter

Sorry for the delay. I meant the actual size of the level files, for example, level0x1.js in my game is huge because of the deminsions of my level is set at 900x600, and for every tile it generates a numeric placeholder. So I end up with a bunch of code like this:

[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],

Do you guys know of a way to keep game levels from generating so much information, yet have pretty decent sized maps?

1 decade ago by fugufish

only way i can think of is to make sublevels (i.e more smaller sized levels). it's easier to manage anyways

1 decade ago by dominic

The .js level files can get quite large, but they can be gzipped quite well. The three levels for Biolab Disaster for instance are about 130kb in total, but only 16kb when zipped.

Ask google how to configure your webserver to send .js files gzipped (most shared hosts do that by default). E.g. for Apache: google: htacces js gzip.

1 decade ago by Graphikos

NM!

Thanks!

1 decade ago by axphin

I know this is off topic a bit, but is there a roadmap? I think it would be nice to see where things are headed and what features might be coming soon.

1 decade ago by nutbutter

Thanks for the feedback. That's a significant savings on gzipping!

1 decade ago by sleenee

This looks like the problem of sparse matrices. It's not really my area of expertise but I know mathematical solutions exist in order to significantly reduce the size of matrices with a lot of zeros. Might be something you want to look into but I don't guarantee quick results.
Page 1 of 1
« first « previous next › last »