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

+ 55
- 20
Settings.py View File

@@ -39,8 +39,8 @@ def readSettings():
39 39
     own["profile"] = int(data[12])
40 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 44
     level = data[5]
45 45
     level = level.split(None, 1)[0]
46 46
     level = str(level)
@@ -77,8 +77,10 @@ def readSettings():
77 77
     dict['sun_strength'] = float(data[45])
78 78
     dict['sun_rot_x'] = float(data[46])
79 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,8 +105,8 @@ def writeSettings():
103 105
         writing.write(str("//level (e.g. spine, city, city2)")+"\n")
104 106
         writing.write(str(own["level"])+"\n")
105 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 110
         writing.write(str("//show framerate")+"\n")
109 111
         writing.write(str(own["framerate"])+"\n")
110 112
         writing.write(str("//show profile")+"\n")
@@ -145,16 +147,41 @@ def writeSettings():
145 147
         writing.write(str(dict["sun_rot_x"])+"\n")                           
146 148
         writing.write(str(dict["sun_rot_y"])+"\n")                           
147 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 158
         #writing.write(str(own["framerate"])+"\n")
156 159
         print("writing settings")
157 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 186
 def loadlevel():
160 187
     import GameLogic
@@ -165,17 +192,25 @@ def loadlevel():
165 192
     cont = GameLogic.getCurrentController()
166 193
     own2 = cont.owner
167 194
     #readSettings()
168
-    resx = own["resx"]
169
-    resy = own["resy"]
195
+
170 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 214
     #objList = scene.objects
180 215
     if own["framerate"] == 1:    
181 216
         bge.render.showFramerate(1)

+ 17
- 16
co_ActionState.py View File

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

+ 27
- 26
controller2.py View File

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

+ 5
- 4
grindV2.py View File

@@ -479,7 +479,8 @@ def main():
479 479
             
480 480
     
481 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 484
     #print(grindold, "grindold")        
484 485
     if grindDar.positive:
485 486
         detectedObjects = grindDar.hitObjectList
@@ -500,7 +501,7 @@ def main():
500 501
             own['inverting'] = False
501 502
         grind_dist = .8#.6
502 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 505
             npos = nearestObject.worldPosition
505 506
             
506 507
             
@@ -515,9 +516,9 @@ def main():
515 516
                     if hitNormal != None:
516 517
                         stre = .05
517 518
                         own.alignAxisToVect(hitNormal, 2, stre) 
518
-                        print("align")                   
519
+                        #print("align")                   
519 520
                     own.worldPosition = [nearpos.x, nearpos.y, nearpos.z + .2975]
520
-                    print('moving world')
521
+                    #print('moving world')
521 522
 
522 523
 
523 524
             #print("grinding")

+ 2
- 2
inputs.py View File

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

+ 109
- 18
menuV3.py View File

@@ -6,7 +6,7 @@ JUST_ACTIVATED = bge.logic.KX_INPUT_JUST_ACTIVATED
6 6
 #exit functions
7 7
 #=======
8 8
 def endpoint(funct, motion, dict, cont):
9
-    print('endpoint', funct,motion)
9
+    #print('endpoint', funct,motion)
10 10
     scene = bge.logic.getCurrentScene()
11 11
     
12 12
     scenes = bge.logic.getSceneList()
@@ -24,10 +24,10 @@ def endpoint(funct, motion, dict, cont):
24 24
     cam = scene.objects['Camera.003']       
25 25
     c_move = .025 #color move amount  
26 26
     if funct == 'exit':
27
-        print("exit function", motion)
27
+        #print("exit function", motion)
28 28
         bge.logic.endGame()
29 29
     if funct == 'restart':
30
-        print("restart function", motion)  
30
+        #print("restart function", motion)  
31 31
         bge.logic.restartGame()      
32 32
     if funct == 'shirt color r':
33 33
         s_color = shirt.color
@@ -83,7 +83,7 @@ def endpoint(funct, motion, dict, cont):
83 83
                 s_color_b = 0          
84 84
         new_col = [s_color[0], s_color[1], s_color_b, s_color[3]]
85 85
         shirt.color = new_col   
86
-        print(new_col)          
86
+        #print(new_col)          
87 87
         dict['shirt_color_b'] = new_col[2]
88 88
         
89 89
         
@@ -146,7 +146,7 @@ def endpoint(funct, motion, dict, cont):
146 146
         new_col = [s_color[0], s_color[1], s_color_b, s_color[3]]
147 147
         shoeL.color = new_col   
148 148
         shoeR.color = new_col
149
-        print(new_col)          
149
+        #print(new_col)          
150 150
         dict['shoe_color_b'] = new_col[2]     
151 151
         
152 152
         
@@ -207,7 +207,7 @@ def endpoint(funct, motion, dict, cont):
207 207
         new_col = [s_color[0], s_color[1], s_color_b, s_color[3]]
208 208
         deck.color = new_col   
209 209
         throw_deck.color = new_col
210
-        print(new_col)          
210
+        #print(new_col)          
211 211
         dict['deck_color_b'] = new_col[2]  
212 212
         
213 213
     if funct == 'shirt logo':
@@ -363,6 +363,29 @@ def endpoint(funct, motion, dict, cont):
363 363
             cam['dof_on'] = 0
364 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 390
     if funct == 'sun strength':
368 391
         b = cam['sun_strength']
@@ -496,6 +519,61 @@ def endpoint(funct, motion, dict, cont):
496 519
             dict['load_timer'] = load_timer
497 520
             dict['reload_timer'] = 250
498 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,15 +589,20 @@ def get_c_list(dict):
511 589
     if dict['mlevel'] == 1:
512 590
         if dict['lv0_opt'] == 'settings':
513 591
         #if opt == 'settings':
514
-            dict['current_list'] = ['graphics', 'player', 'level', 'camera', 'physics']
592
+            dict['current_list'] = ['resolution', 'graphics', 'player', 'level', 'camera', 'physics']
515 593
         if dict['lv0_opt'] == 'replay':
516 594
             dict['current_list'] = ['enter replay', 'recorder on', 'record length'] 
517 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 602
     if dict['mlevel'] == 2:
520 603
         if dict['lv1_opt'] == 'graphics':
521 604
         #if opt == 'settings':
522
-            dict['current_list'] = ['brightness / contrast', 'ao', 'hdr', 'dof']
605
+            dict['current_list'] = ['brightness / contrast', 'ao', 'hdr', 'dof', 'bloom']
523 606
     if dict['mlevel'] == 2:
524 607
         if dict['lv1_opt'] == 'player':
525 608
         #if opt == 'settings':
@@ -539,7 +622,9 @@ def get_c_list(dict):
539 622
         if dict['lv2_opt'] == 'hdr':
540 623
             dict['current_list'] = ['hdr on', 'avgL', 'hdr strength']
541 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 629
 def get_inputs(dict, cont):
545 630
     #opt = dict['current_list'][dict['current_index']]
@@ -634,7 +719,7 @@ def get_inputs(dict, cont):
634 719
                                        
635 720
 
636 721
 def init(own, dict):
637
-    print('initing')
722
+    #print('initing')
638 723
     own['inited'] = True
639 724
     dict['lv0_opt'] = 0
640 725
     dict['lv0_index'] = 0
@@ -649,13 +734,14 @@ def init(own, dict):
649 734
     dict['mlevel'] = 0
650 735
     dict['current_opt'] = ''
651 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 739
 def output(dict):
655 740
     try:
656 741
         opt = dict['current_list'][dict['current_index']]
657 742
     except:
658
-        print('broken!!', dict['current_list'], dict['current_index'])    
743
+        pass
744
+        #print('broken!!', dict['current_list'], dict['current_index'])    
659 745
     dict['current_opt'] = opt
660 746
     #print(dict['lv1_index'], 'level: ', dict['mlevel'], dict['lv0_opt'], dict['current_index'], dict['current_list'], dict['current_opt'])    
661 747
     outp = 'menu > '
@@ -674,7 +760,7 @@ def output(dict):
674 760
         #print('adding end point value')
675 761
         if dict['current_opt'] == 'shirt color r':
676 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 764
         if dict['current_opt'] == 'shirt color g':
679 765
             outp = outp + ': ' + str(dict['shirt_color_g'])
680 766
         if dict['current_opt'] == 'shirt color b':
@@ -682,14 +768,14 @@ def output(dict):
682 768
             
683 769
         if dict['current_opt'] == 'shoe color r':
684 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 772
         if dict['current_opt'] == 'shoe color g':
687 773
             outp = outp + ': ' + str(dict['shoe_color_g'])
688 774
         if dict['current_opt'] == 'shoe color b':
689 775
             outp = outp + ': ' + str(dict['shoe_color_b'])      
690 776
         if dict['current_opt'] == 'deck color r':
691 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 779
         if dict['current_opt'] == 'deck color g':
694 780
             outp = outp + ': ' + str(dict['deck_color_g'])
695 781
         if dict['current_opt'] == 'deck color b':
@@ -734,9 +820,14 @@ def output(dict):
734 820
         if dict['current_opt'] ==  'sun rot y':
735 821
             outp = outp + ': ' + str(dict['sun_rot_y'])                
736 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 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 832
     dict['pause_menu_text'] = outp
742 833
 def main(cont):

+ 39
- 24
scene_init.py View File

@@ -42,15 +42,15 @@ def main():
42 42
         brightness = 2.6
43 43
         cam['BC_BRIGHTNESS'] = 1.3
44 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 54
     elif level == 'spine':
55 55
         brightness = 2.6
56 56
         cam['BC_BRIGHTNESS'] = .85
@@ -78,24 +78,24 @@ def main():
78 78
         #main.mistStart = 1
79 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 89
         #main.mistEnable = True
90 90
         #main.mistIntensity = .9
91 91
         #main.mistStart = 1
92 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 99
         #main.mistEnable = False        
100 100
     if dict['bc'] == 1:
101 101
         cont.activate(cam.actuators["bc"])
@@ -119,6 +119,19 @@ def main():
119 119
 
120 120
     else:
121 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 135
     scene.world.envLightEnergy = dict['ambient_strength']   
123 136
     
124 137
     cam['BC_BRIGHTNESS'] = dict['BC_BRIGHTNESS'] 
@@ -135,6 +148,8 @@ def main():
135 148
     cam['sun_strength'] = dict['sun_strength']
136 149
     cam['sun_pos_x'] = dict['sun_rot_x']
137 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 155
 main()

Loading…
Cancel
Save