GithubHelp home page GithubHelp logo

Comments (2)

ethanmoffat avatar ethanmoffat commented on June 23, 2024

Used the Visual Studio profiler, and it found most of the effort in running the game was in EOMapRenderer::_doMapDrawing and EOMapRenderer::_doMapRenderTargetDrawing (as expected). The plan to update this is as follows:

  1. Render fill tile/ground layer to one target, this will be cached for performance gains
  2. Render other map gfx, players, NPCs on separate render target (referred to as target2 here)
    1. Unfortunately, cannot do players/map objects separately/using blending because they would be clipped incorrectly in certain places
      • so will have to redraw each time an update is required for a player, npc, or door due to some kind of action.
    2. Additional performance gains will have to come from only drawing within certain range of main character
  3. Render main player to target2 with following blending rules:
    1. If target alpha > 0 (ie, visible pixels), player alpha = 50% (or whatever looks good)
    2. If player is hidden, don't bother with blending
  4. Render ground layer to back buffer
  5. Render map items to back buffer
  6. Render target2 to back buffer
  7. profit

The order for drawing any object (players, npcs, and map objects included) will start at 0, 0 and go through each layer row by row, with increasing columns drawn later, so the objects appear to be rendered in the proper order (this is currently being done).

from endlessclient.

ethanmoffat avatar ethanmoffat commented on June 23, 2024

New performance measure for large maps:

Pretty much idles at 20% on the largest maps. Note that CPU usage still scales with map size. This is to be expected. Overall, drastically improved from the original case. Note increased memory usage as well - this is a byproduct of switching between more maps as well as improving caching of GFX.

from endlessclient.

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.