How do video games get on my screen?

When I play a video game (any old game, such as a racing game or a person in a package or something else), how will everything be displayed on the screen in terms of what is happening in the program? is there any big RenderEverything method that executes after the frame? it seems to me a little slow way to go for it though.

EDIT: as a follow-up question: How does a rendering computer define a frame for both rendering graphics and for actions in game actions, for example, when a character moves slowly around a room. Like some t watches that continue to grow, and each render and each movement develops as a function of t? If so, how is t determined with respect to the system in which it operates?

I suppose this question will be somewhat self-contained: when my cursor on the screen now blinks twice a second, how does he know what a second is? Also in java, how would I create a program that displays a line of text and then waits for the second and discards another line? (perahps it gets too spatial)

+3
source share
3 answers

They have a loop. Inside this cycle, it is called the graphics visualization method, and the other for processing logic (and getting input). Thus, this method will calculate everything based on input and a graphic method of printing on the screen based on already calculated data - for example, what should be printed and its position.

Is that what you asked?

: https://gamedev.stackexchange.com/:)

+1

( , - ), , ? - RenderEverything, ?

. 2D- , , . 3D- . - . , .

, , .

. . , , .. - ​​ . // , , .

+1

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

, , , .

0
source

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


All Articles