Ejemplo n.º 1
0
 def __init__(self, images, screen, clock, iFace, FX, iH, titleScreen, SFX, myWorldBall,
              loadTicker=None, loadHero=None, loadWorld=None, loadDirector=None):
     self.Display = display.Display(screen, images)
     self.FX = FX
     self.SFX = SFX
     if loadTicker is None:
         self.Ticker = ticker.Ticker()
     else: self.Ticker = loadTicker
     if loadDirector is None:
         self.Director = director.Director()
     else: self.Director = loadDirector
     self.myMenu = menu.menu(screen, iH, self.Display, iFace, FX, SFX)
     #self.levelDepth = levelDepth
     self.inputHandler = iH
     
     FX.displayLoadingMessage(titleScreen, 'Loading world...')
     # myWorldBall is the game world which always is loaded
     # loadWorld is the levels which have been generated ingame and saved
     self.myMap = None
     if loadWorld is None:
         self.myWorld = world.World('game', myWorldBall)
         self.myMap = self.myWorld.initialMap
         self.myWorld.currentMap = self.myMap
         (x, y) = self.myMap.heroStart
         self.myHero = hero.hero(loadHero,
                             (x*const.blocksize,
                             y*const.blocksize)                               
                             )
     else:
         self.myWorld = world.World('game', myWorldBall, loadWorld)
         self.myMap = self.myWorld.currentMap
         self.myHero = hero.hero(loadHero)
     
     FX.displayLoadingMessage(titleScreen, 'Loading game engine...')
     self.NPCs = []
     self.screen = screen
     self.gameBoard = pygame.Surface( [300,300] )
     
     #self.gameBoard = self.gameBoard.convert(32)
             
     #this is true while player is in a particular game
     self.gameOn = True
     self.DIM = const.DIM
                     
     self.myInterface = iFace
     self.addShops()
     self.addNPCs(self.myMap)
     
     self.myBattle = battle.battle(self.screen, iH, self.myMenu)
     self.clock = clock
     
     self.inputHandler = iH
     self.state = 'overworld'
     self.won = False
Ejemplo n.º 2
0
def showCredits():
    creditsMenu = menu.menu(screen, iH, D, iFace, FX, SFX)
    creditsMenu.displayStory(
        "Ransack - An RPG Roguelike. All game code, story (if you can call it"
        " that!) and artwork, with the exclusion of fonts, created by"
        " D. Allen. [email protected] Powered by Python - www.python.org"
        " Game engine built with Pygame - pygame.org and ported to Android"
        " using PGS4a - pygame.renpy.org/")
    creditsMenu.displayStory(
        "Fonts used in game: Steelfish, Sqeualer by Ray"" Larabie,"
        " Typodermic Fonts - http://www.dafont.com/ typodermic.d1705 Gothic"
        " and Chancery by URW Software. urwpp.de/")
    creditsMenu.displayStory(
        "I'm a big fan of all the classic roguelikes, and"" cult favorites"
        " like Castle of the Winds and Moraff's World, as well as"
        " Japanese-style RPGs, from Final Fantasy to Suikoden to Pokemon."
        " So, you could call this a melting pot of all my gaming influences.")
    creditsMenu.displayStory(
        "This is a work in progress. I thank you for"" playing and if you"
        " notice any bugs or errors, have any ideas for improvments or"
        " enhancenments please drop me a line!")
Ejemplo n.º 3
0
def showCredits():
    creditsMenu = menu.menu(screen, iH, D, iFace, FX, SFX)
    creditsMenu.displayStory(
        "Ransack - An RPG Roguelike. All game code, story (if you can call it"
        " that!) and artwork, with the exclusion of fonts, created by"
        " D. Allen. [email protected] Powered by Python - www.python.org"
        " Game engine built with Pygame - pygame.org and ported to Android"
        " using PGS4a - pygame.renpy.org/")
    creditsMenu.displayStory(
        "Fonts used in game: Steelfish, Sqeualer by Ray"
        " Larabie,"
        " Typodermic Fonts - http://www.dafont.com/ typodermic.d1705 Gothic"
        " and Chancery by URW Software. urwpp.de/")
    creditsMenu.displayStory(
        "I'm a big fan of all the classic roguelikes, and"
        " cult favorites"
        " like Castle of the Winds and Moraff's World, as well as"
        " Japanese-style RPGs, from Final Fantasy to Suikoden to Pokemon."
        " So, you could call this a melting pot of all my gaming influences.")
    creditsMenu.displayStory(
        "This is a work in progress. I thank you for"
        " playing and if you"
        " notice any bugs or errors, have any ideas for improvments or"
        " enhancenments please drop me a line!")
Ejemplo n.º 4
0
    def __init__(self,
                 images,
                 screen,
                 clock,
                 iFace,
                 FX,
                 iH,
                 titleScreen,
                 SFX,
                 myWorldBall,
                 loadTicker=None,
                 loadHero=None,
                 loadWorld=None,
                 loadDirector=None):
        self.Display = display.Display(screen, images)
        self.FX = FX
        self.SFX = SFX
        if loadTicker is None:
            self.Ticker = ticker.Ticker()
        else:
            self.Ticker = loadTicker
        if loadDirector is None:
            self.Director = director.Director()
        else:
            self.Director = loadDirector
        self.myMenu = menu.menu(screen, iH, self.Display, iFace, FX, SFX)
        #self.levelDepth = levelDepth
        self.inputHandler = iH

        FX.displayLoadingMessage(titleScreen, 'Loading world...')
        # myWorldBall is the game world which always is loaded
        # loadWorld is the levels which have been generated ingame and saved
        self.myMap = None
        if loadWorld is None:
            self.myWorld = world.World('game', myWorldBall)
            self.myMap = self.myWorld.initialMap
            self.myWorld.currentMap = self.myMap
            (x, y) = self.myMap.heroStart
            self.myHero = hero.hero(loadHero,
                                    (x * const.blocksize, y * const.blocksize))
        else:
            self.myWorld = world.World('game', myWorldBall, loadWorld)
            self.myMap = self.myWorld.currentMap
            self.myHero = hero.hero(loadHero)

        FX.displayLoadingMessage(titleScreen, 'Loading game engine...')
        self.NPCs = []
        self.screen = screen
        self.gameBoard = pygame.Surface([300, 300])

        #self.gameBoard = self.gameBoard.convert(32)

        #this is true while player is in a particular game
        self.gameOn = True
        self.DIM = const.DIM

        self.myInterface = iFace
        self.addShops()
        self.addNPCs(self.myMap)

        self.myBattle = battle.battle(self.screen, iH, self.myMenu)
        self.clock = clock

        self.inputHandler = iH
        self.state = 'overworld'
        self.won = False