Browse Source

v0.1.2 freeze

shuvit 6 years ago
parent
commit
4e1f0dc175
8 changed files with 261 additions and 117 deletions
  1. 7
    7
      Manager.py
  2. 55
    20
      Settings.py
  3. 17
    16
      co_ActionState.py
  4. 27
    26
      controller2.py
  5. 5
    4
      grindV2.py
  6. 2
    2
      inputs.py
  7. 109
    18
      menuV3.py
  8. 39
    24
      scene_init.py

+ 7
- 7
Manager.py View File

177
                     own["objIndex"] -= 2
177
                     own["objIndex"] -= 2
178
                     logic.setLogicTicRate(frame_rate*1.5)
178
                     logic.setLogicTicRate(frame_rate*1.5)
179
             if b_on == True and pause_state == 0:
179
             if b_on == True and pause_state == 0:
180
-                print("bbut_on")
180
+                #print("bbut_on")
181
                 own['objIndex'] = 0
181
                 own['objIndex'] = 0
182
                 own['valueIndex'] = 0 
182
                 own['valueIndex'] = 0 
183
                 logic.setLogicTicRate(frame_rate*1)                       
183
                 logic.setLogicTicRate(frame_rate*1)                       
216
                 deck.stopAction(9999)
216
                 deck.stopAction(9999)
217
                 trucks.stopAction(9999)
217
                 trucks.stopAction(9999)
218
                 cont.activate(own.actuators['replayCam'])
218
                 cont.activate(own.actuators['replayCam'])
219
-                print("unbreak")
219
+                #print("unbreak")
220
                 own['loop_play'] = 0
220
                 own['loop_play'] = 0
221
                 #own['valueIndex'] = 0
221
                 #own['valueIndex'] = 0
222
                 #own["objIndex"] += 2
222
                 #own["objIndex"] += 2
224
                 #own['objectIndex'] = 0
224
                 #own['objectIndex'] = 0
225
                 #print("valueIndex = ", own['valueIndex'])
225
                 #print("valueIndex = ", own['valueIndex'])
226
         if back_on == 1 and own['back_but'] == 0:
226
         if back_on == 1 and own['back_but'] == 0:
227
-            print("change back state")
227
+            #print("change back state")
228
             if own['back_state'] == True:
228
             if own['back_state'] == True:
229
                 own['back_state'] = False
229
                 own['back_state'] = False
230
             #elif own['back_state'] == False:
230
             #elif own['back_state'] == False:
238
                 own['camnum'] = 0
238
                 own['camnum'] = 0
239
                 cam = camList["Camera.003"]
239
                 cam = camList["Camera.003"]
240
                 scene.active_camera = cam                        
240
                 scene.active_camera = cam                        
241
-                print("turning replay off", own['playback'])
241
+                #print("turning replay off", own['playback'])
242
                 
242
                 
243
               
243
               
244
             if own['last_playback'] == False:
244
             if own['last_playback'] == False:
245
-                print("turning replay on", own['playback'])
245
+                #print("turning replay on", own['playback'])
246
                 cont.activate(own.actuators['add_hud'])
246
                 cont.activate(own.actuators['add_hud'])
247
                 cont.activate(own.actuators['remove_stance'])
247
                 cont.activate(own.actuators['remove_stance'])
248
                 own['objIndex'] = 0
248
                 own['objIndex'] = 0
252
                 
252
                 
253
               
253
               
254
                 
254
                 
255
-        if dict['rtsBut'] == False and dict['last_rtsBut'] == True:
255
+        if dict['rtsBut'] == False and dict['last_rtsBut'] == True and own['playback'] == True:
256
             
256
             
257
             if 'pause' in scene_list:    
257
             if 'pause' in scene_list:    
258
                 #cont.activate(own.actuators['remove_overlay']) 
258
                 #cont.activate(own.actuators['remove_overlay']) 
266
             #print('pause_on')
266
             #print('pause_on')
267
             if 'pause_replay' not in scene_list:
267
             if 'pause_replay' not in scene_list:
268
                 cont.activate(own.actuators['pause_replay_add'])
268
                 cont.activate(own.actuators['pause_replay_add'])
269
-                print('pause_on')
269
+                #print('pause_on')
270
                 
270
                 
271
         if pause_state != 1 and own["playback"]:
271
         if pause_state != 1 and own["playback"]:
272
             if 'pause_replay' in scene_list:
272
             if 'pause_replay' in scene_list:

+ 55
- 20
Settings.py View File

39
     own["profile"] = int(data[12])
39
     own["profile"] = int(data[12])
40
     dict = bge.logic.globalDict #Get the global dictionary
40
     dict = bge.logic.globalDict #Get the global dictionary
41
     
41
     
42
-    dict['resx'] = resx
43
-    dict['resy'] = resy   
42
+    dict['resx'] = own["resx"]
43
+    dict['resy'] = own["resy"]   
44
     level = data[5]
44
     level = data[5]
45
     level = level.split(None, 1)[0]
45
     level = level.split(None, 1)[0]
46
     level = str(level)
46
     level = str(level)
77
     dict['sun_strength'] = float(data[45])
77
     dict['sun_strength'] = float(data[45])
78
     dict['sun_rot_x'] = float(data[46])
78
     dict['sun_rot_x'] = float(data[46])
79
     dict['sun_rot_y'] = float(data[47])            
79
     dict['sun_rot_y'] = float(data[47])            
80
-    dict['shadow_on'] = float(data[48])
81
-    dict['ambient_strength'] = float(data[49])        
80
+    dict['shadow_on'] = int(data[48])
81
+    dict['ambient_strength'] = float(data[49]) 
82
+    dict['fullscreen_on'] = int(data[51]) 
83
+    dict['bloom_on'] = int(data[53])        
82
     
84
     
83
     
85
     
84
     
86
     
103
         writing.write(str("//level (e.g. spine, city, city2)")+"\n")
105
         writing.write(str("//level (e.g. spine, city, city2)")+"\n")
104
         writing.write(str(own["level"])+"\n")
106
         writing.write(str(own["level"])+"\n")
105
         writing.write(str("//resolution")+"\n")
107
         writing.write(str("//resolution")+"\n")
106
-        writing.write(str(own["resx"])+"\n")
107
-        writing.write(str(own["resy"])+"\n")
108
+        writing.write(str(dict["resx"])+"\n")
109
+        writing.write(str(dict["resy"])+"\n")
108
         writing.write(str("//show framerate")+"\n")
110
         writing.write(str("//show framerate")+"\n")
109
         writing.write(str(own["framerate"])+"\n")
111
         writing.write(str(own["framerate"])+"\n")
110
         writing.write(str("//show profile")+"\n")
112
         writing.write(str("//show profile")+"\n")
145
         writing.write(str(dict["sun_rot_x"])+"\n")                           
147
         writing.write(str(dict["sun_rot_x"])+"\n")                           
146
         writing.write(str(dict["sun_rot_y"])+"\n")                           
148
         writing.write(str(dict["sun_rot_y"])+"\n")                           
147
         writing.write(str(dict["shadow_on"])+"\n")                                     
149
         writing.write(str(dict["shadow_on"])+"\n")                                     
148
-        writing.write(str(dict["ambient_strength"])+"\n")                             
149
-        
150
-        
151
-        
150
+        writing.write(str(dict["ambient_strength"])+"\n") 
151
+        writing.write(str("//fullscreen on (0,1)")+"\n")
152
+        writing.write(str(dict["fullscreen_on"])+"\n") 
153
+        writing.write(str("//bloom on (0,1)")+"\n")
154
+        writing.write(str(dict["bloom_on"])+"\n")         
152
         
155
         
153
         
156
         
154
         
157
         
155
         #writing.write(str(own["framerate"])+"\n")
158
         #writing.write(str(own["framerate"])+"\n")
156
         print("writing settings")
159
         print("writing settings")
157
         writing.close()
160
         writing.close()
161
+       
162
+       
163
+def setres():
164
+    import GameLogic
165
+    import bge
166
+    scenes = bge.logic.getSceneList()
167
+    main_scene = [scene for scene in scenes if scene.name=="main"][0]
168
+    own = main_scene.objects['Empty']
169
+    cont = GameLogic.getCurrentController()
170
+    own2 = cont.owner
171
+    dict = bge.logic.globalDict 
172
+    resx = dict["resx"]
173
+    resy = dict["resy"]
174
+    fullscreen = bge.render.getFullScreen()
175
+    print("fullscreen = ", fullscreen)
176
+    if fullscreen != True:
177
+        if dict['fullscreen_on'] == 1:
178
+            bge.render.setFullScreen(True)
179
+    if fullscreen == True:
180
+        if dict['fullscreen_on'] == 0:
181
+            bge.render.setFullScreen(False) 
182
+            
183
+    bge.render.setWindowSize(resx, resy)         
184
+    print("resolution = ", resx, resy)       
158
         
185
         
159
 def loadlevel():
186
 def loadlevel():
160
     import GameLogic
187
     import GameLogic
165
     cont = GameLogic.getCurrentController()
192
     cont = GameLogic.getCurrentController()
166
     own2 = cont.owner
193
     own2 = cont.owner
167
     #readSettings()
194
     #readSettings()
168
-    resx = own["resx"]
169
-    resy = own["resy"]
195
+
170
     dict = bge.logic.globalDict #Get the global dictionary
196
     dict = bge.logic.globalDict #Get the global dictionary
171
-    dict['resx'] = resx
172
-    dict['resy'] = resy
173
-    bge.render.setWindowSize(resx, resy)
174
-    fullscreen = bge.render.getFullScreen()
175
-    print("fullscreen = ", fullscreen)
176
-    if fullscreen != True:
177
-        bge.render.setFullScreen(True)
178
-    print("resolution = ", resx, resy)
197
+    
198
+#    resx = dict["resx"]
199
+#    resy = dict["resy"]
200
+#    #dict['resx'] = resx
201
+#    #dict['resy'] = resy
202
+#    
203
+#    fullscreen = bge.render.getFullScreen()
204
+#    print("fullscreen = ", fullscreen)
205
+#    if fullscreen != True:
206
+#        if dict['fullscreen_on'] == 1:
207
+#            bge.render.setFullScreen(True)
208
+#    if fullscreen == True:
209
+#        if dict['fullscreen_on'] == 0:
210
+#            bge.render.setFullScreen(False) 
211
+#            
212
+#    bge.render.setWindowSize(resx, resy)         
213
+#    print("resolution = ", resx, resy)
179
     #objList = scene.objects
214
     #objList = scene.objects
180
     if own["framerate"] == 1:    
215
     if own["framerate"] == 1:    
181
         bge.render.showFramerate(1)
216
         bge.render.showFramerate(1)

+ 17
- 16
co_ActionState.py View File

50
         l_actionState = 'empty'
50
         l_actionState = 'empty'
51
         l_requestAction = 'empty'
51
         l_requestAction = 'empty'
52
     if requestAction == 'empty':
52
     if requestAction == 'empty':
53
-        print("*******empty request****")
54
-        
53
+        #print("*******empty request****")
54
+        pass
55
     isplaying = skater.isPlayingAction(flip_layer)
55
     isplaying = skater.isPlayingAction(flip_layer)
56
     transPlaying = skater.isPlayingAction(trans_layer)
56
     transPlaying = skater.isPlayingAction(trans_layer)
57
         
57
         
154
         actionState = requestAction
154
         actionState = requestAction
155
         own['actionState'] = requestAction 
155
         own['actionState'] = requestAction 
156
         if l_requestAction != 'revert1' and l_requestAction != 'revert2' and l_requestAction != 'revert3' and l_requestAction != 'revert4' and l_requestAction != 'fak_revert1' and l_requestAction != 'fak_revert2' and l_requestAction != 'fak_revert3' and l_requestAction != 'fak_revert4':   
156
         if l_requestAction != 'revert1' and l_requestAction != 'revert2' and l_requestAction != 'revert3' and l_requestAction != 'revert4' and l_requestAction != 'fak_revert1' and l_requestAction != 'fak_revert2' and l_requestAction != 'fak_revert3' and l_requestAction != 'fak_revert4':   
157
-            print("stopping revert layers")     
157
+            #print("stopping revert layers")     
158
             skater.stopAction(loop_layer)
158
             skater.stopAction(loop_layer)
159
             trucks.stopAction(loop_layer)
159
             trucks.stopAction(loop_layer)
160
             deck.stopAction(loop_layer)
160
             deck.stopAction(loop_layer)
395
             
395
             
396
         if l_actionState == 'fak_air_tail' and requestAction in ('reg_roll', 'reg_manual', 'fak_land'):
396
         if l_actionState == 'fak_air_tail' and requestAction in ('reg_roll', 'reg_manual', 'fak_land'):
397
             requestAction = 'fak_air_tail to manual'
397
             requestAction = 'fak_air_tail to manual'
398
-            print('fucking manuals')
398
+            #print('fucking manuals')
399
             
399
             
400
 #        if l_actionState == 'reg_air_tail' and requestAction in ('fak_roll', 'fak_manual'):
400
 #        if l_actionState == 'reg_air_tail' and requestAction in ('fak_roll', 'fak_manual'):
401
 #            requestAction = 'reg_manual'
401
 #            requestAction = 'reg_manual'
402
         
402
         
403
         if l_actionState == 'reg_air_tail' and requestAction in ('fak_manual', 'fak_roll', 'reg_land'):
403
         if l_actionState == 'reg_air_tail' and requestAction in ('fak_manual', 'fak_roll', 'reg_land'):
404
             requestAction = 'reg_air_tail to manual'
404
             requestAction = 'reg_air_tail to manual'
405
-            print('fucking manuals')
405
+            #print('fucking manuals')
406
                
406
                
407
 #        if l_actionState == 'reg_air_tail' and requestAction in ('fak_manual', 'fak_roll'):
407
 #        if l_actionState == 'reg_air_tail' and requestAction in ('fak_manual', 'fak_roll'):
408
 #            requestAction = 'fak_nmanual'
408
 #            requestAction = 'fak_nmanual'
409
             
409
             
410
         if l_actionState == 'fak_air_nose' and requestAction in ('reg_roll', 'reg_nmanual', 'fak_land'):
410
         if l_actionState == 'fak_air_nose' and requestAction in ('reg_roll', 'reg_nmanual', 'fak_land'):
411
             requestAction = 'fak_air_nose to nmanual'
411
             requestAction = 'fak_air_nose to nmanual'
412
-            print('fucking manuals')
412
+            #print('fucking manuals')
413
             
413
             
414
         if l_actionState == 'reg_air_nose' and requestAction in ('fak_roll', 'fak_nmanual', 'reg_land'):
414
         if l_actionState == 'reg_air_nose' and requestAction in ('fak_roll', 'fak_nmanual', 'reg_land'):
415
             requestAction = 'reg_air_nose to nmanual'
415
             requestAction = 'reg_air_nose to nmanual'
416
-            print('fucking manuals') 
416
+            #print('fucking manuals') 
417
         #own['requestAction'] = requestAction
417
         #own['requestAction'] = requestAction
418
 #        if l_actionState == 'reg_air_nose' and requestAction in ('fak_nmanual', 'fak_roll', 'reg_nmanual', 'reg_roll', 'reg_manual'):
418
 #        if l_actionState == 'reg_air_nose' and requestAction in ('fak_nmanual', 'fak_roll', 'reg_nmanual', 'reg_roll', 'reg_manual'):
419
 #            requestAction == 'reg_air_nose to nmanual' 
419
 #            requestAction == 'reg_air_nose to nmanual' 
447
             
447
             
448
 #        if l_actionState == 'fak_air_nose to nmanual' and requestAction == 'reg_nmanual':
448
 #        if l_actionState == 'fak_air_nose to nmanual' and requestAction == 'reg_nmanual':
449
 #            requestAction = 'fak-reg_manual'  
449
 #            requestAction = 'fak-reg_manual'  
450
-#            print('this???')
450
+#            #print('this???')
451
 #        if l_actionState == 'fak-reg_manual' and requestAction == 'reg_nmanual':
451
 #        if l_actionState == 'fak-reg_manual' and requestAction == 'reg_nmanual':
452
 #            requestAction = 'reg_manual'                
452
 #            requestAction = 'reg_manual'                
453
             
453
             
581
 #            own['l_actionState'] = 'reg_manual'             
581
 #            own['l_actionState'] = 'reg_manual'             
582
                                                                                                                                                         
582
                                                                                                                                                         
583
     else:
583
     else:
584
-        print("action over written")               
584
+        #print("action over written") 
585
+        pass              
585
     def updateAction(requestAction, actionState):
586
     def updateAction(requestAction, actionState):
586
         try:
587
         try:
587
             flip_start_frame = own['flip_start_lay']
588
             flip_start_frame = own['flip_start_lay']
602
                 skater.stopAction(trans_layer)
603
                 skater.stopAction(trans_layer)
603
                 trucks.stopAction(trans_layer)
604
                 trucks.stopAction(trans_layer)
604
                 deck.stopAction(trans_layer)
605
                 deck.stopAction(trans_layer)
605
-                print("stopping loop and trans")                                
606
+                #print("stopping loop and trans")                                
606
                 actionState = 'reg_land'
607
                 actionState = 'reg_land'
607
                 requestAction = 'reg_land'
608
                 requestAction = 'reg_land'
608
                 own['actionTimer'] = 37
609
                 own['actionTimer'] = 37
609
                 skater.playAction("reg_land", 1,20, layer=trans_layer, play_mode=0, speed=.5)
610
                 skater.playAction("reg_land", 1,20, layer=trans_layer, play_mode=0, speed=.5)
610
                 deck.playAction("a_reg", 1,20, layer=trans_layer, play_mode=1, speed=.5)
611
                 deck.playAction("a_reg", 1,20, layer=trans_layer, play_mode=1, speed=.5)
611
                 trucks.playAction("a_reg", 1,20, layer=trans_layer, play_mode=1, speed=.5)                        
612
                 trucks.playAction("a_reg", 1,20, layer=trans_layer, play_mode=1, speed=.5)                        
612
-                print("play land") 
613
+                #print("play land") 
613
             if requestAction == 'fak_land' and own["grindHit"] == False:
614
             if requestAction == 'fak_land' and own["grindHit"] == False:
614
                 actionState = 'fak_land'
615
                 actionState = 'fak_land'
615
                 requestAction = 'fak_land'
616
                 requestAction = 'fak_land'
623
                 skater.playAction("fak_land", 1,20, layer=trans_layer, play_mode=0, speed=.5)                        
624
                 skater.playAction("fak_land", 1,20, layer=trans_layer, play_mode=0, speed=.5)                        
624
                 deck.playAction("a_reg", 1,20, layer=trans_layer, play_mode=1, speed=.5)
625
                 deck.playAction("a_reg", 1,20, layer=trans_layer, play_mode=1, speed=.5)
625
                 trucks.playAction("a_reg", 1,20, layer=trans_layer, play_mode=1, speed=.5)        
626
                 trucks.playAction("a_reg", 1,20, layer=trans_layer, play_mode=1, speed=.5)        
626
-                print("play land")
627
+                #print("play land")
627
 
628
 
628
             if requestAction == 'reg_dropin':
629
             if requestAction == 'reg_dropin':
629
                 actionState = 'reg_dropin'
630
                 actionState = 'reg_dropin'
1244
                 trucks.playAction("a_brfoot", 1, 30, layer=trans_layer, play_mode=0, speed=.75)
1245
                 trucks.playAction("a_brfoot", 1, 30, layer=trans_layer, play_mode=0, speed=.75)
1245
 
1246
 
1246
             if requestAction == 'reg_blfoot':
1247
             if requestAction == 'reg_blfoot':
1247
-                print("playing blfoot broke")
1248
+                #print("playing blfoot broke")
1248
                 actionState = 'reg_blfoot'
1249
                 actionState = 'reg_blfoot'
1249
                 own['actionTimer'] = 40
1250
                 own['actionTimer'] = 40
1250
                 skater.playAction("blfoot", 1, 30, layer=trans_layer, play_mode=0, speed=.75)
1251
                 skater.playAction("blfoot", 1, 30, layer=trans_layer, play_mode=0, speed=.75)
1395
                 trucks.playAction("a_revert2", 1,10, layer=trans_layer, play_mode=0, speed=.3)                
1396
                 trucks.playAction("a_revert2", 1,10, layer=trans_layer, play_mode=0, speed=.3)                
1396
 
1397
 
1397
             if requestAction == 'reg_ollie':
1398
             if requestAction == 'reg_ollie':
1398
-                print("*****reg ollie act")
1399
+                #print("*****reg ollie act")
1399
                 actionState = 'reg_ollie'
1400
                 actionState = 'reg_ollie'
1400
                 own['actionState'] = 'reg_ollie'
1401
                 own['actionState'] = 'reg_ollie'
1401
                 own['actionTimer'] = 28           
1402
                 own['actionTimer'] = 28           
3104
                     trucks.playAction("a_reg_nosegL", 30,1, layer=loop_layer, play_mode=1, speed=.5)       
3105
                     trucks.playAction("a_reg_nosegL", 30,1, layer=loop_layer, play_mode=1, speed=.5)       
3105
             if requestAction == 'fak_nosegl':
3106
             if requestAction == 'fak_nosegl':
3106
                 actionState = 'fak_nosegl'
3107
                 actionState = 'fak_nosegl'
3107
-                print("fak_nosegl state")
3108
+                #print("fak_nosegl state")
3108
                 if l_actionState != 'fak_nosegl' and l_actionState != 'fak_air_nose':
3109
                 if l_actionState != 'fak_nosegl' and l_actionState != 'fak_air_nose':
3109
                     skater.stopAction(flip_layer)
3110
                     skater.stopAction(flip_layer)
3110
                     deck.stopAction(flip_layer)
3111
                     deck.stopAction(flip_layer)
3568
                         skater.setActionFrame(cur_frame, loop_layer)
3569
                         skater.setActionFrame(cur_frame, loop_layer)
3569
                         deck.setActionFrame(cur_frame, loop_layer)
3570
                         deck.setActionFrame(cur_frame, loop_layer)
3570
                         trucks.setActionFrame(cur_frame, loop_layer)
3571
                         trucks.setActionFrame(cur_frame, loop_layer)
3571
-                        print("set last walk frame", cur_frame)                                       
3572
+                        #print("set last walk frame", cur_frame)                                       
3572
                 #loop
3573
                 #loop
3573
                 else:
3574
                 else:
3574
                     skater.playAction("reg_nwalk", 0,35, layer=loop_layer, play_mode=1, speed=1)
3575
                     skater.playAction("reg_nwalk", 0,35, layer=loop_layer, play_mode=1, speed=1)

+ 27
- 26
controller2.py View File

313
         if r_ground.triggered == True and skater.isPlayingAction(fliplay) and own['jump_timer'] < 40 and playing_frame < 14 and playing_frame > 3:
313
         if r_ground.triggered == True and skater.isPlayingAction(fliplay) and own['jump_timer'] < 40 and playing_frame < 14 and playing_frame > 3:
314
             own['fall'] = 1
314
             own['fall'] = 1
315
             own['last_fall_frame'] = frame
315
             own['last_fall_frame'] = frame
316
-            print("fall: ", playing_frame, own['jump_timer'])
316
+            #print("fall: ", playing_frame, own['jump_timer'])
317
             if STANCE == 0:
317
             if STANCE == 0:
318
                 #own['requestAction'] = 'reg_fall1'
318
                 #own['requestAction'] = 'reg_fall1'
319
                 own['requestAction'] = 'reg_air-walk_air'
319
                 own['requestAction'] = 'reg_air-walk_air'
418
                 if own['manual_v2_type'] == 'fak nose manual':
418
                 if own['manual_v2_type'] == 'fak nose manual':
419
                     own['manual_v2_type'] = 'reg manual'
419
                     own['manual_v2_type'] = 'reg manual'
420
                 if lAs == 'fak_air_tail to manual' and own['manual_v2_type'] == 'reg manual':
420
                 if lAs == 'fak_air_tail to manual' and own['manual_v2_type'] == 'reg manual':
421
-                    print('---requesting reg nose manual')
421
+                    #print('---requesting reg nose manual')
422
                     own['manual_v2_type'] = 'reg nose manual' 
422
                     own['manual_v2_type'] = 'reg nose manual' 
423
                 if lAs == 'fak_air_nose to nmanual' and own['manual_v2_type'] == 'reg nose manual':
423
                 if lAs == 'fak_air_nose to nmanual' and own['manual_v2_type'] == 'reg nose manual':
424
-                    print('---requesting reg nose manual')
424
+                    #print('---requesting reg nose manual')
425
                     own['manual_v2_type'] = 'reg manual'                                          
425
                     own['manual_v2_type'] = 'reg manual'                                          
426
             if own['jump_stance'] == 1:
426
             if own['jump_stance'] == 1:
427
-                print('flipstance 1')
427
+                #print('flipstance 1')
428
                 if own['manual_v2_type'] == 'reg manual':
428
                 if own['manual_v2_type'] == 'reg manual':
429
                     own['manual_v2_type'] = 'fak nose manual'
429
                     own['manual_v2_type'] = 'fak nose manual'
430
                 if own['manual_v2_type'] == 'reg nose manual':
430
                 if own['manual_v2_type'] == 'reg nose manual':
431
                     #print("asdfasdfasdfsdfasdfasdf")
431
                     #print("asdfasdfasdfsdfasdfasdf")
432
                     own['manual_v2_type'] = 'fak manual'   
432
                     own['manual_v2_type'] = 'fak manual'   
433
                 if lAs == 'reg_air_tail to manual' and own['manual_v2_type'] == 'fak manual':
433
                 if lAs == 'reg_air_tail to manual' and own['manual_v2_type'] == 'fak manual':
434
-                    print('---requesting fak nose manual')
434
+                    #print('---requesting fak nose manual')
435
                     own['manual_v2_type'] = 'fak nose manual'
435
                     own['manual_v2_type'] = 'fak nose manual'
436
                 if lAs == 'reg_air_nose to nmanual' and own['manual_v2_type'] == 'fak nose manual':
436
                 if lAs == 'reg_air_nose to nmanual' and own['manual_v2_type'] == 'fak nose manual':
437
-                    print('---requesting fak nose manual')
437
+                    #print('---requesting fak nose manual')
438
                     own['manual_v2_type'] = 'fak manual' 
438
                     own['manual_v2_type'] = 'fak manual' 
439
                     
439
                     
440
         if STANCE == 0 and own['manual_v2_type'] == 'fak manual':
440
         if STANCE == 0 and own['manual_v2_type'] == 'fak manual':
441
-            print('change manual stance')
441
+            #print('change manual stance')
442
             own['manual_v2_type'] = 'reg nose manual' 
442
             own['manual_v2_type'] = 'reg nose manual' 
443
         if STANCE == 1 and own['manual_v2_type'] == 'reg manual':
443
         if STANCE == 1 and own['manual_v2_type'] == 'reg manual':
444
-            print('change manual stance')                        
444
+            #print('change manual stance')                        
445
             own['manual_v2_type'] = 'fak nose manual'
445
             own['manual_v2_type'] = 'fak nose manual'
446
 
446
 
447
         if STANCE == 0 and own['manual_v2_type'] == 'fak nose manual':
447
         if STANCE == 0 and own['manual_v2_type'] == 'fak nose manual':
448
-            print('change manual stance')
448
+            #print('change manual stance')
449
             own['manual_v2_type'] = 'reg manual' 
449
             own['manual_v2_type'] = 'reg manual' 
450
         if STANCE == 1 and own['manual_v2_type'] == 'reg nose manual':
450
         if STANCE == 1 and own['manual_v2_type'] == 'reg nose manual':
451
-            print('change manual stance')                        
451
+            #print('change manual stance')                        
452
             own['manual_v2_type'] = 'fak manual'  
452
             own['manual_v2_type'] = 'fak manual'  
453
             
453
             
454
                                       
454
                                       
851
         if zvel < 7 and jump_timer == 60:
851
         if zvel < 7 and jump_timer == 60:
852
             cont.activate(own.actuators["pop"])
852
             cont.activate(own.actuators["pop"])
853
             own['pop_sound'] = 1
853
             own['pop_sound'] = 1
854
-            print("jump")
854
+            #print("jump")
855
             #
855
             #
856
             posx = own.worldPosition[0]
856
             posx = own.worldPosition[0]
857
             posy = own.worldPosition[1]
857
             posy = own.worldPosition[1]
864
             # apply force
864
             # apply force
865
             try:
865
             try:
866
                 if 'trans' in r_ground.hitObject:
866
                 if 'trans' in r_ground.hitObject:
867
-                    print('jump from trans')
867
+                    #print('jump from trans')
868
                     own['jump_from_trans'] = 1
868
                     own['jump_from_trans'] = 1
869
                     own['trans_jump_obj'] = r_ground.hitObject
869
                     own['trans_jump_obj'] = r_ground.hitObject
870
             except:
870
             except:
871
-                print('trans jump broke')
871
+                #print('trans jump broke')
872
+                pass
872
             if grindHit == False:
873
             if grindHit == False:
873
                 own.applyForce(force, local)
874
                 own.applyForce(force, local)
874
                 force2 = [0.0, 0, 150]
875
                 force2 = [0.0, 0, 150]
905
             if own["wallride"] == "R":
906
             if own["wallride"] == "R":
906
                 force = [0,170,0]
907
                 force = [0,170,0]
907
                 own.applyForce(force, True)
908
                 own.applyForce(force, True)
908
-                print("****walljumpforce R")
909
+                #print("****walljumpforce R")
909
                 cont.activate(own.actuators["pop2"])
910
                 cont.activate(own.actuators["pop2"])
910
                 jump_timer = 60
911
                 jump_timer = 60
911
                 own['jump_timer'] = jump_timer            
912
                 own['jump_timer'] = jump_timer            
912
             if own["wallride"] == "L":
913
             if own["wallride"] == "L":
913
                 force = [0,-170,0] #325
914
                 force = [0,-170,0] #325
914
                 own.applyForce(force, True)                    
915
                 own.applyForce(force, True)                    
915
-                print("****walljumpforce L")
916
+                #print("****walljumpforce L")
916
                 cont.activate(own.actuators["pop2"])
917
                 cont.activate(own.actuators["pop2"])
917
                 jump_timer = 60
918
                 jump_timer = 60
918
                 own['jump_timer'] = jump_timer
919
                 own['jump_timer'] = jump_timer
3895
         outvel = own.linearVelocity
3896
         outvel = own.linearVelocity
3896
         if own["coping"] == 1:
3897
         if own["coping"] == 1:
3897
             reg_rot = reg_rot *3
3898
             reg_rot = reg_rot *3
3898
-            print('coping on')
3899
+            #print('coping on')
3899
         if own['gt_cd2'] > 50 and own['jump_timer'] < 20:
3900
         if own['gt_cd2'] > 50 and own['jump_timer'] < 20:
3900
             if own['grind_out_type'] == 'reg right':
3901
             if own['grind_out_type'] == 'reg right':
3901
-                print("do reg right")
3902
+                #print("do reg right")
3902
                 own.applyMovement([0,reg_move,0], True)
3903
                 own.applyMovement([0,reg_move,0], True)
3903
                 own.applyRotation([0,0,-reg_rot],True)
3904
                 own.applyRotation([0,0,-reg_rot],True)
3904
             if own['grind_out_type'] == 'fak right':
3905
             if own['grind_out_type'] == 'fak right':
3905
                 own.applyMovement([0,-reg_move,0], True)
3906
                 own.applyMovement([0,-reg_move,0], True)
3906
                 own.applyRotation([0,0,-reg_rot],True)
3907
                 own.applyRotation([0,0,-reg_rot],True)
3907
-                print("do fak right") 
3908
+                #print("do fak right") 
3908
             if own['grind_out_type'] == 'reg left':
3909
             if own['grind_out_type'] == 'reg left':
3909
-                print("do reg left")
3910
+                #print("do reg left")
3910
                 own.applyMovement([0,-reg_move,0], True)
3911
                 own.applyMovement([0,-reg_move,0], True)
3911
                 own.applyRotation([0,0,reg_rot],True)           
3912
                 own.applyRotation([0,0,reg_rot],True)           
3912
             if own['grind_out_type'] == 'fak left':
3913
             if own['grind_out_type'] == 'fak left':
3913
                 own.applyMovement([0,reg_move,0], True)
3914
                 own.applyMovement([0,reg_move,0], True)
3914
                 own.applyRotation([0,0,reg_rot],True)
3915
                 own.applyRotation([0,0,reg_rot],True)
3915
-                print("do fak left") 
3916
+                #print("do fak left") 
3916
             if own['grind_out_type'] == 'reg fak right':
3917
             if own['grind_out_type'] == 'reg fak right':
3917
                 if own['gt_cd2'] > 55:
3918
                 if own['gt_cd2'] > 55:
3918
                     own.applyMovement([0,reg_move2,0], True)
3919
                     own.applyMovement([0,reg_move2,0], True)
3919
                 own.applyRotation([0,0,reg_rot2],True)            
3920
                 own.applyRotation([0,0,reg_rot2],True)            
3920
-                print("do reg fak right")
3921
+                #print("do reg fak right")
3921
             if own['grind_out_type'] == 'fak fak right':
3922
             if own['grind_out_type'] == 'fak fak right':
3922
                 if own['gt_cd2'] > 55:
3923
                 if own['gt_cd2'] > 55:
3923
                     own.applyMovement([0,-reg_move2,0], True)
3924
                     own.applyMovement([0,-reg_move2,0], True)
3924
                 own.applyRotation([0,0,reg_rot2],True)            
3925
                 own.applyRotation([0,0,reg_rot2],True)            
3925
-                print("do fak fak right") 
3926
+                #print("do fak fak right") 
3926
             if own['grind_out_type'] == 'reg fak left':
3927
             if own['grind_out_type'] == 'reg fak left':
3927
                 if own['gt_cd2'] > 55:
3928
                 if own['gt_cd2'] > 55:
3928
                     own.applyMovement([0,-reg_move2,0], True)
3929
                     own.applyMovement([0,-reg_move2,0], True)
3929
                 own.applyRotation([0,0,-reg_rot2],True)             
3930
                 own.applyRotation([0,0,-reg_rot2],True)             
3930
-                print("do reg fak left")                        
3931
+                #print("do reg fak left")                        
3931
             if own['grind_out_type'] == 'fak fak left':
3932
             if own['grind_out_type'] == 'fak fak left':
3932
                 if own['gt_cd2'] > 55:
3933
                 if own['gt_cd2'] > 55:
3933
                     own.applyMovement([0,reg_move2,0], True)
3934
                     own.applyMovement([0,reg_move2,0], True)
3934
                 own.applyRotation([0,0,-reg_rot2],True)            
3935
                 own.applyRotation([0,0,-reg_rot2],True)            
3935
-                print("do fak fak left")
3936
+                #print("do fak fak left")
3936
             if own['grind_out_type'] == 'reg right' or own['grind_out_type'] == 'reg left' or own['grind_out_type'] == 'fak right' or own['grind_out_type'] == 'fak left':   
3937
             if own['grind_out_type'] == 'reg right' or own['grind_out_type'] == 'reg left' or own['grind_out_type'] == 'fak right' or own['grind_out_type'] == 'fak left':   
3937
                 own.setLinearVelocity([outvel.x * 1.01, outvel.y, outvel.z], True)
3938
                 own.setLinearVelocity([outvel.x * 1.01, outvel.y, outvel.z], True)
3938
             if own['grind_out_type'] == 'reg fak right' or own['grind_out_type'] == 'reg fak left' or own['grind_out_type'] == 'fak fak right' or own['grind_out_type'] == 'fak fak left':
3939
             if own['grind_out_type'] == 'reg fak right' or own['grind_out_type'] == 'reg fak left' or own['grind_out_type'] == 'fak fak right' or own['grind_out_type'] == 'fak fak left':
4123
         linvelx = linVelocity.x
4124
         linvelx = linVelocity.x
4124
         lastx = own["linvelx"]
4125
         lastx = own["linvelx"]
4125
         if frames_since_ground > 20 and (abs(lastx) - abs(linvelx)) > .5:
4126
         if frames_since_ground > 20 and (abs(lastx) - abs(linvelx)) > .5:
4126
-            print('::::::wallhit')
4127
+            #print('::::::wallhit')
4127
             force = (linVelocity.x * -.7, linVelocity.y, linVelocity.z )                    
4128
             force = (linVelocity.x * -.7, linVelocity.y, linVelocity.z )                    
4128
             own.setLinearVelocity(force, True)        
4129
             own.setLinearVelocity(force, True)        
4129
     
4130
     
4131
         linvelx = linVelocity.x
4132
         linvelx = linVelocity.x
4132
         lastx = own["linvelx"]
4133
         lastx = own["linvelx"]
4133
         if frames_since_ground < 2 and (abs(lastx) - abs(linvelx)) > .5:
4134
         if frames_since_ground < 2 and (abs(lastx) - abs(linvelx)) > .5:
4134
-            print('**_____________land boost')
4135
+            #print('**_____________land boost')
4135
             force = (lastx, linVelocity.y, linVelocity.z )                    
4136
             force = (lastx, linVelocity.y, linVelocity.z )                    
4136
             own.setLinearVelocity(force, True)             
4137
             own.setLinearVelocity(force, True)             
4137
         
4138
         

+ 5
- 4
grindV2.py View File

479
             
479
             
480
     
480
     
481
     if grindDar.positive == False and grindTouch.positive and grindold == 0 and dropin == 0 and grind_jump == 0 and own["grindoutturn"] == 0 and gt_cd == 0 and manual == 0 and no_grind == 0 and nearestObject != lastObject and own['grindjumpturn'] == 0 and own['gt_cd2'] == 0 and own['air_mover'] == False:
481
     if grindDar.positive == False and grindTouch.positive and grindold == 0 and dropin == 0 and grind_jump == 0 and own["grindoutturn"] == 0 and gt_cd == 0 and manual == 0 and no_grind == 0 and nearestObject != lastObject and own['grindjumpturn'] == 0 and own['gt_cd2'] == 0 and own['air_mover'] == False:
482
-        print("touching, no dar")
482
+        #print("touching, no dar")
483
+        pass
483
     #print(grindold, "grindold")        
484
     #print(grindold, "grindold")        
484
     if grindDar.positive:
485
     if grindDar.positive:
485
         detectedObjects = grindDar.hitObjectList
486
         detectedObjects = grindDar.hitObjectList
500
             own['inverting'] = False
501
             own['inverting'] = False
501
         grind_dist = .8#.6
502
         grind_dist = .8#.6
502
         if dist < grind_dist and grindold == 0 and dropin == 0 and grind_jump == 0 and own["grindoutturn"] == 0 and gt_cd == 0 and manual == 0 and no_grind == 0 and nearestObject != lastObject and own['grindjumpturn'] == 0 and own['gt_cd2'] == 0 and invert_on == False and own['air_mover'] == False and no_grind_pull == 0:   
503
         if dist < grind_dist and grindold == 0 and dropin == 0 and grind_jump == 0 and own["grindoutturn"] == 0 and gt_cd == 0 and manual == 0 and no_grind == 0 and nearestObject != lastObject and own['grindjumpturn'] == 0 and own['gt_cd2'] == 0 and invert_on == False and own['air_mover'] == False and no_grind_pull == 0:   
503
-            print("new grind trigger")           
504
+            #print("new grind trigger")           
504
             npos = nearestObject.worldPosition
505
             npos = nearestObject.worldPosition
505
             
506
             
506
             
507
             
515
                     if hitNormal != None:
516
                     if hitNormal != None:
516
                         stre = .05
517
                         stre = .05
517
                         own.alignAxisToVect(hitNormal, 2, stre) 
518
                         own.alignAxisToVect(hitNormal, 2, stre) 
518
-                        print("align")                   
519
+                        #print("align")                   
519
                     own.worldPosition = [nearpos.x, nearpos.y, nearpos.z + .2975]
520
                     own.worldPosition = [nearpos.x, nearpos.y, nearpos.z + .2975]
520
-                    print('moving world')
521
+                    #print('moving world')
521
 
522
 
522
 
523
 
523
             #print("grinding")
524
             #print("grinding")

+ 2
- 2
inputs.py View File

59
         if dict['joy_con'] == 0 and dict['last_joy_con'] == 1:
59
         if dict['joy_con'] == 0 and dict['last_joy_con'] == 1:
60
             if 'joy_warn' not in scenes:
60
             if 'joy_warn' not in scenes:
61
                 #add scene
61
                 #add scene
62
-                print('print add joy overlay')
62
+                #print('print add joy overlay')
63
                 cont.activate(cont.actuators['add_controller'])
63
                 cont.activate(cont.actuators['add_controller'])
64
         else:
64
         else:
65
             if dict['joy_con'] == 1 and dict['last_joy_con'] == 0:
65
             if dict['joy_con'] == 1 and dict['last_joy_con'] == 0:
66
                 #remove scene            
66
                 #remove scene            
67
-                print('print remove joy overlay')            
67
+                #print('print remove joy overlay')            
68
                 cont.activate(cont.actuators['remove_controller'])
68
                 cont.activate(cont.actuators['remove_controller'])
69
 #get controller axis value 0-100   
69
 #get controller axis value 0-100   
70
     if dict['joy_con'] == 1: 
70
     if dict['joy_con'] == 1: 

+ 109
- 18
menuV3.py View File

6
 #exit functions
6
 #exit functions
7
 #=======
7
 #=======
8
 def endpoint(funct, motion, dict, cont):
8
 def endpoint(funct, motion, dict, cont):
9
-    print('endpoint', funct,motion)
9
+    #print('endpoint', funct,motion)
10
     scene = bge.logic.getCurrentScene()
10
     scene = bge.logic.getCurrentScene()
11
     
11
     
12
     scenes = bge.logic.getSceneList()
12
     scenes = bge.logic.getSceneList()
24
     cam = scene.objects['Camera.003']       
24
     cam = scene.objects['Camera.003']       
25
     c_move = .025 #color move amount  
25
     c_move = .025 #color move amount  
26
     if funct == 'exit':
26
     if funct == 'exit':
27
-        print("exit function", motion)
27
+        #print("exit function", motion)
28
         bge.logic.endGame()
28
         bge.logic.endGame()
29
     if funct == 'restart':
29
     if funct == 'restart':
30
-        print("restart function", motion)  
30
+        #print("restart function", motion)  
31
         bge.logic.restartGame()      
31
         bge.logic.restartGame()      
32
     if funct == 'shirt color r':
32
     if funct == 'shirt color r':
33
         s_color = shirt.color
33
         s_color = shirt.color
83
                 s_color_b = 0          
83
                 s_color_b = 0          
84
         new_col = [s_color[0], s_color[1], s_color_b, s_color[3]]
84
         new_col = [s_color[0], s_color[1], s_color_b, s_color[3]]
85
         shirt.color = new_col   
85
         shirt.color = new_col   
86
-        print(new_col)          
86
+        #print(new_col)          
87
         dict['shirt_color_b'] = new_col[2]
87
         dict['shirt_color_b'] = new_col[2]
88
         
88
         
89
         
89
         
146
         new_col = [s_color[0], s_color[1], s_color_b, s_color[3]]
146
         new_col = [s_color[0], s_color[1], s_color_b, s_color[3]]
147
         shoeL.color = new_col   
147
         shoeL.color = new_col   
148
         shoeR.color = new_col
148
         shoeR.color = new_col
149
-        print(new_col)          
149
+        #print(new_col)          
150
         dict['shoe_color_b'] = new_col[2]     
150
         dict['shoe_color_b'] = new_col[2]     
151
         
151
         
152
         
152
         
207
         new_col = [s_color[0], s_color[1], s_color_b, s_color[3]]
207
         new_col = [s_color[0], s_color[1], s_color_b, s_color[3]]
208
         deck.color = new_col   
208
         deck.color = new_col   
209
         throw_deck.color = new_col
209
         throw_deck.color = new_col
210
-        print(new_col)          
210
+        #print(new_col)          
211
         dict['deck_color_b'] = new_col[2]  
211
         dict['deck_color_b'] = new_col[2]  
212
         
212
         
213
     if funct == 'shirt logo':
213
     if funct == 'shirt logo':
363
             cam['dof_on'] = 0
363
             cam['dof_on'] = 0
364
             dict['dof_on'] = 0      
364
             dict['dof_on'] = 0      
365
             
365
             
366
+    if funct == 'bloom on':
367
+        if motion == 'inc':
368
+            cont.activate(cam.actuators["Bloom"])
369
+            cam['bloom_on'] = 1
370
+            dict['bloom_on'] = 1
371
+        else:
372
+            cont.activate(cam.actuators["bloom_off"])            
373
+            cam['bloom_on'] = 0
374
+            dict['bloom_on'] = 0  
375
+
376
+    if funct == 'shadow on':
377
+        if motion == 'inc':
378
+            cam['shadow_on'] = 1
379
+            dict['shadow_on'] = 1
380
+            #bge.render.setGLSLMaterialSetting("shadows", 1)                
381
+        else:
382
+            #cont.activate(cam.actuators["bloom_off"])            
383
+            cam['shadow_on'] = 0
384
+            dict['shadow_on'] = 0  
385
+            #bge.render.setGLSLMaterialSetting("shadows", 0)                
386
+
387
+            
388
+                     
366
         
389
         
367
     if funct == 'sun strength':
390
     if funct == 'sun strength':
368
         b = cam['sun_strength']
391
         b = cam['sun_strength']
496
             dict['load_timer'] = load_timer
519
             dict['load_timer'] = load_timer
497
             dict['reload_timer'] = 250
520
             dict['reload_timer'] = 250
498
             dict['overlay_fadein'] = 1  
521
             dict['overlay_fadein'] = 1  
522
+                                         
523
+                                         
524
+#'1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen'                            
525
+    if funct == '1920x1080':
526
+        #pass
527
+        if motion == 'inc':
528
+            dict['resx'] = 1920
529
+            dict['resy'] = 1080
530
+            Settings.writeSettings()
531
+            bge.render.setWindowSize(1920, 1080)
532
+#            if dict['fullscreen_on'] == 1:
533
+#                bge.render.setFullScreen(True)  
534
+#            else:
535
+#                bge.render.setFullScreen(False)              
536
+    if funct == '1280x720':
537
+        if motion == 'inc':
538
+            dict['resx'] = 1280
539
+            dict['resy'] = 720
540
+            Settings.writeSettings()
541
+            bge.render.setWindowSize(1280, 720)
542
+#            if dict['fullscreen_on'] == 1:
543
+#                bge.render.setFullScreen(True)  
544
+#            else:
545
+#                bge.render.setFullScreen(False)              
546
+    if funct == '1024x768':
547
+        if motion == 'inc':
548
+            dict['resx'] = 1024
549
+            dict['resy'] = 768
550
+            Settings.writeSettings()
551
+            bge.render.setWindowSize(1024, 768)
552
+#            if dict['fullscreen_on'] == 1:
553
+#                bge.render.setFullScreen(True)  
554
+#            else:
555
+#                bge.render.setFullScreen(False)              
556
+    if funct == '800x600':
557
+        if motion == 'inc':
558
+            dict['resx'] = 800
559
+            dict['resy'] = 600
560
+  
561
+            Settings.writeSettings()
562
+            bge.render.setWindowSize(800, 600)
563
+#            if dict['fullscreen_on'] == 1:
564
+#                bge.render.setFullScreen(True)  
565
+#            else:
566
+#                bge.render.setFullScreen(False)                
567
+    if funct == 'fullscreen':
568
+        if motion == 'inc':            
569
+            dict['fullscreen_on'] = 1
570
+            bge.render.setFullScreen(True)
571
+            Settings.writeSettings()
572
+        else:
573
+            dict['fullscreen_on'] = 0   
574
+            bge.render.setFullScreen(False)
575
+            Settings.writeSettings()
576
+                            
499
                                                                                     
577
                                                                                     
500
 
578
 
501
 #=======
579
 #=======
511
     if dict['mlevel'] == 1:
589
     if dict['mlevel'] == 1:
512
         if dict['lv0_opt'] == 'settings':
590
         if dict['lv0_opt'] == 'settings':
513
         #if opt == 'settings':
591
         #if opt == 'settings':
514
-            dict['current_list'] = ['graphics', 'player', 'level', 'camera', 'physics']
592
+            dict['current_list'] = ['resolution', 'graphics', 'player', 'level', 'camera', 'physics']
515
         if dict['lv0_opt'] == 'replay':
593
         if dict['lv0_opt'] == 'replay':
516
             dict['current_list'] = ['enter replay', 'recorder on', 'record length'] 
594
             dict['current_list'] = ['enter replay', 'recorder on', 'record length'] 
517
         if dict['lv0_opt'] == 'level':
595
         if dict['lv0_opt'] == 'level':
518
-            dict['current_list'] = ['Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse']     
596
+            dict['current_list'] = ['Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse']  
597
+            
598
+    if dict['mlevel'] == 2:
599
+        if dict['lv1_opt'] == 'resolution':
600
+        #if opt == 'settings':
601
+            dict['current_list'] = ['1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen']               
519
     if dict['mlevel'] == 2:
602
     if dict['mlevel'] == 2:
520
         if dict['lv1_opt'] == 'graphics':
603
         if dict['lv1_opt'] == 'graphics':
521
         #if opt == 'settings':
604
         #if opt == 'settings':
522
-            dict['current_list'] = ['brightness / contrast', 'ao', 'hdr', 'dof']
605
+            dict['current_list'] = ['brightness / contrast', 'ao', 'hdr', 'dof', 'bloom']
523
     if dict['mlevel'] == 2:
606
     if dict['mlevel'] == 2:
524
         if dict['lv1_opt'] == 'player':
607
         if dict['lv1_opt'] == 'player':
525
         #if opt == 'settings':
608
         #if opt == 'settings':
539
         if dict['lv2_opt'] == 'hdr':
622
         if dict['lv2_opt'] == 'hdr':
540
             dict['current_list'] = ['hdr on', 'avgL', 'hdr strength']
623
             dict['current_list'] = ['hdr on', 'avgL', 'hdr strength']
541
         if dict['lv2_opt'] == 'dof':
624
         if dict['lv2_opt'] == 'dof':
542
-            dict['current_list'] = ['dof on']    
625
+            dict['current_list'] = ['dof on']  
626
+        if dict['lv2_opt'] == 'bloom':
627
+            dict['current_list'] = ['bloom on']                
543
 
628
 
544
 def get_inputs(dict, cont):
629
 def get_inputs(dict, cont):
545
     #opt = dict['current_list'][dict['current_index']]
630
     #opt = dict['current_list'][dict['current_index']]
634
                                        
719
                                        
635
 
720
 
636
 def init(own, dict):
721
 def init(own, dict):
637
-    print('initing')
722
+    #print('initing')
638
     own['inited'] = True
723
     own['inited'] = True
639
     dict['lv0_opt'] = 0
724
     dict['lv0_opt'] = 0
640
     dict['lv0_index'] = 0
725
     dict['lv0_index'] = 0
649
     dict['mlevel'] = 0
734
     dict['mlevel'] = 0
650
     dict['current_opt'] = ''
735
     dict['current_opt'] = ''
651
     dict['pause_menu_text'] = ''
736
     dict['pause_menu_text'] = ''
652
-    dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength', 'Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse']
737
+    dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength', 'Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse', '1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen', 'bloom on']
653
     
738
     
654
 def output(dict):
739
 def output(dict):
655
     try:
740
     try:
656
         opt = dict['current_list'][dict['current_index']]
741
         opt = dict['current_list'][dict['current_index']]
657
     except:
742
     except:
658
-        print('broken!!', dict['current_list'], dict['current_index'])    
743
+        pass
744
+        #print('broken!!', dict['current_list'], dict['current_index'])    
659
     dict['current_opt'] = opt
745
     dict['current_opt'] = opt
660
     #print(dict['lv1_index'], 'level: ', dict['mlevel'], dict['lv0_opt'], dict['current_index'], dict['current_list'], dict['current_opt'])    
746
     #print(dict['lv1_index'], 'level: ', dict['mlevel'], dict['lv0_opt'], dict['current_index'], dict['current_list'], dict['current_opt'])    
661
     outp = 'menu > '
747
     outp = 'menu > '
674
         #print('adding end point value')
760
         #print('adding end point value')
675
         if dict['current_opt'] == 'shirt color r':
761
         if dict['current_opt'] == 'shirt color r':
676
             outp = outp + ': ' + str(dict['shirt_color_r'])
762
             outp = outp + ': ' + str(dict['shirt_color_r'])
677
-            print(outp + ': ' + str(dict['shirt_color_r']))
763
+            #print(outp + ': ' + str(dict['shirt_color_r']))
678
         if dict['current_opt'] == 'shirt color g':
764
         if dict['current_opt'] == 'shirt color g':
679
             outp = outp + ': ' + str(dict['shirt_color_g'])
765
             outp = outp + ': ' + str(dict['shirt_color_g'])
680
         if dict['current_opt'] == 'shirt color b':
766
         if dict['current_opt'] == 'shirt color b':
682
             
768
             
683
         if dict['current_opt'] == 'shoe color r':
769
         if dict['current_opt'] == 'shoe color r':
684
             outp = outp + ': ' + str(dict['shoe_color_r'])
770
             outp = outp + ': ' + str(dict['shoe_color_r'])
685
-            print(outp + ': ' + str(dict['shoe_color_r']))
771
+            #print(outp + ': ' + str(dict['shoe_color_r']))
686
         if dict['current_opt'] == 'shoe color g':
772
         if dict['current_opt'] == 'shoe color g':
687
             outp = outp + ': ' + str(dict['shoe_color_g'])
773
             outp = outp + ': ' + str(dict['shoe_color_g'])
688
         if dict['current_opt'] == 'shoe color b':
774
         if dict['current_opt'] == 'shoe color b':
689
             outp = outp + ': ' + str(dict['shoe_color_b'])      
775
             outp = outp + ': ' + str(dict['shoe_color_b'])      
690
         if dict['current_opt'] == 'deck color r':
776
         if dict['current_opt'] == 'deck color r':
691
             outp = outp + ': ' + str(dict['deck_color_r'])
777
             outp = outp + ': ' + str(dict['deck_color_r'])
692
-            print(outp + ': ' + str(dict['deck_color_r']))
778
+            #print(outp + ': ' + str(dict['deck_color_r']))
693
         if dict['current_opt'] == 'deck color g':
779
         if dict['current_opt'] == 'deck color g':
694
             outp = outp + ': ' + str(dict['deck_color_g'])
780
             outp = outp + ': ' + str(dict['deck_color_g'])
695
         if dict['current_opt'] == 'deck color b':
781
         if dict['current_opt'] == 'deck color b':
734
         if dict['current_opt'] ==  'sun rot y':
820
         if dict['current_opt'] ==  'sun rot y':
735
             outp = outp + ': ' + str(dict['sun_rot_y'])                
821
             outp = outp + ': ' + str(dict['sun_rot_y'])                
736
         if dict['current_opt'] ==  'shadow on':
822
         if dict['current_opt'] ==  'shadow on':
737
-            outp = outp + ': ' + str(dict['shadow_on'])  
823
+            #outp = outp + ': ' + str(dict['shadow_on']) 
824
+            outp = outp + ': (not available)'  
738
         if dict['current_opt'] ==  'ambient strength':
825
         if dict['current_opt'] ==  'ambient strength':
739
-            outp = outp + ': ' + str(dict['ambient_strength'])                          
826
+            outp = outp + ': ' + str(dict['ambient_strength'])   
827
+        if dict['current_opt'] ==  'fullscreen':
828
+            outp = outp + ': ' + str(dict['fullscreen_on'])  
829
+        if dict['current_opt'] ==  'bloom on':
830
+            outp = outp + ': ' + str(dict['bloom_on'])                                                 
740
             
831
             
741
     dict['pause_menu_text'] = outp
832
     dict['pause_menu_text'] = outp
742
 def main(cont):
833
 def main(cont):

+ 39
- 24
scene_init.py View File

42
         brightness = 2.6
42
         brightness = 2.6
43
         cam['BC_BRIGHTNESS'] = 1.3
43
         cam['BC_BRIGHTNESS'] = 1.3
44
         cam['BC_CONTRAST'] = 1.5
44
         cam['BC_CONTRAST'] = 1.5
45
-    elif level == 'lot':
46
-        brightness = 2.6
47
-        cam['BC_BRIGHTNESS'] = 1
48
-        cam['BC_CONTRAST'] = 1   
49
-        #main.world.zenithColor = [1.0, .9, .975, 0]
50
-        #main.world.horizonColor = [.42, .555, .823, 0] 
51
-        curscene.world.zenithColor = [1.0, .9, .975, 0]
52
-        curscene.world.horizonColor = [.42, .555, .823, 0]                 
53
-        print("sadfasdfsdfasdfasdfasdfasdfasdf")
45
+#    elif level == 'lot':
46
+#        brightness = 2.6
47
+#        cam['BC_BRIGHTNESS'] = 1
48
+#        cam['BC_CONTRAST'] = 1   
49
+#        #main.world.zenithColor = [1.0, .9, .975, 0]
50
+#        #main.world.horizonColor = [.42, .555, .823, 0] 
51
+#        curscene.world.zenithColor = [1.0, .9, .975, 0]
52
+#        curscene.world.horizonColor = [.42, .555, .823, 0]                 
53
+        #print("sadfasdfsdfasdfasdfasdfasdfasdf")
54
     elif level == 'spine':
54
     elif level == 'spine':
55
         brightness = 2.6
55
         brightness = 2.6
56
         cam['BC_BRIGHTNESS'] = .85
56
         cam['BC_BRIGHTNESS'] = .85
78
         #main.mistStart = 1
78
         #main.mistStart = 1
79
         #main.mistDistance = 5 
79
         #main.mistDistance = 5 
80
         
80
         
81
-    elif level == 'j_scene':
82
-        print('setting color of', curscene)
83
-        main.world.zenithColor = [1.0, .9, .975, 0]
84
-        main.world.horizonColor = [.42, .555, .823, 0]  
85
-        cam['BC_BRIGHTNESS'] = 1.35
86
-        cam['BC_CONTRAST'] = 1.3 
87
-        cam['avgL'] = .6
88
-        cam['HDRamount'] = .45                 
81
+#    elif level == 'j_scene':
82
+#        print('setting color of', curscene)
83
+#        main.world.zenithColor = [1.0, .9, .975, 0]
84
+#        main.world.horizonColor = [.42, .555, .823, 0]  
85
+#        cam['BC_BRIGHTNESS'] = 1.35
86
+#        cam['BC_CONTRAST'] = 1.3 
87
+#        cam['avgL'] = .6
88
+#        cam['HDRamount'] = .45                 
89
         #main.mistEnable = True
89
         #main.mistEnable = True
90
         #main.mistIntensity = .9
90
         #main.mistIntensity = .9
91
         #main.mistStart = 1
91
         #main.mistStart = 1
92
         #main.mistDistance = 5                
92
         #main.mistDistance = 5                
93
-    else:
94
-        cam['BC_BRIGHTNESS'] = dict['BC_BRIGHTNESS'] 
95
-        cam['BC_CONTRAST'] = dict['BC_CONTRAST']
96
-        cam['bc'] = dict['bc']         
97
-        main.world.zenithColor = [1.0, .9, .975, 0]
98
-        main.world.horizonColor = [.42, .555, .823, 0] 
93
+#    else:
94
+#        cam['BC_BRIGHTNESS'] = dict['BC_BRIGHTNESS'] 
95
+#        cam['BC_CONTRAST'] = dict['BC_CONTRAST']
96
+#        cam['bc'] = dict['bc']         
97
+        #main.world.zenithColor = [1.0, .9, .975, 0]
98
+        #main.world.horizonColor = [.42, .555, .823, 0] 
99
         #main.mistEnable = False        
99
         #main.mistEnable = False        
100
     if dict['bc'] == 1:
100
     if dict['bc'] == 1:
101
         cont.activate(cam.actuators["bc"])
101
         cont.activate(cam.actuators["bc"])
119
 
119
 
120
     else:
120
     else:
121
         cont.activate(cam.actuators["DOF_off"])
121
         cont.activate(cam.actuators["DOF_off"])
122
+        
123
+    if dict['bloom_on'] == 1:
124
+        cont.activate(cam.actuators["Bloom"])
125
+
126
+    else:
127
+        cont.activate(cam.actuators["bloom_off"])
128
+        
129
+#    print(dict['shadow_on'], 'shadow_on')    
130
+#    if dict['shadow_on'] == 1:
131
+#        bge.render.setGLSLMaterialSetting("shadows", 1) 
132
+#    else:
133
+#        bge.render.setGLSLMaterialSetting("shadows", 0)         
134
+        
122
     scene.world.envLightEnergy = dict['ambient_strength']   
135
     scene.world.envLightEnergy = dict['ambient_strength']   
123
     
136
     
124
     cam['BC_BRIGHTNESS'] = dict['BC_BRIGHTNESS'] 
137
     cam['BC_BRIGHTNESS'] = dict['BC_BRIGHTNESS'] 
135
     cam['sun_strength'] = dict['sun_strength']
148
     cam['sun_strength'] = dict['sun_strength']
136
     cam['sun_pos_x'] = dict['sun_rot_x']
149
     cam['sun_pos_x'] = dict['sun_rot_x']
137
     cam['sun_pos_y'] = dict['sun_rot_y']
150
     cam['sun_pos_y'] = dict['sun_rot_y']
138
-    cam['shadow_on'] = dict['shadow_on']    
151
+    #cam['shadow_on'] = dict['shadow_on']
152
+    cam['dof_on'] = dict['dof_on']
153
+    cam['bloom_on'] = dict['bloom_on']    
139
            
154
            
140
 main()
155
 main()

Loading…
Cancel
Save