« first day (1212 days earlier)      last day (4104 days later) » 

00:00
you mean def atPort():?
its more natural
yeah, then that would return true or false
in the Player class or out?
instead of setting the variable
00:01
i fail to see why that would be more natural..... can you show me what you mean?
like a sample method?
that depends
on what?
if anyone else would care to know if your 'player' reached a port.
Ummm.... maybe
Yeah
If he was at a port, the pirates (not implemented yet) would not be able to attack
well, in the future you would probably want to make it a state
like
 if not player.check_state('at port'):
    # attack
00:05
ah
hm
good idea
00:16
I am totally done with PHP for today
Tries to enable safe_mode
doesn't work.
Sup peoples
sup @Noctrine?
nm. just making all my stuff disposable.
gotta make GL delete stuff properly.
i am having so much trouble implementing turns.... I don't want to pause the whole loop, but.... how @Jovito?
Ugh need to get to a real machine
00:23
lol
@Noctrine SO TIME!
:P
if anyone wants to answer:
0
Q: How to implement turns while still executing the main loop?

TheProgramm3rI am creating a trading game in Python, and want to know how to implement turns without pausing the gameloop. I know that I will have to change the way movement is implemented, but how would I do that? Note: code can be reached here (May be old): http://pastebin.com/rZbCXk5i

haven't done this yet, but first thought is to use a queue
^ yep
turn is over? turnQueue.Enqueue(turnQueue.Dequeue());
aha! I finally figured out exactly what breaks intellisense in VS2012 and 2013.
if there's a syntax error in one file, and I change the name of something in another file, intellisense stops working.
or so it does for me, but it does it every time.
whoo, got render targets working! and it was actually pretty easy.
00:42
cool
@TheProgrammer why you're pausing the game in the first place?
wait, let me see your code
yeah
player.goodsNumber = int(input(">>>"))
yeah... that pauses the game.... meh
first of all, like I said, you should get rid of that console window
then, in that case you can just assume the player doesn't take anything until he says so.
that way everything keeps rolling
00:47
i will
wait... what?
say he reaches the port
player doesn't take anything until he says to?
kk
he reaches the port
unless you want him to decide how many goods he wants to take before taking off
yeah
i do
still, in that case you'd do something like this
if self.check_state('at port'):
    goods_taken = self.get_input()
    if goods_taken: self.goods += goods_taken
00:52
explain the check_state
never used it
then reset its state
that's just an example
can you show me the docs for the state thing?
link?
the main thing is that you should stop getting input from the command line
get it from pygame
yeah
i will
and the game won't pause anymore
say you have several options
1 - 2 goods
2 - 4 goods
3 - 6 goods
whatever
00:54
mhmm
then you could check
keys = pygame.key.get_pressed()
if keys["""KEY HERE"""]:
    add goods
ah
i capture the keys for arrow keys already
could add an if statement:
if keys["""KEYS HERE"""] and atPort == True:
that's okay, there's plenty of keys available
00:56
yep
OR better
if keys[key] and self.check_state('at port'):
or
if keys[key] and self.get_state() == 'at port':
whatever
yea
explain the check_state and get_state
never used those
that's just an abstraction
00:58
ah
yourself would code that
currently I do this
:D
btw
look at the comments on the question
Christain is being helpful, sort of
class Player(object):

    VALID_STATES = ['state1', 'state2', 'state3']

    # LOTS AND LOTS OF STUFF

    def check_state(self, state):
        if state in Player.VALID_STATES:
            return self.__state == state
so....
that means
that if a state is valid
it will return true or false?
and would I create another method for setting the state called set_state?
that's what the code says :P
yeah
checking for valid states as well
01:02
kk
okay, now I really got this renderbuffer thing working.
has not ignored your conversation so far
just felt odd butting into a conversation with my random thing
01:03
lol
@Jovito why the self.__state
what's the significance of the double __
pseudo private
oh
how will I keep track of which port I was at? I don't really want people to be able to "farm" the same port
I can't tell you everything, Pip. Think about it for a while and if you don't come up with an answer I'll help you.
thanks
should I just declare "atPortA" or "atPortB?"
hahaha
no
01:12
damn
:P
imagine if you had 5000 ports in your game
see the problem?
yeah
will I get stars for:
flixel is fucking gay!
:P
gotta go
see you tomorrow
01:37
hello mis amigos
 
3 hours later…
04:20
afternoon
happy friday from the future
2 AM here
you like electronic music? @MattD
i am currently listening to the rinse.fm mix set of surgeon
can I show you something?
sure
i am at work though so bear that in mind
04:45
yes autecher are fantastic
 
2 hours later…
06:25
I swear every ECS explanation out there is written by someone who is entirely mental.
how come
well, I've found some good explanations of what ECS is, but not a single actual example that wasn't written by someone completely high.
been on google for an hour now -.-
I have no idea how to make a good one mut I can show my first attempt if you want
I'ts most likely awful
can't be worse than the last tutorial I clicked on.
let me comment it and zip
06:31
ooh I might have finally found something that clicked for me. it's still a horrible tutorial, but I kind of figured things out myself. still interested in your code though.
would a Dictionary<string, object> be a good way to go about this? then I could do Vector2 position = (Vector2)getComponent("position");
Yeah, I actually use Type for the keys in my engine, but I don't know if it's any efficient
or any more efficient than strings
with that, you wouldn't be able to have multiple components of the same type, would you?
do you need to? You can't have multiple of them by using strings either
well the string would be the name. say, a Vector3 for position and another Vector3 for rotation. or so I'm thinking about it.
but they are not the same components are they?
06:41
no, that's the point. if you use Vector3 as the key, which will you get?
or will you make two separate components, each containing a Vector3, one of type Position and one of type Rotation?
the most interesting things are most likely in the root and systems
the MotionSystem is not generic, it's made spesifically for the breakout
that's why it checks for the optional stuff
the engine could be optimized by pre-sorting the entities by system using the system filters
okay, so you made separate classes for Position and Rotation, each containing a Vector3
yes
smells like code duplication to me. but then, yours is working, and mine's not. I'll probably be proven wrong later.
thanks for the example though. it's given me other ideas too.
oh and looks like the position component has some deprecated code
I'm mostly using the components as flags
I might add a string ID on them to go away from the typing
type*
Actually I might do that now
oh btw did you know about this one cool feature in C# that strings are objects even if just typed in there inline, that means they have enumerator, and all strings containing the same letters has the same enumerator
which is only logical, but some people don't know that
that's why it can be really efficient to use strings as dictionary keys
06:54
ooh the enumerator part is interesting. I knew they were objects, though. I've used things like "mfMF".contains(input) && input.Length == 1 in Java, when I was just hacking crap together for homework.
although I think it's .getLength()
something like that

« first day (1212 days earlier)      last day (4104 days later) »