Skip to content

roderick1014/Doggy-and-Stairs

Repository files navigation

Doggy_and_Stairs

A simplified rebuilding of NS-SHAFT game which is written by python with only tkinter (without pygame).

Dec. 2020


2

For single player:

python SinglePlayer.py

For dual-player in same local area network.

Modify the address in 【Server】Doggy & Stairs - Network Version.py:

class PlayWindow(Canvas):
   
   def __init__(self):
      super().__init__(width = Constants.Canvaswidth,height = Constants.Canvasheight,background="white")
      self.initGame()
      self.pack()
        
   def initGame(self):
      '''Network Apply'''
      self.SERVER = "140.118.115.124"   # ← Modify the address here.
      self.PORT = 5050
      self.ADDR = (self.SERVER,self.PORT)

Modify the address in 【Client】Doggy & Stairs - Network Version.py:

class PlayWindow(Canvas):

   def __init__(self):
      super().__init__(width = Constants.Canvaswidth,height = Constants.Canvasheight,background="white")
      self.initGame()
      self.pack()
        
   def initGame(self):
      '''Network Apply'''
      self.CLIENT = "127.0.0.1"          # ← Modify the address here.
      self.PORT = 5050
      self.ADDR = (self.CLIENT,self.PORT)

Then run the code:

python '.\【Server】Doggy & Stairs - Network Version.py'

for server and

python '.\【Client】Doggy & Stairs - Network Version.py'

note that the Server has to launch the code first.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages