Stop method

I'm sure I saw it somewhere, but I can’t remember where and, possibly, he was in C #.

I have a bunch of game objects that go in cycles on each updated. Is it possible to break up an update method if its length lasts?

For example, if a programmer adds a bunch of code that takes longer to execute during one update cycle, can I finish updating it (when updating) so that the frame rate in the game remains constant?

I would suggest that this might be thread related, but I'm not sure.

Thank,

Phil.

+3
source share
4 answers

, , . .

, , .

+3

.

pthreads ( ) ,

edit: - , , , . Threading , , .

, - , . - , . , "", , . .

+2

Threading - .

. , - , .

, , 20 . "", , , 20 , . .: -)

, / .

+2

: - ?

, :

  • , , , ,
  • /, , IO : + , ( , )
  • ( ) : ..
  • , , , , ( , ), .

Model-View-Controller, , /

, :

  • , - (MouseClicked )
  • "", ( ..), , , (, )
  • , , , (), , , .

, ( ). , , , , ..

- , : Ogre - , . SO.

0

Source: https://habr.com/ru/post/1760581/


All Articles