Example #1
0
import pygame

from buffalo import utils

from main_menu import MainMenu

def main():
    
    while not utils.end:
        utils.scene.logic()
        utils.scene.update()
        utils.scene.render()
        utils.delta = utils.clock.tick( utils.FRAMES_PER_SECOND )

if __name__ == "__main__":
    
    if not utils.init(
            caption="Mganga",
    ):
        print("buffalo.utils failed to initialize")
        pygame.quit()
        exit()
    
    utils.set_scene( MainMenu() )
    
    main()
    
    pygame.quit()
Example #2
0
import pygame

from buffalo import utils

def main():
    
    while not utils.end:
        utils.scene.logic()
        utils.scene.update()
        utils.scene.render()
        utils.delta = utils.clock.tick( utils.FRAMES_PER_SECOND )
        
if __name__ == "__main__":
    
    if not utils.init(
            caption="Pong Tutorial",
    ):
        print("buffalo.utils failed to initialize")
        pygame.quit()
        exit()
        
    from menu import Menu
    utils.set_scene( Menu() )
    
    main()
    
    pygame.quit()
Example #3
0
import pygame

from buffalo import utils
import menu

def main():
    
    while not utils.end:
        utils.scene.logic()
        utils.scene.update()
        utils.scene.render()
        utils.delta = utils.clock.tick( utils.FRAMES_PER_SECOND )

if __name__ == "__main__":
    
    if not utils.init(
            caption="Heistboys",
            fullscreen=True       
    ):
        print('buffalo.utils failed to initialize')
        pygame.quit()
        exit()
    
    utils.set_scene( menu.Menu() )
    
    main()
    
    pygame.quit()
Example #4
0
    # This class is only used when __name__ == "__main__"
    # It displays a default map
    def __init__(self):
        Scene.__init__(self)
        self.m = Map()

    def on_escape(self):
        sys.exit()

    def blit(self):
        self.m.blit(utils.screen)

    def update(self):
        pass

def main():
    while not utils.end:
        utils.scene.logic()
        utils.scene.update()
        utils.scene.render()
        utils.delta = utils.clock.tick( utils.FRAMES_PER_SECOND )    

if __name__ == "__main__":
    if not utils.init(caption="Simple Kingdom Simulator", fullscreen=True,):
        print("Buffalo failed to initialize")
        pygame.quit()
        sys.exit()
    utils.set_scene(_MainScene())
    main()
    pygame.quit()
Example #5
0
File: main.py Project: gragas/fph
import pygame
from buffalo import utils

import menu
import storage

def main():

    while not utils.end:
        utils.logic()
        utils.update()
        utils.render()
        utils.delta = utils.clock.tick( utils.FRAMES_PER_SECOND )

if __name__ == "__main__":
    
    if not utils.init( 
        logic_func=menu.logic,
        update_func=menu.update, 
        render_func=menu.render,
        ):
        print('buffalo.utils failed to initialize')
        pygame.quit()
        exit()

    menu.init()
    storage.init()
    main()

    pygame.quit()
Example #6
0
import pygame

from buffalo import utils

from menu import Menu

def main():
    
    while not utils.end:
        utils.scene.logic()
        utils.scene.update()
        utils.scene.render()
        utils.delta = utils.clock.tick( utils.FRAMES_PER_SECOND )

if __name__ == "__main__":
    
    if not utils.init(
            caption='Adept',
    ):
        print('buffalo.utils failed to initialize')
        pygame.quit()
        exit()
    
    utils.set_scene( Menu() )
    
    main()
    
    pygame.quit()
Example #7
0
import pygame

from buffalo import utils

from buffalo.examples.menu import Menu

def main():
    
    while not utils.end:
        utils.scene.logic()
        utils.scene.update()
        utils.scene.render()
        utils.delta = utils.clock.tick( utils.FRAMES_PER_SECOND )

if __name__ == "__main__":
    
    if not utils.init(
            caption="Buffalo Project",
    ):
        print("buffalo.utils failed to initialize")
        pygame.quit()
        exit()
    
    utils.set_scene( Menu() )
    
    main()
    
    pygame.quit()
Example #8
0
File: main.py Project: JuBoi/adept
import pygame

from buffalo import utils

from menu import Menu


def main():

    while not utils.end:
        utils.scene.logic()
        utils.scene.update()
        utils.scene.render()
        utils.delta = utils.clock.tick(utils.FRAMES_PER_SECOND)


if __name__ == "__main__":

    if not utils.init(caption="Adept"):
        print("buffalo.utils failed to initialize")
        pygame.quit()
        exit()

    utils.set_scene(Menu())

    main()

    pygame.quit()