Code Monkey home page Code Monkey logo

Comments (5)

jisbruzzi avatar jisbruzzi commented on May 18, 2024

I actually am not sure wether this is a bug or not. With different numbers of wall entities, there seems to be some advantage in using Grid.

from haxepunk.

MattTuttle avatar MattTuttle commented on May 18, 2024

Are you adding Wall entities in your update step? That will slow down your code significantly over time.

I can read a bit of Spanish so if you want to paste the code that might help me see what it is you're trying to do.

from haxepunk.

jisbruzzi avatar jisbruzzi commented on May 18, 2024

I made a test .swf and its source here http://www.mediafire.com/?5k50cb5yt9bdwtv
You can change between grid and individual entities mode... I'm calling collide() 45 times per update per Ball entity.
I can't see any significant performance difference when changing modes.
I suppose I'm calling something from my game that doesn't work that well fro Grids.
I'm adding entities for the bullets, but they get destroyed once they leave the screen.

from haxepunk.

MattTuttle avatar MattTuttle commented on May 18, 2024

You seem to be adding Wall entities regardless of whether your class uses a grid or not. I expected to see something like this on line 53.

if (!useGrid)
    add(new Wall(b * 16, a * 16));

from haxepunk.

jisbruzzi avatar jisbruzzi commented on May 18, 2024

Oh you're right. I forgot the if there. Sorry.
I'll just check my game's code tomorrow and comment here if I find the actual probolem.

from haxepunk.

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.