Skip to content

Latest commit

 

History

History
129 lines (95 loc) · 5.57 KB

File metadata and controls

129 lines (95 loc) · 5.57 KB

Evolution of Computer Graphics

Part 1 - 2D Graphics as pixel data

Computer displays are all broken into describe chunks called pixels

8x8 pixel graphic

  • Gameboy - 160 x 144 - Super Mario World
  • NES - 256 x 240
  • Playstation 1 - 256 x 224
  • DVD - 720 x 480
  • 1080p - 1920 x 1080
    def draw_sprite(data, width=8):
        """
            --####--
            -#----#-
            #-#--#-#
            #------#
            #-####-#
            #------#
            -#----#-
            --####--

            As linear pixel data
            --####---#----#-#-#--#-##------##-####-##------#-#----#---####--
        """
        for line_number in range(len(data)//width):
            print(data[line_number * width:(line_number + 1) * width])

    sprite_data = '--####---#----#-#-#--#-##------##-####-##------#-#----#---####--'
    draw_sprite(sprite_data)

The process of taking chunks from data from one memory location and copying it to another is called blit-ing bit block transfer.

Part 2 - 3D Graphics as pixels

Wireframe 3D - Drawing of lines

Examples

Filled Polygons

Polygon Filling Algorithm [polygon]

Examples

Draw triangles in the correct order

The processes of taking triangle geometry and drawing it as pixels is called rasterisation

Textured Mapping

Quake 1 engine was sold/licensed to game developers.

GitHub: rlsw – Raylib software OpenGL renderer in less than 5k LOC HN Comments OpenGL Compatible - plain C with no dependencies!

Part 3 - Modern 3D Graphics Chip-sets

3D Graphics Cards are a completely separate computer inside your computer that is dedicated to drawing triangles.

Modern game programmers do NOT write code to 'blit sprites' or 'rasterise triangles'. These are solved problems. Modern game programmers use graphics library's and hardware.

Mobile chipsets - 200 Million triangles per second - source imagination graphics benchmark guide

Part 4 - The future

Further Reading