Collisions on a Timer & node webkit

0 favourites
  • 3 posts
From the Asset Store
Node Downloader 2
$9.60 USD
40% off
Node Downloader is a plugin for download file for Construct 3 and construct 2 game engine
  • Hi everyone.

         I'm working on my first "big" project with construct 2. And I have a couple optimization questions. The first one is what is better.

    Just using the when this object collides rule, or using a timer to say that every 0.02 seconds if object collides?

    I'm making a very, very collision heavy game. And so far my performance has been very good. Getting a sold 60 fps. But I want to know what is more efficient for slower machines?

    What are the draw backs to both? I know the collisions are not as accurate if you use a timer, but I don't need them to be. It just seems to me checking for collisions 20 times a second would be less processor heavy than checking every tick. Am I wrong? Missing something maybe

    Second question: When I export to Node Webkit, it runs at a solid 60fps as well.. But out of no where, and in random spots it just seems to freeze for a couple of seconds. It doesn't seem related to the action on the screen, because it happens during down times as well. This does not happen in the browser. Any ideas what could be causing this?

    Thanks a ton!

    Adam

  • Optimisation: don't waste your time. If your game already runs 60 FPS, it's pretty much just a waste of your time to try and optimise it. C2's collision engine is pretty good, and objects which are not overlapping their bounding boxes can be discarded from collision checks in virtually no time, so trying to reduce that further with a timer will probably just have no effect and unnecessarily complicate your events.

    Node-webkit uses the Google Chrome browser engine. So it ought to work identically to Chrome...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Optimisation: don't waste your time. If your game already runs 60 FPS, it's pretty much just a waste of your time to try and optimise it. C2's collision engine is pretty good, and objects which are not overlapping their bounding boxes can be discarded from collision checks in virtually no time, so trying to reduce that further with a timer will probably just have no effect and unnecessarily complicate your events.

    Node-webkit uses the Google Chrome browser engine. So it ought to work identically to Chrome...

    Cool, thanks for the article. But that is part of the problem, Im checking for tons of collisions constantly. And my computer is a bit powerful, so Im worried on the average computer it might be slow. At any given time I have 100-200 bullets and several "baddies" Like I said, it runs great. But Im wondering what would be smoother. Ill just do some experimenting haha. I was also wondering if there was a way to find the Minimum Specs needed to run? A lot of games give those details, and Im not sure how to go about figuring out how low you can go haha.,

    As for Node, thats strange, when I run in chrome its flawless.. But node does the freeze/stuttering thing from time to time. Not sure what the issue would be.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)