can someone explain to me how videogame works? not how they are made, just how they work.

can someone explain to me how videogame works? not how they are made, just how they work.
like i have the game installed on my ssd and that's where all the files of the game are. the code, the textures, the 3d models, whatever.
then i boot it up.
what happens next?
one thing i do not understand is ram speed and latency and how it impacts fps. cause in my mind, when a game loads from a slow ram it's gonna have pop-in and from a fast ram it wont, but that's not really what happens, the fps just gets lower, why? and what is mhz and latency? it seems they both represent speed.

  1. 3 weeks ago
    Anonymous

    Everything can be represented as 1s and 0s

    The color red, a certain frequency of sound, a certain shape, etc.

    Your monitor has an array of pixels, say 1920x1080, and your computer sends it info to light up a pixel with a certain rgb value.

    Obviously modern games are complicated but it's essentially this concept if you break it down far enough.

    >when a game loads from a slow ram it's gonna have pop-in and from a fast ram it wont, but that's not really what happens, the fps just gets lower, why?

    Probably because the game engine just waits instead of processing things asynchronously and just displaying missing placeholder textures/models.

    • 3 weeks ago
      Anonymous

      >Probably because the game engine just waits instead of processing things asynchronously and just displaying missing placeholder textures/models.
      isn't that bad optimization?

  2. 3 weeks ago
    Anonymous

    You're asking for a computing 101 course. I'm not sure LULZ is qualified to offer such a thing.
    I guess the crash course version for your question is, well, let's say we have an image on disk somewhere. Then what happens is:
    >game tells OS to load image from disk into RAM
    >OS reads some number of bytes from disk into RAM whenever the SSD can provide them
    >each transfer takes M nanoseconds to start, scaling with RAM latency
    >each transfer takes N nanoseconds per byte to finish, scaling with RAM performance
    Once the image is in RAM, it must be transferred to GPU VRAM so it can be used (on desktop GPUs anyway).
    This is basically the same but in reverse, and bottlenecked by PCIe bandwidth rather than SSD speed.

    • 3 weeks ago
      Anonymous

      for the sake of my question it's better pretending the game is just installed on the pc/ssd without bringing in disk and image stuff

      • 3 weeks ago
        Anonymous

        disk = ssd, image = texture.

        but what i mean is, what does each component of the computer do in order to run the game? i guess ram has stuff like the explosions effect when you shoot or stuff like that saved in its memory to quickly give to the videocard when they are needed, without loading it each time.
        then ssd has all the game data but only a part of it is accessed at once, so you get loading screens in between levels.. why?
        then the cpu? i dont know, does it send all the info for these different components to communicate?
        and i guess the gpu just actually renders the video, whatever that means.

        I think if you're confused about what the CPU, RAM and GPU are or do, you should look those up before asking any questions. Have you tried Wikipedia?

        • 3 weeks ago
          Anonymous

          >Have you tried Wikipedia?
          no i prefer learning from my older bros on 4chin

  3. 3 weeks ago
    Anonymous

    but what i mean is, what does each component of the computer do in order to run the game? i guess ram has stuff like the explosions effect when you shoot or stuff like that saved in its memory to quickly give to the videocard when they are needed, without loading it each time.
    then ssd has all the game data but only a part of it is accessed at once, so you get loading screens in between levels.. why?
    then the cpu? i dont know, does it send all the info for these different components to communicate?
    and i guess the gpu just actually renders the video, whatever that means.

    • 3 weeks ago
      Anonymous

      >but what i mean is, what does each component of the computer do in order to run the game?
      its job
      >i guess ram has stuff like the explosions effect when you shoot or stuff like that saved in its memory to quickly give to the videocard when they are needed,
      RAM will contain everything
      both data and the program itself
      >then ssd has all the game data but only a part of it is accessed at once, so you get loading screens in between levels.. why?
      because you dont have 200 Gb of RAM for the newest call of cashgrab release, thats why
      >then the cpu? i dont know, does it send all the info for these different components to communicate?
      https://www.youtube.com/@BenEater/videos

    • 3 weeks ago
      Anonymous

      >i guess ram has stuff like the explosions effect when you shoot or stuff like that saved in its memory to quickly give to the videocard when they are needed, without loading it each time
      Ram has everything including the code and variables needed. There's also cache memory which is way faster than ram, and accessing ram is way faster than accessing the hard drive. And all of those are slower than accessing the CPU registers which literally run at lightspeed. You want to avoid the slower components as much as possible in order to have better performance, so you try to keep the shit you're using in cache and registers, compilers help you achieve this.
      >then ssd has all the game data but only a part of it is accessed at once, so you get loading screens in between levels.. why?
      Cause hard drives are slow and they are fetching lots of data
      >then the cpu? i dont know, does it send all the info for these different components to communicate?
      Yes, the CPU controls access to other components by running OS kernel instructions.
      >and i guess the gpu just actually renders the video, whatever that means.
      GPUs are fast at processing data in parallel, so they handle graphics information as it is well suited for it. They also have their own ram called vram, the same applies only that in this case it's used for storing graphics information

  4. 3 weeks ago
    Anonymous

    you have to be 18 to post here

    but also im bored so here you go:
    >then i boot it up.
    >what happens next?
    code gets executed
    >one thing i do not understand is ram speed and latency and how it impacts fps
    your game engine has to do physical frames and video frames
    the faster it does it the more FPS you will have
    that speed depends on a bunch of factors including your RAM speed cause thats where your instructions and data is
    >cause in my mind, when a game loads from a slow ram it's gonna have pop-in and from a fast ram it wont,
    what
    >but that's not really what happens, the fps just gets lower, why?
    because engine has to finish executing everything
    both video and physical frame
    >and what is mhz and latency? it seems they both represent speed.
    you could literally just google what MHz is
    its a unit of frequency: something per second
    >latency
    i have no idea what latency you are talking about
    the only "latency" that represents speed is frametime, which isnt really a latency, its just another way to represent FPS
    its time it takes for your PC to draw a frame

    • 3 weeks ago
      Anonymous

      >you have to be 18 to post here
      No one over 18 is allowed to ask questions? What a fucking self important piece of shit

      • 3 weeks ago
        Anonymous

        >No one over 18
        yep
        only countless AI threads and anti-linux autists baiting troll threads are allowed

    • 3 weeks ago
      Anonymous

      By latency I think he means ram timings. The nanosecond delays that can be set or default.

      • 3 weeks ago
        Anonymous

        probably but i wouldnt immediately assume he knows of its existence
        its more likely that its monitor latency or some stupid shit like that

        • 3 weeks ago
          Anonymous

          no that's what i meant, like 3200hz cl16. the ram latency

          • 3 weeks ago
            Anonymous

            RAM timings exist for the purpose of things not getting fucky wucky when using RAM
            they ofc influence performance but their main purpose is for things happening at the same time as they should

  5. 3 weeks ago
    Anonymous

    Program reads the file from the HDD/SSD, loads them in memory (ram) and them "colors" the pixel on screen based on what image it wants to show.
    Generalization but, imagine a while cycle that is always running. Each cycle it checks what is on the screen (literally the in-game objects or scenes you are looking at), then displays it.

    Fps are the frame it shows every second, meaning how many cycles it manages to do.

    Latency means different things, but generally it is the time between you press a button and the action it is shown on the screen.

    Hertz(in this context) is the number of images your screen can show each second. So if your program does 90 cycles each second (90 FPS) the screen will still show 60 images at most resulting in you actually getting 60 FPS.

    Hertz in general is used to indicate how may time something happens every second. It is therefore also used to say how many "impulses" are sent to your CPU and GPU.
    Let me explain: your computer is not asynchronous, meaning it does not calculate continuously but only each x seconds. Like something rolling down a slope or some stairs, your computer is working by steps.
    Then when you hear 4 GHz cpu it means the CPU is doing 4 Billion steps every second (G = Giga = a billion)
    Ram and GPU have different frequencies (Hz).

  6. 3 weeks ago
    Anonymous

    it's like a car going 100km/h, it's gonna take an hour to drive 100km. and a 50km/h is gonna take 30 minutes. so that's the speed of the ram which is hz.
    then what is the latency for? is it like if the driver once arrived at destination just doesnt exit the car for x time for no reason?

    • 3 weeks ago
      Anon

      If you have a lot of textures/models and high frames per second you might be running a very new game on an out of date older computer system. Ram would be the speed you access memory and latency would be at tiny fraction of a delay, RAM speed is the clock speed of the memory which indicates how many processing cycles can be run per second, you might need to install a Ram module or buy Ram. It is measured in megahertz (MHz) Sounds like the game is too new, ssd is typically for flash memory, and functions as secondary storage. Most older games now work on emulators, they allow you to translate software into the same system and speak as an old Nintendo or Sega or Atari or whatever. Games are the same since the early days of Pong, Arcade Pac-Man or Atari Breakout, something like a button or mouse wheel or joystick joypad giving commands. Games were typically built up with C++,
      Java, Visual Basic, Swift Lua, Python, Lisp, Pascal, graphical operating systems Vulkan, Direct X some hobby games use Adobe Animate, Roblox Studio for indie hobby games, other game companies use their own programming to simulate the physics of a game, Unreal Engine (UE) or Unreal Script for shooters, there is also a Gamebryo engine for RPGs, CryEngine for German racer military games on Japanese Playstation or US Xbox, the older games from the 80s were 1's and zeros. Some games allow you to adjust settings say 60 to 50 mhz or lower the sound and graphic setiing so they can still run on a less powerful computer.

  7. 3 weeks ago
    Anonymous

    question, can i install an old game on ram instead of ssd and everything will be instant? i mean think about it, i have 16gb of ram, an old game is 4 gb. i create a partition of 4gb so 12gb will behave normally and that other 4gb will ltierally have the entire game. is it possible?

    • 3 weeks ago
      Anonymous

      I think it's technically possible.
      But ram do not keep information without power.

    • 3 weeks ago
      Anonymous

      yea
      trivial in linux, anal in windows
      but your RAM only contains data as long as its powered
      one you press power button your game is gone

      • 3 weeks ago
        Anonymous

        once*

        actually ill add that its not just trivial-every single linux distro has RAM file system turned on by default

    • 3 weeks ago
      Anonymous

      tho i dont know why you would do that
      old games run just fine off of HDD's and SSD's are fast anyway
      saving 0.1 second on loading times in mario64 makes no sense practically speaking

      • 3 weeks ago
        Anonymous

        im thinking more ps2 and ps3 era games, which are also limited to 4gb of ram due to 32 bit systems. that would solve that

Your email address will not be published. Required fields are marked *