Coder Social home page Coder Social logo

Comments (3)

kg avatar kg commented on August 10, 2024

Yeah, it's probably worth evicting bitmaps from the cache after it reaches a certain size. If you want to take a swing at such an implementation I'll gladly merge it. I'm not sure that a game that fills the cache has any hope of ever performing well, though, so it may not be worth the effort.

Any ways to do this natively? Nope, canvas pretty much sucks. I experimented with doing it via SVG filters, since they can do this natively with hardware acceleration, but every modern browser's SVG implementation is so hopelessly kneecapped and full of bugs that you can't use it for this either. Only option is WebGL, and right now that's not a realistic enough option to use as the standard implementation for the shims. A dual canvas/webgl impl like forplay uses might be cool, though.

Edit: If you provide a test case that hits this bug, that'd also be adequate for me to be able to write a fix against. Right now since none of my code hits it it's unlikely I'd fix it myself.

from jsil.

kg avatar kg commented on August 10, 2024

I've updated the image multiply caching system in fd0a850 to reduce the number of cached bitmaps it uses (alpha is no longer handled using the multiply system, it just keys off r/g/b now). This should reduce memory usage somewhat. Still no cache eviction algorithm though.

from jsil.

kg avatar kg commented on August 10, 2024

Should be fixed by 2ea2402.

from jsil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.