steering_behaviors 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog for steering-behaviors
2
2
 
3
+ ## 1.0.7, 12 August 2013
4
+ * Fix embarrassing bug (left 'puts' statements uncommented in prior release)
5
+
3
6
  ## 1.0.6, 11 August 2013
4
7
  * Refined 'separate' to employ forwardness as part of its calculation.
5
8
 
@@ -35,21 +35,21 @@ class SteeringBehaviors::Separation
35
35
 
36
36
  if parallelness < -0.707
37
37
  # anti-parallel, head-on paths; steer away from the threat's future pos
38
- puts "Head-on, steering away from future pos"
38
+ # puts "Head-on, steering away from future pos"
39
39
  offset_vec = other_pos_at_cpa - character_kinematic.position_vec
40
40
  side_dot = offset_vec.dot(side_vec)
41
41
  elsif parallelness > 0.707
42
42
  # parallel paths; steer away from threat
43
- puts "Parallel, steering away from other guy"
43
+ # puts "Parallel, steering away from other guy"
44
44
  side_dot = offset_vec.dot(side_vec)
45
45
  else
46
46
  # perpendicular paths; steer behind threat
47
47
  side_dot = other_kinematic.velocity_vec.dot(side_vec)
48
48
  if forwardness < 0.707
49
- puts "Perpendicular, steering ahead of other guy"
49
+ # puts "Perpendicular, steering ahead of other guy"
50
50
  side_dot *= -1
51
51
  else
52
- puts "Perpendicular, steering behind other guy"
52
+ # puts "Perpendicular, steering behind other guy"
53
53
  end
54
54
  end
55
55
 
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: steering_behaviors
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.6
5
+ version: 1.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Chris Powell
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-11 00:00:00.000000000 Z
12
+ date: 2013-08-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: |
15
15
  If you're building a game, you need your game agents and characters to move on their own. A standard way of doing this is with 'steering behaviors'. The seminal paper by Craig Reynolds established a core set of steering behaviors that could be utilized for a variety of common movement tasks and natural behaviors. This Ruby library can accomplish many/most of those tasks for your Ruby / JRuby game. The basic behaviors can be layered for more complicated and advanced behaviors, such as flocking and crowd movement.