Best Practice for...

0 favourites
  • 14 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • ...RPG level design. I personally make the graphics in Photoshop first, then, import to C2. RPG's have many objects displayed on screen at one time, most of the time. Specially for places like towns or forests. My question is, how good will C2 cope with this? Do copies of an instances count as objects or not? How much do they impact performance? In some cases I know I can use pre-rendered, but others, like trees, NPCs, etc., I cannot.

    For example, a big city would have considerable size, this also means many sprites. Although the whole map won't be showed at once. Does C2 still process the non visible part of the map the same as the visible area? Or does C2 kind of ignore non-visible parts for better performance?

    This is very important to know for me, because I plan in having an over world map, and this map will use animated water tiles and the size of the map will not be small, but not incredibly big either, since I can make the sprites smaller once in the over world map to give illusion of larger environments.

    Thanks!

  • I know C2 does not try to render objects that aren't visible... however I suppose if you are applying events to them they will still be taking up performance.

  • I believe what sqiddster said is accurate. Consider using the Sprite Bank plugin if it's not. If you want to limit events to on-screen sprites, the "Is on screen" condition is your friend.

  • cow_trix and sqiddster : Thank you for yer answers.

    Could someone from Scirra ( Ashley or Tom ) confirm this and answer my other concerns? I'd appreciate it. :)

  • I recently tested my system and found that 1000 sprites@ 32 pix is pretty close to the point where you slow fps.

  • newt: Counting copies? Or different different sprites?

  • Well I ain't gonna add 1000 different objects just for a test. :P

    So yeah, 1000 instances of the same object.

    3 Frames each.

    Just remember instances don't add up as far as memory goes. What gets you is the cpu keeping track of all those objects.

    Those instances were static, if they were all moving, the frame rate would fall dramatically.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • newt: I See. 1000 copies is a lot, though. NPCs are moving most of the time, and are pretty much the only things that will be moving. A big RPG city typically doesn't reach the 50 NPCs really. I doubt it even reaches 30. Plus they aren't showed all at the same time either, since the screen scrolls. I think I will be fine on that end. On static objects, I do not think I will ever reach 200 showing at the same time, either. I guess it will be fine.

    Do you know for sure if C2 makes objects not visible in the current display area inactive? Or do I have to use what cow_trix suggested?

  • As far as C2 is concerned, if the object exists in the layout, and is not destroyed, it has a reference.

  • newt: Thanks a lot newt. Based on the information you gave me, I think it will be fine. Thanks again. :)

  • I believe it will be fine. Just be careful in terms of layout size! Don't want it getting too big.

  • Newt, on a totally unrelated note, damn I love your avatar.

  • sqiddster: What would qualify as too big?

  • I don't know exactly... but I suppose I'm saying that with a big layout comes more objects, so be careful.

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