Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 support #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__
14 changes: 0 additions & 14 deletions DuckLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@
pygame.init()

#Load in images
<<<<<<< HEAD
dogImg = [pygame.image.load("DogIdle.gif"),
pygame.image.load("DogDuck.gif")]
duckImg = [[pygame.image.load("duckUD1.gif"),
pygame.image.load("duckUD2.gif"),
pygame.image.load("DuckUD3.gif")],
[pygame.image.load("DuckF1.gif"),
pygame.image.load("DuckF2.gif"),
pygame.image.load("DuckF3.gif")],
[pygame.image.load("DuckShot.gif")],
[pygame.image.load("DuckFall.gif"),
pygame.transform.flip(pygame.image.load("DuckFall.gif"), True, False)]]
=======
dogImg = [pygame.image.load("DogIdle.gif"),
pygame.image.load("DogDuck.gif")]
duckImg = [[pygame.image.load("DuckUD1.gif"),
Expand All @@ -33,7 +20,6 @@
[pygame.image.load("DuckShot.gif")],
[pygame.image.load("DuckFall.gif"),
pygame.transform.flip(pygame.image.load("DuckFall.gif"), True, False)]]
>>>>>>> 807f2a1445c56b1e479d2d67e67c99226717903b
negaDuckImg = [[pygame.image.load("DarkwingSp.gif")],
[pygame.image.load("DarkwingFlap.gif"),
pygame.image.load("DarkwingFlap2.gif")]]
Expand Down
11 changes: 2 additions & 9 deletions DuckRehunt.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
screen = pygame.display.set_mode((640,480))
screen_dim = screen.get_rect()

##class World():
##
## def __init__(self):
## self.TITLE = 1
## self.

def main():

pygame.display.set_caption("Duck Rehunt: Reckoning")
Expand All @@ -34,8 +28,7 @@ def main():


foreground = setPiece(pygame.image.load("Foreground.gif"), (0,301), 1 )
hud = setPiece(pygame.image.load("Hud.gif"), (22, 400), 3 )
setSprites = pygame.sprite.LayeredUpdates( foreground , hud)
setSprites = pygame.sprite.LayeredUpdates( foreground )

dSprites.add(Dog())

Expand All @@ -47,7 +40,7 @@ def main():
shotScore = 0
global score, ducks

scoreFont = pygame.font.Font("duckhunt.ttf",20)
scoreFont = pygame.font.Font("HelveticaWorld.ttf",20)
scoreboard = scoreFont.render("%d" % score, 1, (255,255,255))


Expand Down
27 changes: 19 additions & 8 deletions README → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Music Sequence by Matt Adams-Wenger. Found on VGMusic.com.

duckhunt.ttf from Fonts2u.com.


Changelog:

0.6 (23/09/2020)
- Python 3 compatibility
0.5 (05/14/2011)
-Basic game functionality
0.5.1 (05/15/2011)
Expand All @@ -24,15 +24,26 @@ This is a work in progress. The scoring is completely broken and the game does n

Requirements:

-Python 2.6
-Pygame 1.9.1 for Python 2.6.
* Python 3
* Pygame

Coming Soon:
```
pip3 install -r requirements.txt
```

Run

-Win Condition
-Hud
-Boss fight?
```
python3 DuckRehunt.py
```

![](python3.png)

Coming Soon:

* Win Condition
* Hud
* Boss fight?


Contact:
Expand Down
Binary file added python3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pygame