The Gang Garrison 2 Forum
May 19, 2013, 10:51:32 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Chat with us on IRC: http://ganggarrison.com/irc.html
Server: irc.esper.net, Channel: #gg2
 
   Home   Help Search Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 »
  Print  
Author Topic: Official PyGG2 Development thread  (Read 37199 times)
♫Sani Sani Disco♫
Onion Knight
******
Offline Offline

Posts: 10477


yo let's suck face and listen to rap music


WWW
« Reply #795 on: June 21, 2012, 07:45:08 am »

Booleans

Motherfucking Booleans
Booleans are useless in this case, there are 3 teams.
assign a numerical value to the team variable then

dubm
Logged

Quote from: mop
Quote from: MR MAGN3TIC
I don't like it.  Nah
Oh, well, you might as well pack up and stop now, because he doesn't like it
Asdf64: "ultros turned me on" - sani 2013
Orpheon
Moderator
*****
Offline Offline

Posts: 5818


Developer


« Reply #796 on: June 21, 2012, 07:46:15 am »

Booleans

Motherfucking Booleans
Booleans are useless in this case, there are 3 teams.
assign a numerical value to the team variable then

dubm
Yeah, of course. Thing is, not everyone agrees that making a team variable is the smartest thing in the first place.
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
♫Sani Sani Disco♫
Onion Knight
******
Offline Offline

Posts: 10477


yo let's suck face and listen to rap music


WWW
« Reply #797 on: June 21, 2012, 07:55:07 am »

Booleans

Motherfucking Booleans
Booleans are useless in this case, there are 3 teams.
assign a numerical value to the team variable then

dubm
Yeah, of course. Thing is, not everyone agrees that making a team variable is the smartest thing in the first place.
It gives you flexibility and ease with developing and modding. Not to say people are going to actually use it, but whatever.
Logged

Quote from: mop
Quote from: MR MAGN3TIC
I don't like it.  Nah
Oh, well, you might as well pack up and stop now, because he doesn't like it
Asdf64: "ultros turned me on" - sani 2013
Orpheon
Moderator
*****
Offline Offline

Posts: 5818


Developer


« Reply #798 on: June 21, 2012, 08:40:31 am »

Booleans

Motherfucking Booleans
Booleans are useless in this case, there are 3 teams.
assign a numerical value to the team variable then

dubm
Yeah, of course. Thing is, not everyone agrees that making a team variable is the smartest thing in the first place.
It gives you flexibility and ease with developing and modding. Not to say people are going to actually use it, but whatever.
So do different classes for different teams. That is a requirement, not an argument.
« Last Edit: June 21, 2012, 08:40:48 am by Orpheon » Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
♫Sani Sani Disco♫
Onion Knight
******
Offline Offline

Posts: 10477


yo let's suck face and listen to rap music


WWW
« Reply #799 on: June 21, 2012, 11:27:33 am »

You're gonna have to help me out with that one, because that genuinely makes no sense at all.
Logged

Quote from: mop
Quote from: MR MAGN3TIC
I don't like it.  Nah
Oh, well, you might as well pack up and stop now, because he doesn't like it
Asdf64: "ultros turned me on" - sani 2013
Orpheon
Moderator
*****
Offline Offline

Posts: 5818


Developer


« Reply #800 on: June 21, 2012, 11:53:33 am »

You're gonna have to help me out with that one, because that genuinely makes no sense at all.
A variable on everything is one option. The other option is to make a general "Shot" class (f.ex.), and use some two separate "Shot_red" and "Shot_blue" classes that have separate code.
Both of them feature flexibility.
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
♫Sani Sani Disco♫
Onion Knight
******
Offline Offline

Posts: 10477


yo let's suck face and listen to rap music


WWW
« Reply #801 on: June 21, 2012, 11:56:37 am »

I don't really see the point in doing that when you could easily alter how they function by using the variable that assigns their team. And we would only need a boolean if we're using the shot_red and shot_blue argument here.
Logged

Quote from: mop
Quote from: MR MAGN3TIC
I don't like it.  Nah
Oh, well, you might as well pack up and stop now, because he doesn't like it
Asdf64: "ultros turned me on" - sani 2013
NAGN
Developer
******
Offline Offline

Posts: 16895


Yeah so now I have an idea


« Reply #802 on: June 21, 2012, 04:58:29 pm »

it'd be good design to assign a .team variable to everything, and assign the numerical number to a constant.

It wouldn't make any sense to essentially hard code the two teams when behavior works identically
Logged



[im
Orpheon
Moderator
*****
Offline Offline

Posts: 5818


Developer


« Reply #803 on: June 22, 2012, 06:14:35 am »

Alright. Then what I decided and already implemented was correct.
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
Glock Topic
Newbie
*
Offline Offline

Posts: 12



« Reply #804 on: June 22, 2012, 07:45:32 pm »

team = True x10 or False x20 or None Ninja

 c1
« Last Edit: June 22, 2012, 07:47:40 pm by Glock Topic » Logged
♫Sani Sani Disco♫
Onion Knight
******
Offline Offline

Posts: 10477


yo let's suck face and listen to rap music


WWW
« Reply #805 on: June 22, 2012, 10:56:31 pm »

team = True x10 or False x20 or None Ninja

 c1
put this man on the dev team
Logged

Quote from: mop
Quote from: MR MAGN3TIC
I don't like it.  Nah
Oh, well, you might as well pack up and stop now, because he doesn't like it
Asdf64: "ultros turned me on" - sani 2013
Phantom Brave
All Hail Classicwell
Designer
*****
Offline Offline

Posts: 9011


Another one --


WWW
« Reply #806 on: June 22, 2012, 11:41:32 pm »

can bools really contain null
because if so then this guy is a genius
Logged

Glock Topic
Newbie
*
Offline Offline

Posts: 12



« Reply #807 on: June 23, 2012, 03:38:55 am »

can bools really contain null
because if so then this guy is a genius
bools are immutable
« Last Edit: June 23, 2012, 03:46:44 am by Glock Topic » Logged
Phantom Brave
All Hail Classicwell
Designer
*****
Offline Offline

Posts: 9011


Another one --


WWW
« Reply #808 on: June 23, 2012, 03:59:34 am »

no sir that is not how data types work
Logged

nightcracker
NC
Hero Member
*****
Offline Offline

Posts: 518


PyGG2 dev


WWW
« Reply #809 on: June 23, 2012, 04:06:46 am »

no sir that is not how data types work

Yes sir, in Python bools, int's, None, str's among others are, in fact, immutable.

Logged

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.313 seconds with 19 queries.