# Zooconomy (Strategy-puzzle)

**URL:** <https://forum.defold.com/t/zooconomy-strategy-puzzle/65466>\
**Category:** Dev diaries\
**Created:** [June 5, 2020, 12:58pm UTC](https://forum.defold.com/t/zooconomy-strategy-puzzle/65466 "2020-06-05T12:58:32Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![russelkgd](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/russelkgd/32/15767_2.png) [@russelkgd](https://forum.defold.com/u/russelkgd)\
**Post date:** [June 26, 2020, 11:52am UTC](https://forum.defold.com/t/zooconomy-strategy-puzzle/65466/12 "2020-06-26T11:52:41Z")

</div>

Hello everyone and welcome to another friday progress post.

On the last week topic, i have finished first simple news system. At this stage it works good, but newsline speed probably needs tweaking. Newsline works okay with different languages correctly calculating end of the localized text.

![Untitled-1](https://forum-defold.b-cdn.net/uploads/default/original/3X/0/2/029655a6947e6d9c6a4876db5adb3e5117d5a87b.gif)  
_Note: gif is trimmed_

Event system in the end will affect a lot of things, so i will do it in a small iterations with focus on one event type at a time.

**And finally promised things about node management.**

I really can’t recall why i come to this solution in a first place. Problem was that at big number of animals nodes (more than 30 animals), some of them was disappearing with warning, that max number of nodes was exceeded. I tryied to optimize nodes, putting everything in different layers and so on. I managed to increase this fallout number up to 40 animals, but it was still not good. In the end i decided to just “draw” nodes that fits in current scroll view. I wrote a simple function (which was rewritten several times), that checks if nodes “ends” are in the view. If it is - draw it, otherwise do not draw. Here is the example:

![](https://media.giphy.com/media/iiiBcH6hrq5FpN5TJn/giphy.gif)

I am sure there are different ways to overcome my problem, which are probably much simpler and easier, but in my case, this system helped me later, when i encountered [Stencil buffer exceeded, clipping will not work as expected](https://forum.defold.com/t/stencil-buffer-exceeded-clipping-will-not-work-as-expected/65026) warning. I wanted to create round progress bars, so i used several stencil mask to achieve it, but when there is a big node with several progress bars they all fill stencil buffer. And as node is drawn as one entity, progress bars which are not visible still are drawn. So i started to draw “subtasks” with the system which i used for nodes: if this bar visible draw. Here is the how player see it:

![Task%20or](https://forum-defold.b-cdn.net/uploads/default/original/3X/d/c/dcc5164afdb2cc2963c034e95abd990839504c79.gif)

And how system draw subtasks with progress bars:

![Task%20view](https://forum-defold.b-cdn.net/uploads/default/original/3X/a/1/a112a246f326faa62efce8fdb4fdefb69310cad1.gif)

_Progress bars are not visible on this gif, sorry_

And that’s it for today. Thank you for your attention. See you next week.

---

_[View the full topic](https://forum.defold.com/t/zooconomy-strategy-puzzle/65466)._
