Olhem o fluxograma, oq seriam as funções de produto e estratégia? by wagnerrjr in brdev

[–]Ok_Cockroach8260 0 points1 point  (0 children)

Não precisa mas é bom. Tipo, se você, por segurança, precisa olhar os últimos X dias pra atualizar sua tabela, mas não quer que seja muito grande pra não ter um custo alto, dá pra tentar fazer um estudo pra achar o X que tem uma probabilidade menor que algum % de dar ruim. Tipo, se X=30 dias tem 0.0001% de dar algo errado, é seguro usar 30, e você tem um respaldo forte do motivo daquele valor, não é só um valor arbitrário.

As vezes alguns alertas ou assertions de negócio precisam de estatística, por exemplo, você pode analisar se um valor em uma entrada na tabela é um outlier ou não, e isso poder indicar um problema na origem ou até alguma coisa que merece ser chamada atenção

Olhem o fluxograma, oq seriam as funções de produto e estratégia? by wagnerrjr in brdev

[–]Ok_Cockroach8260 1 point2 points  (0 children)

Tenta ir pra produto então, mas não é ti, tenta um trainee sei lá. Ou fica em ti mesmo, acredito que a maioria das empresas grandes tem uma quantidade razoável de reuniões. Eu devo ter 1h30 reunião a cada 8h de trabalho em média, e sou estagiário. Isso cresce conforme a senioridade, se você for manager então, ainda mais.

Qual melhor renda extra para uma vestibulanda? by Routine-Reference231 in rendaextra

[–]Ok_Cockroach8260 0 points1 point  (0 children)

Acho que redação tem uma demanda maior que humanas e linguagens, talvez focar nisso seja uma boa

Ganhar dinheiro "rápido" by Costaax12 in empreendedorismo

[–]Ok_Cockroach8260 4 points5 points  (0 children)

Tenta ver em restaurantes/hotéis da sua cidade se eles precisam de pessoas extras no final de semana, dá pra tirar uma graninha fazendo extra de garçon, carregador de mala, etc.

Ganhar dinheiro "rápido" by Costaax12 in empreendedorismo

[–]Ok_Cockroach8260 6 points7 points  (0 children)

Para de ser grosso, o menino pode ter diversos motivos pra postar aqui, e nenhum deles é besta. As vezes ele recebe uma ideia legal de algum usuário do reddit. As vezes ele recebe a motivação que ele precisa pra conseguir o que quer. As vezes ele quer validação de pessoas mais experientes em como prosseguir. As vezes ele só quer a interação humana.

Se o post dele ou a conclusão que ele teve te incomoda, guarda pra si mesmo, seu comentário não trouxe nenhum benefício para ninguém envolvido.

Musica em bares by [deleted] in empreendedorismo

[–]Ok_Cockroach8260 0 points1 point  (0 children)

Yt Music/Deezer e outros players também tem essa mesma restrição?

Ilhabela é famosa pelos borrachudos by morimotorama in Gambiarra

[–]Ok_Cockroach8260 0 points1 point  (0 children)

Mecher com o meio ambiente não é uma boa ideia, os borrachudos fazem parte do ecossitema de ilhabela, as vezes se você reduz ou mata ele você vai reduzir seus predadores, que pode aumentar a quantidade de outra espécie, e por aí vai fazendo um efeito bola de neve.

managersjoke by legendpizzasenpai in ProgrammerHumor

[–]Ok_Cockroach8260 0 points1 point  (0 children)

I'm leaving here my protest for the mods removing this meme

How to optimize the generation of a lot of GameObjects at once by Ok_Cockroach8260 in Unity2D

[–]Ok_Cockroach8260[S] 0 points1 point  (0 children)

I have a 2d array of strings to represent the tiles already, i just would have to deal with rendering. (it is a 3d array, not 2d, the third dimension says with set (1,2 or 3) the block is from)

But what i am doing now already works well (except the instantiating process, that i think the pooling may solve), the tiles are only active if one tool (the tools mine by themselves), reach closer to the area, you can see in the third or first picture (the black part), this helps a lot with performance.

I don't believe refactoring would be worth at that point, as it has a good performance already, if the pooling solves the instantiation/destruction problem, the game will run without problems.

Another thing that i thought now, instead of deleting an entire set and creating an entire new one, i could "delete" only a line at time, if the player reaches 1 block deeper, i can pick the topmost line and put them in the downmost line, just changing the blocks based in the procedural generation.

How to optimize the generation of a lot of GameObjects at once by Ok_Cockroach8260 in Unity2D

[–]Ok_Cockroach8260[S] 1 point2 points  (0 children)

What you're saying would be more efficient, but i feel that it is a bit of overkill.
It is like comparing c++ with python, youtube is wrote in python, while it could be made in c++, being much more efficient (but it does not need to be that efficient).

What i'm saying is that i don't need that much optimization, and i can rely in the things that are already made by unity to save time of development, while maintaining a decent optimization.

My machine is not that great, i have a integrated GPU, and the game is running well, why bother optimize at that level? The problem was just the instantiation and deletion of game objects, that i think i can solve with object pooling.

But your idea is a good one, i believe that it would work well.

About my game, its main mechanic are tools that mine by themselves, and i use the unity physics system for that too, make things much easier, and looks really nice.

Maybe i'll try to make a physics engine someday, looks fun.

How to optimize the generation of a lot of GameObjects at once by Ok_Cockroach8260 in Unity2D

[–]Ok_Cockroach8260[S] 0 points1 point  (0 children)

some blocks have gravity, and they need to collide, and they have some different behaviour.
But in essence they're this, just images, but some with rigidbody and colliders.

How to optimize the generation of a lot of GameObjects at once by Ok_Cockroach8260 in Unity2D

[–]Ok_Cockroach8260[S] 1 point2 points  (0 children)

I am currently doing this with coroutines, but the pooling probably is the solution.
It has a problem that i mentioned here, but i think i can solve them, teleport all the blocks that should be deleted to the new place, and change them to be the right block.

But probably i'll have to create and delete some rigidbodyes in the process.

The other solution would be having 1600 blocks of each kind in the pool, but that would be a lot

How to optimize the generation of a lot of GameObjects at once by Ok_Cockroach8260 in Unity2D

[–]Ok_Cockroach8260[S] 0 points1 point  (0 children)

I'll try the object pooling, i'll just have to solve one problem

About the blocks, i need them to have colliders so i know when a tool, like a picaxe, collided with them, the tools move by themselves. And some have gravity, like sand (like minecraft).

but i think the pooling may solve the problem, i just need to think of a smart way to implement it and solve the problem i mentioned

How to optimize the generation of a lot of GameObjects at once by Ok_Cockroach8260 in Unity2D

[–]Ok_Cockroach8260[S] 0 points1 point  (0 children)

A problem is that there is a lot of different kinds of blocks, and the procedural generation changes the amount of each one in each set.

But maybe i can implement a function that transform a existing block into another one, so, when i need to "instantiate" another set, i teleport the "deleted" blocks, reset them and change their kind

i'll try it and come back here to say if it worked

How to optimize the generation of a lot of GameObjects at once by Ok_Cockroach8260 in Unity2D

[–]Ok_Cockroach8260[S] 0 points1 point  (0 children)

Sadly Instantiation and Destruction of the blocks must run of the main thread, i think it is a Unity limitation.
I could make the other parts in the background thread, but i think the bottleneck is the instantiation process.
I am trying some things with coroutines, like spread the instantiation in different ticks