#m[Scripting][error]-[Watchdog] 10000 ms hang detected in '§l ray casting'

1 messages · Page 1 of 1 (latest)

merry vessel
stone lichen
#

What do you want to do?

merry vessel
stone lichen
merry vessel
#

Yeah

#

idk what to do

stone lichen
#

What do you want to do? You wrote this code for something

merry vessel
#

but with particles

twin kindle
#

confused

stone lichen
#

For what? And most importantly, why?!

merry vessel
#

Hell yeah

merry vessel
dense crow
#

How can we help u

merry vessel
dense crow
#

Tha s 10 seconds ☠️

merry vessel
dense crow
#

What are u working on

merry vessel
#

10000 ms

stone lichen
merry vessel
merry vessel
stone lichen
#

You won't succeed with this code. You need to think about how to make it much more optimized. I do not recommend using loops with more than 1000 iterations, but here there are as many as 180 million!

dense crow
#

Is it made using AI ?

merry vessel
#

Bruh

dense crow
#

._. show me video of ur script

#

I didn't understand what u mean by shader editor

merry vessel
dense crow
#

Using particles

#

I mean screenshot

#

Or something

merry vessel
dense crow
#

Of how it works

merry vessel
#

Bruh

stone lichen
dense crow
#

Then explain what u mean by shader editor using particles

dense crow
#

Elaborate

merry vessel
# merry vessel

look i'm creating an invisible screen where the particles play the role of a pixels

dense crow
#

☠️

merry vessel
#

Bruh

dense crow
#

U are trying to make a screen using particles

dense crow
#

☠️

lone gulch
#

😭

dense crow
#

U know that can cause lot of lag

stone lichen
#

Bad idea

dense crow
#

And u need advanced math

#

And matrixes

stone lichen
merry vessel
dense crow
#

So u can transform the things u want to display in 3D space

#

That s bad idea

merry vessel
#

i have a knowledge about writing shaders lol

dense crow
#

Yeah but that will cause lag

stone lichen
#

This is not a shader. This is js and particles.

dense crow
#

Yeah

merry vessel
dense crow
#

So , if i understand what u are trying to do

#

U are trying to create screen using particles

#

So u can display things on it

merry vessel
merry vessel
stone lichen
#

Your code needs to be sped up 100,000 times to make this even close to possible.

dense crow
#

And u think Minecraft bedrock is the best place where u can apply it ?

dense crow
#
  • u know that js is one of the most slowest language in programming
merry vessel
#

i had an idea to do it in a chat but i liked the idea of particles

dense crow
#

Ok , let s say .... What u wanna display?

stone lichen
#

At least not TS

merry vessel
dense crow
#

._. typescript is just java script

stone lichen
dense crow
#

With types

stone lichen
#

TS is much slower

dense crow
#

Ik ._.

#

Because it get translated to js

#

And u will see that is full of if statements to check the types

merry vessel
#

i rewrote the code from c++ to java script and it worked

#

But not in minecraft.

#

😭

dense crow
#

So answer me , what are u trying to display?

#
  • ur pc or phone performance
merry vessel
merry vessel
dense crow
#

☠️

#

Ram ?

merry vessel
#

12gb

stone lichen
#

You need a quantum computer

dense crow
#

And what is the size of ur screen

stone lichen
dense crow
#

Then

merry vessel
dense crow
#

U have to replace the heart , particles

merry vessel
#

Lmao

dense crow
#

With just one point

#

Texture

#

It s better for u

#

To do that

#

What about the 3D object math ?

merry vessel
stone lichen
dense crow
#

U can do math u know

merry vessel
#

the lagas started at 89k

merry vessel
dense crow
#

Just put fps viewer

merry vessel
#

I know trigonometry and linear algebra

dense crow
#

Ok

merry vessel
dense crow
#

And then save ur fos before putting 100

#

And after putting 100

stone lichen
#

It depends on the particles themselves too

dense crow
#

And if it reduced by 10 frames or so

#

U can do math and calculate how many fps u will lose

merry vessel
#

I have powerful cheap

dense crow
#

And if u have negative fps ._.

#

U can make it

merry vessel
#

Bruh

#

i'm still i don't know what to do

stone lichen
#

The problem is not that his device cannot withstand particles. But he has 180,000,000 iterations IN ONE CYCLE!

merry vessel
#

WTF

dense crow
#

Did u calculate it ?

merry vessel
#

180,000,000?!

stone lichen
#

yes

#

50 000 * 120 * 30

merry vessel
#

Oh

#

Maximum only 10000

#

💀

stone lichen
dense crow
#

18milion ☠️

stone lichen
#

10,000 is the time the script runs. Minecraft turns off the world if the script takes too long to complete. You can make a loop for 10,000 iterations, but it must be optimized

dense crow
#

Time taken: 0.013 seconds

#

.&.

stone lichen
#

?

dense crow
#

18 million iteration in 0.013 seconds

#

An emty for loop

stone lichen
#

It also depends on what happens in these iterations

dense crow
#

After i make it console.log(3) it didn't finish yet

#

The app blocked

merry vessel
dense crow
#

Give up your dream and die

merry vessel
dense crow
#

U didn't calculate the cost of making ur world ticking

stone lichen
#

The code took 16,000 milliseconds to execute

#

And the limit is somewhere around 3000 or even lower

dense crow
#
  • with particles
stone lichen
#

With any method from the Script api we can multiply this number by 10

dense crow
#

Ur device will lag ashell

stone lichen
#

In short. Quantum computer is your solution

dense crow
#

And don't, forgot u have a world working in background and graphics that get displayed

#

And android system

#

And cooked gpu

stone lichen
#

Intel nervously smokes on the sidelines

merry vessel
#

Hmm

#

I have idea

dense crow
#

Just let s say u want to add 18 m item to an array and see how long that takes

merry vessel
#

2.5

#

9000 interactions

dense crow
#

Yeah just do another thing ._.

merry vessel
dense crow
#

Delays

merry vessel
#

So that they are performed at different times or

merry vessel
dense crow
#

Ru interval

merry vessel
#

What maximum can I put on?

dense crow
#

system.runTimeout((e)=>{},20t)

merry vessel
#

How many ticks

dense crow
#

Minimum 1

merry vessel
#

Really

dense crow
#

And 1 tick = 1000/20 ms

#

1 ticks = 50ms

dense crow
merry vessel
#

i use 9950 ms

#

Wait 50 ms

dense crow
#

☠️

#

Same

merry vessel
#

I can't?

dense crow
#

With more delay

merry vessel
dense crow
#

Bro just give up

#

Let s say it takes 10 seconds

merry vessel
#

0.1 fps wtf

dense crow
#

U will just delay it with the same effect

stone lichen
#

It seems to me that we should just find another method for this, not JS

dense crow
#

Let s say , Minecraft bedrock got open sourced

#

Then u can suggest that idea

merry vessel
dense crow
#

And work on it

dense crow
#

._. Minecraft work with c++

#

And c++ is the fastest programming language

#

So.... ;-; just give up

#
  • , even tho u won't get the result u want
#

Because u phone will lag , and u will see nothing on that screen

merry vessel
sand laurel
#

Read this entire post in hope of to see something cool. Left off on a cliff hanger

dense crow
#

._.

merry vessel
#

Bruh

dense crow
#

?

#

It did work ? @merry vessel

merry vessel
#

wrong

dense crow
#

._.

merry vessel
#

But it works.

dense crow
#

Wow

merry vessel
#

IT'S WORKS

#

it's moving

merry vessel
#

@dense crow

merry vessel
sand laurel
#

Looks too squashed lol

merry vessel
#

This animation

sand laurel
#

I see

merry vessel