...

Source file src/gitlab.com/tslocum/venture/doc.go

Documentation: gitlab.com/tslocum/venture

     1  /*
     2  Package venture provides a game engine powered by ebiten.
     3  
     4  Overview
     5  
     6  The building blocks of venture games are nodes. Everything displayed on the
     7  screen is a node. For instance, a node could be a single line of text on the
     8  screen, a bouncing ball, or a scene which contains a line of text and a
     9  bouncing ball.
    10  
    11  Nodes
    12  
    13  Nodes may be any type which implement the following:
    14  
    15      type Node interface {
    16          AddNode(Node)
    17          Nodes() []Node
    18          Update(screen *ebiten.Image) error
    19          Draw(screen *ebiten.Image)
    20      }
    21  
    22  Three types of nodes are provided by venture:
    23  
    24  - Logic, an invisible node
    25  
    26  - Sprite, a graphical node
    27  
    28  - Scene, an organizational node
    29  
    30  Event Loop
    31  
    32  Once a venture game has started, with each tick the game's UpdateFunc is
    33  called, followed by calling the Update method of the root node and any
    34  contained nodes.
    35  
    36  While a reference to the screen is provided to Update, any modifications must
    37  be made in Draw.
    38  */
    39  package venture
    40  

View as plain text