Am i able to change Drawing Canvas origin point?

0 favourites
  • 12 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • I'm about to try reduce the frame rate of my game project. I have rotating circles around the game world and flying bullets. On colliding circles bullet attach ("pin") at the edges: This makes the object for to heavy for cpu and e.g. and lows the fps, as i see this is the problem.

    I try to use Drawing Canvas instead of using pin's, by pasting all the objects to canvas, but the problem is i can't have the Drawing Canvas- plugin to have the center ("origin") to the middle of the object to make circle rotating around it's mid-point.

    Any advises?

  • I'm not 100% sure what you're trying to do, but you can set the origin point of the DrawingCanvas object to be the center. Look in the properties bar with the object selected.

    As for the performance impact of pinning bullets to rotating objects, it's quite negligible. I built a quick test (https://www.dropbox.com/t/9HfkgCmcjXaYLlPN) and could get to 4500 instances before the frame rate drops below 60. Obviously this will vary based on the PC's specs, but for most games this number should be way more than needed.

    It's also worth noting that in my test, the create and destroy actions have a bigger impact on performance than the actual pinning. This may be the case for you as well, in which case you should look into object pooling.

  • It would indeed be simpler to visualize what you are attempting to achieve if you could post your project.

    Once you pin an object, if you deactivate its Bullet behavior, there should be no/little impact on performances.

  • Hey! Thank you for your answer!

    I look up the Drawing Canvas plugin, and found the origin setup for it (different location than with Sprite plugin).

    Sometimes it is just better to ask help from the forums; this time i get known about the drop box's transfer!

    I got the template and edited it. I send it now back to you, as i hope it to be. You get my point of the idea well from the description in my message.

    I have some few more questions:

    - why sprites sometimes has the line in side of them (see in the picture "Sprites lines").

    - how do i complete with the same object the colliding tasks: for example, i would like to check if two bullet collides each other, and want to some actions made by the the bullet which was the colliding bullet, and them some other actions to happen to the collided bullet; but as they have the same object type, how the engine handle the "order" of the script.

    - how does the scaling game play- screen (windowed resolution) affect to the game's fps and overall game play: does this mean if i play with larger screen (phone-> tablet) the game gets laggy, and/or while the lag is on my pc, it will be/not to be more laggy on the mobile export, as because the mobile devices hardware performance should be slower than pc's.

  • dropbox.com/t/FDBk3nqTrpy6wP6F

    Link to the edited demo!

  • The original mentioned issue was lowering FPS.

    I've spawned 5000 objects according to the counter and saw no FPS drop on my computer.

    Are you sure your device meets the system requirements ?

    I saw no sprite with a line either, this leads me to believe your computer might be a little low on the WebGL side. Make sure your graphic card drivers are up to date. Make sure you are not using only a graphic chipset (on a laptop for example), this might be a bit of a weak hardware.

    To handle two instances of the same object colliding, you can use a family, put the object "bullet" as part of this family, and check if a bullet is colliding with a "bulletFamily" instance. This way, you will have on the one hand the "bullet" instance picked, on the other the "bulletFamily" instance and will be able to handle them separately.

    You can read about our best practices, performance and memory usage tips.

  • Hey! Thank you for your answer, and thank you for your time!

    I check the system requirements, and on first look i cant see anything be wrong with my pc model performances: e.g. i use Chrome and Win7 for now. There might be issue with a graphic card (it is from 5 years ago), but if someone else have this same "sprite-line" problem, it could be on something else, but if it is only me and my pc, it should be on my issues only. I cant export the on the mobile devices while i do not have the; on the other hand i would be able to open saved project on the mobile devices browser.

    I can't use the family behavior either for now; is just come up with the performance errors and other issues on using the program so i don't want to subscribe the license for now. There are just always something going wrong and can't figure out what is it

    (origin points, plugins and/or behaviors compatibility on each other, performance problems; or even sold assets are good but expensive, or cheap and unready) so i start the new project all again.

    I share again the pictures: i have not either idea should i do use 1080p or 720p on project's preset; or even 4k, and how does it matter if i have just 1 rotating circle sprite and it still is laggy.

    I don't know either about the cpu, and why on the letter box sized game it is faster and CPU is over 80%, and on full screen CPU is less than 40% and all performance slower and laggy.

    So the question is; does anyone meet up with these problems on their works, and where is the help page (Scirra's or the others) or the problem solving solution's.

  • You should check the the tutorial about screen sizes : construct.net/en/tutorials/supporting-multiple-screen-sizes-17

    It will possibly give you enlightenment regarding what ratio to use in your project.

    I've already linked the performance and other manual tips you should check out and implement in your game.

    Also, as I have tested and did not encounter the same issue you do, and apparently no other user viewing this topic did either, it is likely an issue with your own computer/hardware, and not with our software.

    No "help page" can help you further than the answer already provided in this topic for you to follow.

    As mentioned, the "line sprite" issue is an old issue regarding wrong/poor graphic card drivers. Are you sure your graphic card drivers are up to date ? Are you sure your card delivers WebGL/WebGL 2 ?

    The age of the card is not what matters, the features are.

    Are you sure your browser is making use of your graphic card and not using an integrated chipset instead ?

    You would have to "force" windows to use your graphic card instead of the chipset.

  • At least now i downloaded the AMD graphic driver, and there are a real difference: my version was 8.982.0.0 (https://www.amd.com/en/support; my driver's last updated on summer of 2012!) and now it is up to date. The browser works way more faster now as i can see on the first look. It has been using the outdated version because i received the graphic card from another user a few years ago.

    I reviewed the links and get onto them as i have more time soon. I found also some links and video tutorials on You Tube to fit everything and use the "Anchors". The Construct support and help site is not revealing solutions to all problems, but it does it's best i guess. Some things are self-evident especially to the professional users. E.g. i don't know about the shortenings or most shortcuts either, as there are many things to do.

    The "line problem" has not solved; it appears when i change the window size in to other. Also it might be caused by using the Crop Tool in the sprite editor (in the image). Still seems the driver updating solved and upgraded the fps- performance.

    Where do i upload the crash reports? Is this line problem a crash or bug, or anything like that? I also tried the new plugins, (rex tweens, moveTo- plugins) and the project crashed; it does say afterwards "if you make a report, include this text"...and so one, so i start looking up for the crash report submitter.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you run in to a bug or issue in Construct 3, please post it to the GitHub issue tracker here:

    github.com/Scirra/Construct-3-bugs

    You must follow the bug report guidelines or your issue will be closed without investigation.

    From this stickied post.

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