Browse Source

packing texturess

shuvit 1 week ago
parent
commit
5dbc90e376

+ 2
- 2
assets/kits/base_kit.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:6aa0a25cf625aaeeffa308ecaa3fa078f6922ac1dc19894c02738e3e03d97473
3
-size 4693592
2
+oid sha256:68fe622a33bdc8fb14f8f03a56f70c4ea59b9044840747320cf86b0c6dabb587
3
+size 20176896

+ 2
- 2
assets/legde_b.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:87f103e80a463bea577381582e42fb64ae46ea45daf7b0c7d49215ec7351f3f5
3
-size 842508
2
+oid sha256:ff1592096acd61ef1af43f8142e66fd29b5a598e0e20126f63a9adc42dd2a69e
3
+size 5728684

+ 3
- 0
assets/user2 - Copy.blend View File

@@ -0,0 +1,3 @@
1
+version https://git-lfs.github.com/spec/v1
2
+oid sha256:41a8500207af6cd437469716a3fd8bd2bd1d19d6cdc054a60cb81f6d9bee0b17
3
+size 1005324

+ 2
- 2
config.ini View File

@@ -121,7 +121,7 @@ FXAA_SPAN_MAX = 8.0
121 121
 sun_strength = 1.0
122 122
 ambient_strength = 0.68
123 123
 sun_rot_x = -0.05
124
-sun_rot_y = -0.05
124
+sun_rot_y = 0.05
125 125
 shadow_on = 0
126 126
 #------------
127 127
 
@@ -149,4 +149,4 @@ grass_mult = 0.98
149 149
 ylimit = 0.84
150 150
 antibounce = -10.0
151 151
 gravity = -10.5
152
-fall_height = .4
152
+fall_height = 0.4

+ 2
- 2
npc_walkers/larry.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:211bd7f82fe6cfae047a74eb0d35503752b73fb8ace4b291389f24a2ac33ce7a
3
-size 3686800
2
+oid sha256:57e3bad63d8cfe5f046b442c98e8b04f4b0444d478716f5efc2f07a6f84cda36
3
+size 3686456

BIN
scripts/__pycache__/controller2.cpython-36.pyc View File


+ 1
- 7
scripts/walker_load.py View File

@@ -1,11 +1,5 @@
1 1
 import bge
2 2
 
3
-
4
-
5
-
6
-
7
-
8
-
9 3
 def main(cont):
10 4
     own = cont.owner
11 5
     scene = bge.logic.getCurrentScene()
@@ -18,7 +12,7 @@ def main(cont):
18 12
     
19 13
     path = bge.logic.expandPath(fileName)
20 14
     try:
21
-        bge.logic.LibLoad(path, 'Scene',  load_actions=True,) 
15
+        bge.logic.LibLoad(path, 'Scene',  load_actions=True) 
22 16
         print(skater, 'loaded')
23 17
     except:
24 18
         print('trying to load', fileName, 'twice')    

+ 74
- 35
scripts/walker_states.py View File

@@ -45,11 +45,16 @@ class Target1(State):
45 45
 		self.scene = bge.logic.getCurrentScene()
46 46
 		self.actu = self.cont.actuators['Steering']
47 47
 
48
+		nm = self.own['navMesh']
49
+		pt = nm.findPath(self.own.worldPosition, self.scene.objects[self.target].worldPosition)
50
+		print('path is', pt)		
51
+
48 52
 		if 'larryTarget' in self.scene.objects:
49 53
 				self.actu.target = self.target			
50 54
 				self.actu.velocity = 1.5
51
-				self.actu.turnspeed = 100
52
-				self.actu.facingMode = True
55
+				self.actu.turnspeed = 20
56
+				self.actu.facingMode = False
57
+				self.actu.navmesh = self.own['navMesh']
53 58
 				self.cont.activate(self.actu)
54 59
 
55 60
 		super(Target1, self).Enter()
@@ -57,9 +62,9 @@ class Target1(State):
57 62
 	def Execute(self):
58 63
 		#print('Tracking target 1.', self.FSM.stateLife)
59 64
 		self.FSM.stateLife += 1
60
-		duration = 1000
65
+		duration = 500
61 66
 		if self.FSM.stateLife > duration:
62
-			num = randint(1,3)
67
+			num = randint(1,2)
63 68
 			if num == 1:
64 69
 				self.FSM.ToTransition('toTarget2')
65 70
 			elif num ==2:
@@ -90,10 +95,11 @@ class Target2(State):
90 95
 
91 96
 		if 'larryTarget.001' in self.scene.objects:
92 97
 				self.actu.target = self.target			
93
-				self.actu.velocity = 1.5
94
-				self.actu.turnspeed = 100
95
-				self.actu.facingMode = True
96
-				self.cont.activate(self.actu)
98
+				#self.actu.velocity = 1.5
99
+				#self.actu.turnspeed = 20
100
+				#self.actu.facingMode = False
101
+				#self.actu.navmesh = self.own['navMesh']
102
+				#self.cont.activate(self.actu)
97 103
 
98 104
 		super(Target2, self).Enter()
99 105
 		
@@ -134,28 +140,28 @@ class Target3(State):
134 140
 
135 141
 		if 'larryTarget.002' in self.scene.objects:
136 142
 				self.actu.target = self.target			
137
-				self.actu.velocity = 1.5
138
-				self.actu.turnspeed = 100
139
-				self.actu.facingMode = True
143
+				#self.actu.velocity = 1.5
144
+				#self.actu.turnspeed = 20
145
+				#self.actu.facingMode = False
146
+				#self.actu.navmesh = self.own['navMesh']
140 147
 				self.cont.activate(self.actu)
141 148
 		super(Target3, self).Enter()
142 149
 
143 150
 		
144 151
 	def Execute(self):
145
-		#print('Vacumming.', self.FSM.stateLife)
146 152
 		self.FSM.stateLife += 1
147 153
 		duration = 1200
148 154
 		if self.FSM.stateLife > duration:
149 155
 			if not (randint(1,3) % 2):
150 156
 				self.FSM.ToTransition('toTarget1')
151 157
 			else:
152
-				self.FSM.ToTransition('toIdle')
158
+				self.FSM.ToTransition('toTarget2')
153 159
 		else:
154 160
 			cont = bge.logic.getCurrentController()
155 161
 			own = cont.owner
156 162
 			npcArm = own.children['npc']
157 163
 			npcArm.playAction('g_walk2', 1,62, layer=2, play_mode=0, speed=.5)		
158
-			#npcArm.playAction('npcImpatient', 2,135, layer=2, play_mode=0, speed=.25)	
164
+			
159 165
 
160 166
 	def Exit(self):
161 167
 		#print('Finished target 3') 
@@ -169,39 +175,59 @@ class Idle(State):
169 175
 		
170 176
 	def Enter(self):
171 177
 		#print('Starting to idle.')
172
-
173
-
174 178
 		self.cont = bge.logic.getCurrentController()
175
-		self.FSM.stateLife = 1
176 179
 		self.own = self.cont.owner
177 180
 		self.npcArm = self.own.children['npc']
181
+		self.FSM.stateLife = 1
178 182
 
179 183
 		super(Idle, self).Enter()
180 184
 		
181 185
 	def Execute(self):
182 186
 		#print('Idleing.', self.FSM.stateLife)
183 187
 		self.FSM.stateLife += 1
184
-		duration = 600
188
+		duration = 300
185 189
 		if self.FSM.stateLife > duration:
186
-			num = randint(1,4)
187
-			if num == 1:
188
-				self.FSM.ToTransition('toTarget1')
189
-			elif num == 2:
190
-				self.FSM.ToTransition('toTarget2')	
191
-			elif num == 3:
192
-				self.FSM.ToTransition('toTarget3')
193
-			elif num == 4 or num == 5 or num == 6:
194
-				self.FSM.ToTransition('toImpatient')										
195
-			else:
196
-				self.FSM.ToTransition('toIdle')
190
+			#num = randint(1,4)
191
+			self.FSM.ToTransition('toTarget1')
192
+			# if num == 1:
193
+			# 	self.FSM.ToTransition('toTarget1')
194
+			# elif num == 2:
195
+			# 	self.FSM.ToTransition('toTarget2')	
196
+			# elif num == 3:
197
+			# 	self.FSM.ToTransition('toTarget3')
198
+			# elif num == 4 or num == 5 or num == 6:
199
+			# 	self.FSM.ToTransition('toImpatient')										
200
+			# else:
201
+			# 	self.FSM.ToTransition('toIdle')
197 202
 		else:
198 203
 			#pass
204
+			#print(self.own.children)
199 205
 			self.npcArm.playAction('g_idle', 1,201, layer=2, play_mode=0, speed=.5)	
200 206
 			
201 207
 	def Exit(self):
202 208
 		pass
203 209
 		##print('Waking up from idle.') 
204 210
 
211
+
212
+class Startup(State):
213
+	
214
+	def __init__(self,FSM):
215
+		super(Startup, self).__init__(FSM)  
216
+		
217
+	def Enter(self):
218
+		self.FSM.stateLife = 1
219
+		super(Startup, self).Enter()
220
+		
221
+	def Execute(self):
222
+		self.FSM.stateLife += 1
223
+		duration = 4
224
+		if self.FSM.stateLife > duration:
225
+				self.FSM.ToTransition('toIdle')
226
+			
227
+	def Exit(self):
228
+		#pass
229
+		print('Exiting npc startup.') 		
230
+
205 231
 class Impatient(State):
206 232
 	
207 233
 	def __init__(self,FSM):
@@ -218,11 +244,12 @@ class Impatient(State):
218 244
 	def Execute(self):
219 245
 		##print('being Impatient.', self.FSM.stateLife)
220 246
 		self.FSM.stateLife += 1
221
-		duration = 600
247
+		duration = 300
222 248
 		if self.FSM.stateLife > duration:
223 249
 			self.FSM.ToTransition('toIdle')
224 250
 		else:
225
-			self.npcArm.playAction('npcImpatient', 1,201, layer=2, play_mode=0, speed=.5)	
251
+			pass
252
+			#self.npcArm.playAction('npcImpatient', 1,201, layer=2, play_mode=0, speed=.5)	
226 253
 			
227 254
 	def Exit(self):
228 255
 		pass
@@ -275,14 +302,15 @@ class Walker(Char):
275 302
 		#self.LightOn = own['state']
276 303
 		
277 304
 		##STATES
305
+		self.FSM.AddState("Startup", Startup(self.FSM))
278 306
 		self.FSM.AddState("Idle", Idle(self.FSM))
279
-		
280 307
 		self.FSM.AddState("Impatient", Impatient(self.FSM))
281 308
 		self.FSM.AddState('Target1', Target1(self.FSM))
282 309
 		self.FSM.AddState('Target3', Target3(self.FSM))
283 310
 		self.FSM.AddState('Target2', Target2(self.FSM))
284 311
 		
285 312
 		#TRANSITIONS
313
+		self.FSM.AddTransition('toStartup', Transition('Startup'))
286 314
 		self.FSM.AddTransition('toIdle', Transition('Idle'))
287 315
 		self.FSM.AddTransition('toImpatient', Transition('Impatient'))
288 316
 		self.FSM.AddTransition('toTarget3', Transition('Target3'))
@@ -291,7 +319,8 @@ class Walker(Char):
291 319
 		
292 320
 		
293 321
 		if self.FSM.curState == None:
294
-			self.FSM.SetState('Idle')
322
+			self.FSM.SetState('Startup')
323
+			#self.FSM.ToTransition('toIdle')
295 324
 			#print('setting none')
296 325
 	
297 326
 	def Execute(self):
@@ -305,6 +334,11 @@ def main(cont):
305 334
 		own['inited'] = True
306 335
 		own['frame'] = 0
307 336
 		own['state'] = 'On'
337
+		own['navMesh'] = None
338
+
339
+		for x in scene.objects:
340
+			if 'npcNavmesh' in x:
341
+				own['navMesh'] = x
308 342
 		#print('initing')
309 343
 
310 344
 	if own['frame'] == 40:
@@ -319,5 +353,10 @@ def main(cont):
319 353
 
320 354
 	r.Execute()    
321 355
 	##print(r.FSM.curState)
322
-	
323
-	own['frame'] += 1			
356
+
357
+
358
+	own['frame'] += 1
359
+	yvel = own.linearVelocity.y
360
+	yvel = yvel *.05
361
+	if own.linearVelocity.y > .01 or own.linearVelocity.y < -.01:
362
+		own.applyRotation([0,0,yvel], True)		

+ 2
- 2
shuvit.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:6ce5c15dce7d44d729cac00ff3d914ad1102691223ed5c67381a2a6f5e8bf8fb
3
-size 134865180
2
+oid sha256:22d6d2b78a49e1325076bd0e861d29f891514946c13b1acaaa6dc8d04327361e
3
+size 132993676

+ 3
- 0
shuvit_level2.blend View File

@@ -0,0 +1,3 @@
1
+version https://git-lfs.github.com/spec/v1
2
+oid sha256:30bf47627b76f959f8bf3639f197e60a222ac1af40c16eb4d0ed61e8a4d7917c
3
+size 134856404

+ 3
- 0
user2.blend View File

@@ -0,0 +1,3 @@
1
+version https://git-lfs.github.com/spec/v1
2
+oid sha256:1512c240c8ea344fbcea56084a06c661e88fa81b97748f3ad0aef0132512f7bd
3
+size 516676

+ 3
- 0
user3.blend View File

@@ -0,0 +1,3 @@
1
+version https://git-lfs.github.com/spec/v1
2
+oid sha256:45fe79c489ae25f94f763a5779f2b43a74857e4c276edcc3321e6d50f8de285f
3
+size 524416

Loading…
Cancel
Save