Re: strainge behavior

2015-08-19 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector


  


Re: strainge behavior

yes python. i believe i fixed the issues i was having, but if anyone wants to suggest any good practices go ahead.

URL: http://forum.audiogames.net/viewtopic.php?pid=228440#p228440




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: strainge behavior

2015-08-19 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector


  


Re: strainge behavior

I get the gist of what your doing, but its difficult to tell why your doing it without knowing more about the rest of the code. Does this function add and remove screens from dictionaries? Or does it load/remove it from an app stack? What API are you using?

URL: http://forum.audiogames.net/viewtopic.php?pid=228479#p228479




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: strainge behavior

2015-08-19 Thread AudioGames . net Forum — Developers room : dhruv via Audiogames-reflector


  


Re: strainge behavior

This line makes no sense:self.next_screen = self.screen_dict[self.next_screen]Are you...I dont know. You havent defined self.next_screen yet, so you cant look it up in the dictionary. Its really weird. Were you trying to do this?self.next_screen = self.screen_dict[self.next_screen]Also it would be cool if you posted your code blocks in a left bracket code right bracket...left bracket / code right bracket tags. This way the indentation remains fine.

URL: http://forum.audiogames.net/viewtopic.php?pid=228489#p228489




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: strainge behavior

2015-08-19 Thread AudioGames . net Forum — Developers room : dhruv via Audiogames-reflector


  


Re: strainge behavior

This line makes no sense:self.next_screen = self.screen_dict[self.next_screen]Are you...I dont know. You havent defined self.next_screen yet, so you cant look it up in the dictionary. Its really weird. Were you trying to do this?self.next_screen = self.screen_dict[self.next_screen]Also it would be cool if you posted your code blocks in a left bracket code right bracket...left backet / code right bracket tags. This way the indentation remains fine.

URL: http://forum.audiogames.net/viewtopic.php?pid=228489#p228489




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: strainge behavior

2015-08-19 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector


  


Re: strainge behavior

He didnt post all the code, just a snipet. So Im guessing that self.next_screen holds a string thats defined in the other parts of the code.

URL: http://forum.audiogames.net/viewtopic.php?pid=228495#p228495




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: strainge behavior

2015-08-19 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector


  


Re: strainge behavior

yes self.next_screen is the variable that holds the string that was returned from the current_screen. it is used to find the corresponding screen_object in the dictionary. ill have to pull up my code and see what i did to make this work. because it is working at the moment.

URL: http://forum.audiogames.net/viewtopic.php?pid=228514#p228514




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: strainge behavior

2015-08-18 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector


  


Re: strainge behavior

It looks like Python to me.

URL: http://forum.audiogames.net/viewtopic.php?pid=228372#p228372




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: strainge behavior

2015-08-18 Thread AudioGames . net Forum — Developers room : severestormsteve1 via Audiogames-reflector


  


Re: strainge behavior

wait what language is that?

URL: http://forum.audiogames.net/viewtopic.php?pid=228362#p228362




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

strainge behavior

2015-08-06 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector


  


strainge behavior

hello all,hope this finds you well. monopoly development for the most part is going very smoothly ive learned a lot about a lot of things throughout the whole process. but i came across some interesting behavior and wanted to get it out here and see if anyone had anything to say about it. ive developed what is called a state programming pattern or a state machine in my game. for those of you that dont know what that is: everything in the game is a screen and the game cycles through the screens as needed. im holding the screens in the game stack. only the top screen (list[-1]) gets the focus at one point. i dont really see any need for keyboard import to trickle down the stack to other screens at the moment but im using this because its a good model for games and i can easily add to my understanding of this if i create something more complex in the future. all that beeing said, my function for switching screens is buggy. adding scree
 ns is working amazingly well. the issue comes in when i need to remove more than one screen off the stack at a time. this isnt copied code for code below, but i hope you get the general gist and can help me flush out some better practices out of this. the underlying engine for how the game runs needs to be super solid and its not at the moment. each screen returns a string which the engine uses to look up the next screen in a dictionary.def screen-switcher(self):  self.next_screen = self.screen_dict[self.next_screen]  #looks up screen in dict  if self.next_screen in self.stack:#seeing if screen obj is already in the stackfor screen in reversed(self.stack):  if self.stack.index(self.next_screen) != -1:try:   
app.remove_from_stack(screen)  #i want it to remove screens until the specified screen is on topexcept ValueError:  app.add_to_stack(screen)  else:app.add_to_stack(self.next_screen)#if screen isnt in the stack already, it just gets addedthis seems to be mostly doing what i want it to do. but it doesnt seem to be catching the value error that the screen was emoved. any help making this more solid would be appreciated.

URL: http://forum.audiogames.net/viewtopic.php?pid=226801#p226801




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector