Skip to content

Code Review Pull Request#1

Open
jkunimune wants to merge 343 commits intoemptyfrom
master
Open

Code Review Pull Request#1
jkunimune wants to merge 343 commits intoemptyfrom
master

Conversation

@jkunimune
Copy link
Collaborator

dungeonGraphics.DungeonModelView;
dungeonGenerationAlgorithms.generateWhole;
entities.Entity

entities.py Outdated


class Entity(object):
def __init__(self, grid, direction="U", health=30, maxhealth=30, speed=1, accuracy=2, flatDamage = 2, damageRange=2, damageMod=2, vision=3, armor=10, phasing = False, name = None, effect = dict()):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take out all the defaults on here (except for phasing). There's no reason to have them, since it will probably vary almost completely from monster to monster. Just have each of the monster types pass it the specific you want.

@YehEmily
Copy link

Could it be possible that the game runs really slowly because of the number of things you're printing to the pygame screen? I'm not sure if calculations in your code might also be affecting the speed, but that's also possible. However, printing things is often more time-intensive than calculating things... I think?

self.directionCoordinates = {"U":(0,-1),"D":(0,1),"L":(-1,0),"R":(1,0)} # a table of which directions means which coordinates
print self.directionCoordinates
def attackRoll(self): #1d20+accuracy, if it exceeds armor class it's a hit
return randint(1,20)+self.accuracy #roll a 20-sided dice and add accuracy to the roll - average is 10.5 + accuracy

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I like having an attack roll. Maybe display damage done so that even if the player 'misses', they can see that they were trying to do the right thing.

@MatthewBeaudouinLafon
Copy link

  • Only draw every time the user does something
  • Make sure you only do the sight calculations when you need to
  • You can test where things are slow by Control-C-ing and seeing where the code stops

@YehEmily
Copy link

Do you know what you're going to do with the health bar? If you're going to keep using pygame, maybe you could outline it with a white rectangle (so that the player knows how much health they have lost/still have left), or make the bar a green rectangle with a red rectangle over it that gets bigger as the player's health decreases.

jkunimune and others added 25 commits April 17, 2016 19:49
Conflicts:
	coreMechanics.pyc
	dungeonGenerationAlgorithms.pyc
	dungeonGraphics.pyc
	entities.pyc
	interfaceClasses.pyc
	terrainUtils.pyc
Conflicts:
	coreMechanics.pyc
	dialogue/conversation.txt
	dialogue/conversation.txt~
	dungeonGenerationAlgorithms.pyc
	dungeonGraphics.pyc
	entities.pyc
	interfaceClasses.pyc
	terrainUtils.pyc
jkunimune and others added 30 commits May 4, 2016 22:36
…ng. adjusted sizes of stuff. made it so zombies turn towards you when they attack you. edited some of the dialogue to make it easier to understand. Made the floors/walls more interesting, take a look.
Conflicts:
	coreMechanics.pyc
	dialogue/__init__.pyc
	dialogue/textutil.pyc
	dungeonGenerationAlgorithms.pyc
	dungeonGraphics.pyc
	entities.pyc
	eventList.pyc
	interfaceClasses.pyc
	saves/last_save.dun
	terrainUtils.pyc
Conflicts:
	saves/last_save.dun
	terrainUtils.pyc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants