Skip to content

Commit

Permalink
Modified perlinnoise properties
Browse files Browse the repository at this point in the history
  • Loading branch information
onedayitwillmake committed May 10, 2011
1 parent e98a5f8 commit 71874f7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/BubbleDots/BubbleDotsConstants.js
Expand Up @@ -19,7 +19,7 @@ Version:
ENTITY_DEFAULT_RADIUS : 8,
GAME_WIDTH : 700,
GAME_HEIGHT : 450,
MAX_CIRCLES : 50,
MAX_CIRCLES : 100,
GAME_DURATION : 1000*300,

ENTITY_TYPES: {
Expand Down
4 changes: 4 additions & 0 deletions js/BubbleDots/README.md
@@ -0,0 +1,4 @@
__BubbleDots is full game created with RealtimeMultiplayerNode.js framework (in progress)__

## Development Screenshots
[![BubbleDots](http://farm3.static.flickr.com/2188/5706069624_996b00cdae.jpg)](http://farm3.static.flickr.com/2188/5706069624_996b00cdae.jpg)
3 changes: 2 additions & 1 deletion js/BubbleDots/traits/FoodTrait.js
Expand Up @@ -21,14 +21,15 @@ Abstract:
displayName : "FoodTrait", // Unique string name for this Trait
originalColor : "00FF00",
color : "00FF00",
radius : 10,

/**
* @inheritDoc
*/
attach: function(anEntity) {
BubbleDots.traits.FoodTrait.superclass.attach.call(this, anEntity);
// this.intercept(['onCollision', 'color', 'originalColor']);
this.intercept(['onCollision']);
this.intercept(['onCollision', 'radius']);
},

/**
Expand Down
2 changes: 1 addition & 1 deletion js/BubbleDots/traits/PerlinNoiseTrait.js
Expand Up @@ -38,7 +38,7 @@ Abstract:
trait.noiseOffset+=0.005;

// Modify velocity using perlin noise
var theta = 0.008;
var theta = 0.007;
var noise = RealtimeMultiplayerGame.model.noise(this.position.x*theta, this.position.y*theta, trait.noiseOffset);
var angle = noise*12;
var speed = 0.2;
Expand Down
3 changes: 2 additions & 1 deletion js/BubbleDots/traits/PoisonTrait.js
Expand Up @@ -21,14 +21,15 @@ Abstract:
displayName : "PoisonTrait", // Unique string name for this Trait
originalColor : "FF0000",
color : "FF0000",
radius : 6,

/**
* @inheritDoc
*/
attach: function(anEntity) {
BubbleDots.traits.PoisonTrait.superclass.attach.call(this, anEntity);
this.intercept(['onCollision']);
this.intercept(['onCollision', 'color', 'originalColor']);
this.intercept(['onCollision', 'color', 'originalColor', 'radius']);
},

/**
Expand Down

0 comments on commit 71874f7

Please sign in to comment.