These are chat archives for sam0s/sam0sRpg

15th
Feb 2016
Sam Tubb
@sam0s
Feb 15 2016 00:28
haha that looks outstanding! I'm working on a little bit of an interaciton system
How did you send that picture as a file?
Andrew
@djkool
Feb 15 2016 00:29
Pretty sure the only way is to click and drag the image file into the Gitter window
Sam Tubb
@sam0s
Feb 15 2016 00:30
Oh Lol
Sam Tubb
@sam0s
Feb 15 2016 00:49
Capture.PNG
hitboxx
Im trying to work on stuff that doesn't require U I atm
you watching walking dead tonight?
Andrew
@djkool
Feb 15 2016 00:56
I stopped watching Walking Dead during Season 2.
Kind of lost interest in the whole Zombie phase.
Sam Tubb
@sam0s
Feb 15 2016 00:57
I actually watched a random episode of it on TV because one of my friends had told me they were interested in it, but the particular episode I watche just happended to be s1e1, as part of a marathon of EVERY season!
and i watched the whole thing
and its just like there is no going back after that
Andrew
@djkool
Feb 15 2016 00:58
First Season was good
but the 2nd one got too slow and then everything was zombies
Sam Tubb
@sam0s
Feb 15 2016 00:59
btw I can use the Primitve Rectangles for hit detection right?
Like, thats what its for?
nvm
it literally has a function called contains
Andrew
@djkool
Feb 15 2016 00:59
primitive.Rectangles and pygame Rects can be used for hit detection
Sam Tubb
@sam0s
Feb 15 2016 01:01
I don't really want to use pygame Rects
Andrew
@djkool
Feb 15 2016 01:01
primitive Rectangles have the benefit of doing hit detection against all other Bounding Volumes (Circles, Rects, Points)
Sam Tubb
@sam0s
Feb 15 2016 01:01
Is it not more lighweight?
or does that really matter?
Andrew
@djkool
Feb 15 2016 01:03
Not sure if there is any performance difference, I create primitives so I didn’t have to rely on pygame.
The pyshipcommand server didn't need graphics, and so didn’t need pygame.
pygame doesn’t have the same level geometric math either.
Sam Tubb
@sam0s
Feb 15 2016 01:05
Oh ok! And one last question, is there a specific spot where I should be checking for mouse events, I'm doing it in the Update function of WorldState
Andrew
@djkool
Feb 15 2016 01:06
processInput
That is where the pygame event queue gets process, so that is where the input should be handled.
It’s not like it has to be handled there, but if everything is handled in the same place then we know where to look when something goes wrong.
It also makes sure we don’t have two places that handle the same input differently
Andrew
@djkool
Feb 15 2016 01:12
If you have input responding directly to pygame events, handle it in the for loop.
Otherwise just handle it after the loop.
Andrew
@djkool
Feb 15 2016 01:28
GameState.processInput(), update(), and render all get called right after each other, so there is no reason why everything couldn’t have been done in a single update function. The whole point was to split up the logic a bit to make it easier to read.
Sam Tubb
@sam0s
Feb 15 2016 01:38
Good point!
I added this to Primitives to make things a little easier, does it need to be places elsewhere?
This message was deleted
This message was deleted
class interactableEntity(Entity):
    def __init__(self, position=[0,0],size=32):
        self.pos = position
        self.size = size
        self.hitBox=Rectangle.fromPoints(
        Point(self.pos[0],self.pos[1]),Point(self.pos[0]+self.size,self.pos[1]+self.size))
    def updateHitBox(self):
        self.hitBox=Rectangle.fromPoints(
        Point(self.pos[0],self.pos[1]),Point(self.pos[0]+self.size,self.pos[1]+self.size))
        print 'sru'
    def setPosition(self, pos):
        self.pos = pos

    def getPosition(self):
        return self.pos

    def move(self, offset):
        self.pos += offset
Andrew
@djkool
Feb 15 2016 01:49
I’d say keep it out of primitives
Just because that is more for geometric primitives
Sam Tubb
@sam0s
Feb 15 2016 01:52
Kk
Andrew
@djkool
Feb 15 2016 01:55
also, class names should start with a capital.
Sam Tubb
@sam0s
Feb 15 2016 01:56
Oh lol I did opposite
Andrew
@djkool
Feb 15 2016 01:58
That way you don’t get confused with SomeClass() and someFunction()
Sam Tubb
@sam0s
Feb 15 2016 02:02
I'll make a note of that👍
Sam Tubb
@sam0s
Feb 15 2016 17:51
what kind of keyboard do use?
Andrew
@djkool
Feb 15 2016 18:35
Logitech G15
Sam Tubb
@sam0s
Feb 15 2016 19:10
whoa nice! I have a corsair k70 RGB. I used to have a Unicomp buckling springd, but I traded it to a friend!
G15 is a really sweet kb
d