logo
468x60-2-495


  • Home
  • Privacy Policy
  • About
search
Jan 30, 2012 Posted on Jan 30, 2012 in Hints and Tips | 10 comments

Vector Regions: Hiding From a Field of View

This entry is part 2 of 2 in the series Vector Regions

Previously, we explored the approach of using vector regions to implement the field of view of a turret. Troops approached the turret on open field and no hindrances lay between them. Now suppose there is a hinderance, say a wall, that obscures the visibility of troop from turret; how should we implment that? This tutorial suggest an approach to tackle this issue.


Final Result Preview

Let’s take a look at the final result we will be working towards. Click on the turret at the bottom of the stage to start the simulation.


Step 1: The Basic Concept

Field of view of turret and attempts to obscure its view.

So here’s what we try to achieve in this tutorial. Observe the image above. The turret can see the trooper unit if it’s within turret’s field of view (top). Once we place a wall in between the turret and the trooper, the trooper’s visibility is shielded from turret.


Step 2: Recap

Troops within visible range.

First of all, let’s do a little revision. Say the vector of turret’s line of sight is P and the vector from turret to trooper is Q. The trooper is visible to the turret if:

  • Angle between P and Q is less than the angle of view (in this case 30° on both sides)
  • Magnitude of P is more than Q

Step 3: Approach Overview

A brief pseudo-code of the approach.

Above is the pseudo-code for the approach we shall undertake. Determining whether the trooper is within the turret’s field of view (FOV) is explained in Step 2. Now let’s get to determining whether the trooper is behind a wall.

We shall use vector operations to achieve this. I’m sure by the mention of this, the dot product and cross product quickly come to mind. We shall make a little detour to revise these two vector operations just to make sure everyone’s able to follow.


Step 4: Dot and Cross Product between Vectors

Dot and cross products of A & B

Let’s revisit the vector operations: dot product and cross product. This is not a Math class, and we have covered these in more detail before, but still, it’s good to refresh our memory on the workings so I’ve included the image above. The diagram shows “B dot A” operation (top right corner) and “B cross A” operation (bottom right corner).

More important are the equations of these operations. Take a look at the image below. |A| and |B| refer to the scalar magnitude of each vector – the length of the arrow. Note that the dot product relates to the cosine of the angle between the vectors, and the cross product relates to the sine of the angle between the vectors.

Formulas of dot and cross products

Step 5: Sine and Cosine

Drilling further into the topic, Trigonometry comes to play: the sine and cosine. Im sure these graphs rekindle fond memories (or agonies). Do click on the buttons on Flash presentation below to view those graphs with different units (degrees or radians).

Note that these wave forms are continuous and repetitive. For example, you can cut and paste the sine wave into the negative range to get something like below.

Two portions of sine wave.

Step 6: Summary of Values

Degree Sine of degree Cosine of degree
-180 0 -1
-90 -1 0
0 0 1
90 1 0
180 0 -1

The table above shows the cosine and sine values corresponding to specific degrees. You’ll notice the positive sine graph covers 0° to 180° range and positive cosine graph covers -90° to 90°. We shall relate these values to the dot product and cross product later.


Step 7: Geometric Interpretation of Dot Product

So how can all these be useful? To cut to the chase, the dot product is a measure of how parallel the vectors are whereas cross product is a measure of how orthogonal the vectors are.

Interpretation on geometry

Lets deal with the dot product first. Recall the formula for the dot product, as mentioned in Step 4. We can determine the whether result is positive or negative just by looking at the cosine of the angle sandwiched between the two vectors. Why? Because the magnitude of a vector is always positive. The only parameter left to dictate the sign of the result is the cosine of the angle.

Again, recall that positive cosine graph covers -90° – 90°, as in Step 6. Therefore, the dot product of A with any of the vecotrs L, M, N, O above will produce a positive value, because the angle wedged between A and any of those vectors is within -90° and 90°! (To be precise, the positive range is more like -89° – 89° because both -90° and 90° produces cosine values of 0, which brings us to the next point.) The dot product between A and P (given P is perpendicular to A) will produce 0. The rest I think you can already guess: the dot product of A with K, R, or Q will produce a negative value.

By using the dot product, we can split the area on our stage into two regions. The dot product of the vector below with any point that lies inside of the "x"-marked region will produce a positive value, whereas the dot product with those in the "o"-marked region will produce negative values.

Dot region divides area into two.

Step 8: Geometric Interpretation of Cross Product

Let’s move on to the cross product. Remember that the cross product relates to the sine of angle sandwiched between the two vectors. The positive sine graph covers a range of 0° to 180°; the negative range covers 0° to -180°. The image below summarises these points.

Positive and negative cross product.

So, looking again at the diagram from Step 7, the cross product between A and K, L, or M will produce positive values, while the cross product between A and N, O, P, or Q will produce negative values. The cross product between A and R will produce 0, as sine of 180° is 0.

To clarify further, the cross product of vector between any point that lies in the "o"-marked region below will be positive, whereas those in "x"-marked region will be negative.

Cross region divides area into 2.

One point to take note of is that, unlike the dot product, the cross product is sequence sensitive. This means results of AxB and BxA will be different in terms of direction. So as we write our program, we need to be precise when choosing which vector to be compared against.

(Note: These concepts explained apply to 2D Cartesian space.)


Step 9: Demo Application

To reinforce your understanding, I’ve placed here a little application to let you play with. Click on the blue ball at the top of stage and drag it around. As you move, the text box value will update depending on which operation you have chosen (dot or cross product between the static arrow with the one you control).

You may observe one oddity with the cross product’s inverted direction. The region on top is negative and the bottom is positive, in contrast with our explanation in previous step. Well, this is due to the y-axis being inverted in Flash coordinate space compared to Cartesian coordinate space; it points down, whereas traditionally mathematicians take it as pointing upwards.


Step 10: Defining Regions

Now that you have understood the concept of regions, let’s do a little practice. We shall divide our space into four quadrants: A1, A2, B1, B2.

Space divided into 4 regions.

I’ve tabulated the results to check for below. “Vector” here refers to the arrow in the image above. “Point” refers to any coordinate in the specified region. The vector divides the stage into four main areas, where the dividers (dotted lines) extend to infinity.

Region Vector on diagram cross product with point Vector on diagram dot product with point
A1 (+), because of Flash coordinate space (+)
A2 (+) (-)
B1 (-), because of Flash coordinate space (+)
B2 (-) (-)

Step 11: Regions Divided

Here’s the Flash presentation showcasing the ideas as explained in step 10. Right click on stage to pop the context menu and select the region you would like to see highlighted.


Step 12: Implementation

Here’s the ActionScript implementation of the concept explained in Step 10. Feel free to view the whole piece of code in the source download, as AppLine.as.

//highlighting color according to user selection
private function color():void
{
	//each ball on stage is checked against conditions for selected case
	for each (var item:Ball in sp)
	{
		var vec1:Vector2D = new Vector2D(item.x - stage.stageWidth * 0.5, item.y - stage.stageHeight * 0.5);

		if (select == 0) {
			if (vec.vectorProduct(vec1) > 0) item.col = 0xFF9933;
			else item.col = 0x334455;
		}
		else if (select == 1){
			if (vec.dotProduct(vec1) > 0) item.col = 0xFF9933;
			else item.col = 0x334455;
		}
		else if (select == 2){
			if (vec.vectorProduct(vec1) > 0 && vec.dotProduct(vec1) > 0) item.col = 0xFF9933;
			else item.col = 0x334455;
		}
		else if (select == 3){
			if (vec.vectorProduct(vec1) > 0 &&vec.dotProduct(vec1) <0) item.col = 0xFF9933;
			else item.col = 0x334455;
		}
		else if (select == 4){
			if (vec.vectorProduct(vec1) < 0 &&vec.dotProduct(vec1) > 0) item.col = 0xFF9933;
			else item.col = 0x334455;
		}
		else if (select == 5){
			if (vec.vectorProduct(vec1) < 0 &&vec.dotProduct(vec1) < 0) item.col = 0xFF9933;
			else item.col = 0x334455;
		}
		item.draw();
	}
}
//swapping case according to user selction
private function swap(e:ContextMenuEvent):void
{
	if (e.target.caption == "VectorProduct")	select = 0;
	else if (e.target.caption == "DotProduct")	select = 1;
	else if (e.target.caption == "RegionA1")	select = 2;
	else if (e.target.caption == "RegionA2")	select = 3;
	else if (e.target.caption == "RegionB1")	select = 4;
	else if (e.target.caption == "RegionB2")	select = 5;
}

Step 13: Shielded Visibility

Having understood the geometrical interpretations of dot product and cross product, we shall apply it to our scenario. The Flash presentation above shows variations of the same scenario and summarises the conditions applied to a trooper shielded by a wall yet inside the turret’s FOV. You can scroll through the frames using the arrow buttons.

The following explanations are based upon the 2D Flash coordinate space. In Frame 1, a wall is placed between the turret and the trooper. Let A and B be the vectors from the turret to the tail and the head of the wall’s vector, respectively. Let C be the vector of the wall, and D be the vector from the tail of the wall to the trooper. Finally, let Q be the vector from the turret to the trooper.

I have tabulated the resulting conditions below.

Location Cross Product
Troop is in front of wall C x D > 0
Troop is behind wall C x D < 0

This is not the only condition applicable, because we also need to restrict the trooper to within the dotted lines on both sides. Check out frames 2-4 to see the next set of conditions.

Location Cross Product
Troop is within the sides of the wall. Q x A < 0, Q x B > 0
Troop is to the left of the wall Q x A > 0, Q x B > 0
Troop is to the right of the wall Q x A < 0, Q x B < 0

I think my fellow readers can now choose the appropriate conditions to determine whether the trooper is hidden from view or not. Bear in mind that this set of conditions are evaluated after we found troop to be within turret’s FOV (refer to step 3).


Step 14: Actionscript Implementation

The initial state of the application.

Here’s the ActionScript implementation of the concepts explained in Step 13. The image above shows the initial vector of the wall, C. Click and drag the red button below and move it around to see the area shielded. You may view the full source code in HiddenSector.as.

Okay, I hope you have experimented with the red ball, and if you are observant enough you might have noticed an error. Note there is no area shielded as the red button moves to the left of the other end of the wall, thus inverting the wall vector to point to left instead of right. The solution is in the next step.

However, before that let’s look at an important ActionScript snippet here in HiddenSector.as:

private function highlight():void {
	var lineOfSight:Vector2D = new Vector2D(0, -50)
	var sector:Number = Math2.radianOf(30);

	for each (var item:Ball in sp) {
		var turret_sp:Vector2D = new Vector2D(item.x - turret.x, item.y - turret.y); //Q

		if (Math.abs(lineOfSight.angleBetween(turret_sp)) < sector) {

			var wall:Vector2D = new Vector2D(wall2.x - wall1.x, wall2.y - wall1.y); //C
			var turret_wall1:Vector2D = new Vector2D(wall1.x - turret.x, wall1.y - turret.y); //A
			var turret_wall2:Vector2D = new Vector2D(wall2.x - turret.x, wall2.y - turret.y); //B
			var wall_sp:Vector2D = new Vector2D (item.x - wall1.x, item.y - wall1.y); //D

			if ( wall.vectorProduct (wall_sp) < 0 // C x D
			&& turret_sp.vectorProduct(turret_wall1) < 0 // Q x A
			&& turret_sp.vectorProduct(turret_wall2) > 0 // Q x B
			) { item.col = 0xcccccc }
			else { item.col = 0; }
			item.draw();
		}
	}
}

Step 15: Direction of Wall

To solve this issue, we need to know whether the wall vector is pointing to the left or the right. Let’s say we have a reference vector, R, that’s always pointing to the right.

Direction of vector Dot Product
Wall is pointing to right (same side as R) w . R > 0
Wall is pointing to left (opposite side of R) w . R < 0

Of course, there are other ways around this problem but I figure it’s an opportunity to utilise concepts expressed in this tutorial, so there you go.


Step 16: Actionscript Tweaks

Below is a Flash presentation which implements the correction explained in Step 15. After you have played with it, scroll down to check the ActionScript tweaks.

The changes from the previous implementation are highlighted. Also, the sets of condition are redefined according to the wall direction:

private function highlight():void {
	var lineOfSight:Vector2D = new Vector2D(0, -50);
	var sector:Number = Math2.radianOf(30);
	var pointToRight:Vector2D = new Vector2D(10, 0); //added in second version

	for each (var item:Ball in sp) {
		var turret_sp:Vector2D = new Vector2D(item.x - turret.x, item.y - turret.y); //Q

		if (Math.abs(lineOfSight.angleBetween(turret_sp)) < sector) {

			var wall:Vector2D = new Vector2D(wall2.x - wall1.x, wall2.y - wall1.y); //C
			var turret_wall1:Vector2D = new Vector2D(wall1.x - turret.x, wall1.y - turret.y); //A
			var turret_wall2:Vector2D = new Vector2D(wall2.x - turret.x, wall2.y - turret.y); //B
			var wall_sp:Vector2D = new Vector2D (item.x - wall1.x, item.y - wall1.y); //D

			var sides: Boolean; //switches according to wall direction
			if (pointToRight.dotProduct(wall) > 0) {
				sides = wall.vectorProduct (wall_sp) < 0 // C x D
				&& turret_sp.vectorProduct(turret_wall1) < 0 // Q x A
				&& turret_sp.vectorProduct(turret_wall2) > 0 // Q x B
			}
			else {
				sides = wall.vectorProduct (wall_sp) > 0 // C x D
				&& turret_sp.vectorProduct(turret_wall1) > 0 // Q x A
				&& turret_sp.vectorProduct(turret_wall2) < 0 // Q x B
			} 

			if (sides) { item.col = 0xcccccc }
			else { item.col = 0; }
			item.draw();
		}
	}
} 

Check out the full source in HiddenSector2.as.


Step 17: Set Up the Wall

Now we shall patch our work onto Scene1.as from the previous tutorial. First, we shall set up our wall.

We initiate the variables,

public class Scene1_2 extends Sprite
{
	private var river:Sprite;
	private var wall_origin:Vector2D, wall:Vector2D; //added in second tutorial

	private var troops:Vector.<Ball>;
	private var troopVelo:Vector.<Vector2D>;

…then draw the wall for the first time,

public function Scene1_2() {
	makeTroops();
	makeRiver();
	makeWall(); //added in 2nd tutorial
	makeTurret();
	turret.addEventListener(MouseEvent.MOUSE_DOWN, start);
	function start ():void {
		stage.addEventListener(Event.ENTER_FRAME, move);
	}
}
private function makeWall():void {
	wall_origin = new Vector2D(200, 260); wall = new Vector2D(80, -40);
	graphics.lineStyle(2, 0);
	graphics.moveTo(wall_origin.x, wall_origin.y);
	graphics.lineTo(wall_origin.x + wall.x , wall_origin.y+wall.y);
}

…and redraw on each frame, because the graphics.clear() call is somewhere in behaviourTurret():

//added in 2nd tutorial
private function move(e:Event):void {
	behaviourTroops();
	behaviourTurret();
	redrawWall();
}
//added in second tutorial
private function redrawWall():void {
	graphics.lineStyle(2, 0);
	graphics.moveTo(wall_origin.x, wall_origin.y);
	graphics.lineTo(wall_origin.x + wall.x , wall_origin.y+wall.y);
}

Step 18: Interaction with Wall

Troops will interact with the wall as well. As they collide with the wall, they will slide along the wall. I will not try to go into details of this as it has been documented extensively in Collision Reaction Between a Circle and a Line Segment. I encourage readers to check that out for further explanation.

The following snippet lives in the function behaviourTroops().

//Version 2
//if wading through river, slow down
//if collide with wall, slide through
//else normal speed
var collideWithRiver:Boolean = river.hitTestObject(troops[i])

var wall_norm:Vector2D = wall.rotate(Math2.radianOf( -90));
var wall12Troop:Vector2D = new Vector2D(troops[i].x - wall_origin.x, troops[i].y - wall_origin.y);
var collideWithWall:Boolean = troops[i].rad > Math.abs(wall12Troop.projectionOn(wall_norm))
&& wall12Troop.getMagnitude() < wall.getMagnitude()
&& wall12Troop.dotProduct(wall) > 0;

if (collideWithRiver) troops[i].y += troopVelo[i].y*0.3;
else if (collideWithWall) {
	//reposition troop
	var projOnNorm:Vector2D = wall_norm.normalise(); projOnNorm.scale(troops[i].rad -1);
	var projOnWall:Vector2D = wall.normalise();
	projOnWall.scale(wall12Troop.projectionOn(wall));
	var reposition:Vector2D = projOnNorm.add(projOnWall);
	troops[i].x = wall_origin.x + reposition.x; troops[i].y = wall_origin.y + reposition.y;

	//slide through the wall
	var adjustment:Number = Math.abs(troopVelo[i].projectionOn(wall_norm));
	var slideVelo:Vector2D = wall_norm.normalise(); slideVelo.scale(adjustment);
	slideVelo = slideVelo.add(troopVelo[i])
	troops[i].x += slideVelo.x; troops[i].y += slideVelo.y;
}
else troops[i].y += troopVelo[i].y

Step 19: Checking Troopers’ "Hidden-ness"

Finally, we come to the meat of this tutorial: setting up the condition and checking whether troopers are behind the wall and therefore shielded from turret visibility. I have highlighted the important patch codes:

//check if enemy is within sight
//1. Within sector of view
//2. Within range of view
//3. Closer than current closest enemy
var c1:Boolean = Math.abs(lineOfSight.angleBetween(turret2Item)) < Math2.radianOf(sectorOfSight) ;
var c2:Boolean = turret2Item.getMagnitude() < lineOfSight.getMagnitude();
var c3:Boolean = turret2Item.getMagnitude() < closestDistance;

//Checking whether troop is shielded by wall
var withinLeft:Boolean = turret2Item.vectorProduct(turret2wall1) < 0
var withinRight:Boolean = turret2Item.vectorProduct(turret2wall2) > 0
var behindWall:Boolean = wall.vectorProduct(wall12troop) < 0;
var shielded:Boolean = withinLeft && withinRight && behindWall

//if all conditions fulfilled, update closestEnemy
if (c1 && c2&& c3 && !shielded){
	closestDistance = turret2Item.getMagnitude();
	closestEnemy = item;
}

Check out the full code in Scene1_2.as.


Step 20: Lauch the Application

Finally, we can sit back and check out the patch in action. Hit Ctrl + Enter to see the results of your work. I have included a copy of the working Flash presentation below. Click on the turret at the bottom of the stage to start the simulation.



View full post on Activetuts+

Jan 16, 2012 Posted on Jan 16, 2012 in Hints and Tips | 10 comments

Win Business Cards, Postcards, or Posters From UPrinting

Are you looking to start your new year with a fresh set of prints to help promote your design business? Today, our friends at UPrinting are kicking off 2012 by giving away business cards, posters, or postcards to 36 lucky Tuts+ readers. To enter, all you have to do is submit your entry using the form below and select which prize you would prefer.

If you are a frequent reader of our site, chances are, you are already familiar with UPrinting. They are an online printer that offers business cards, poster printing, postcard printing, and much more. UPrinting is a frequent sponsor of this site and we are very excited to partner with them on another giveaway.

Submit Your Entry


Up for Grabs

Today, UPrinting is giving you several options to choose from. You can enter to win 500 standard business cards, 100 postcards, or 1 poster print. The choice is yours! More details can be found below.

500 Standard Business Cards
2" x 3.5" US Standard, 2" x 2" Square, 1.75" x 3.5" Slim
14pt Cardstock Gloss / Matte, 13pt Cardstock Uncoated
Front and Back Printing
3 Business Days Turnaround time

1 Poster Print
18" x 24"
Semi Gloss / High Gloss
1 Business day print turnaround time

100 Postcards
5" x 7"
14pt Cardstock Gloss
Front Only Printing
2 Business days print turnaround time


Rules

  • To enter, submit your entry and select which product you would like.
  • You may only enter once.
  • Follow UPrinting on Twitter, Facebook, or Google+ (Optional)
  • Make sure to enter a valid email address so that we can contact you.
  • Entries will be accepted until Friday, January 20, 2012 at 11:59 PM, EST.
  • Shipping is free to U.S. and International residents.



View full post on Activetuts+

Dec 27, 2011 Posted on Dec 27, 2011 in Hints and Tips | 10 comments

Happy Holidays from Tuts+!

The holidays are upon us, and we’re feeling festive at Tuts+ this weekend! We’d like to take this opportunity to say a huge Christmas thank you to all our readers, and wish you a very Happy Holiday. Read on for a video message from the HQ team, and a few freebies from around the Tuts+ and Envato network!


A Message from Envato HQ

Although the Tuts+ team is spread over the globe, Envato HQ is where much of the Tuts+ magic happens! It isn’t looking traditionally Christmassy in Melbourne at the moment, but we have a special holiday message from everyone at head office:

From everyone at Envato we want to wish you a Happy Holidays and look forward to seeing you all refreshed and ready for another big year in 2012! From Envato HQ to the community, we’ve created a little video to share the holiday cheer. Enjoy!

Music is Kids Holiday Theme by AudioJungle Author CraigHall


Gift Guides & Freebies!

Wondering what to buy your fellow geek this Christmas? Never fear! You may have left it it a little late, but our holiday gift guides can still come in handy. Here are a few great places to start:

  • The Official 2011 Nettuts+ Holiday Gift Guide
  • 30+ Gift Ideas for Browser App and Browser Game Developers
  • 10 Last-minute Gift Suggestions for the Musician in Your Life
  • 36 Great Holiday Gift Ideas For The Cg Artist!
  • The Official 2011 Phototuts+ Holiday Gift Guide
  • 20+ Great Gift Ideas for Any WordPress Developer

We also have a couple of exclusive freebies and discounts, just in time for the holidays:

  • Get $6 Off Our New Rockable Book: “How to Record Great Music”
  • Exclusive Freebie: 50 Crisp Web UI Icons

The Christmas Freelance Freedom Comic

The “holiday jingle” comic encapsulates everything that we love and hate about freelancing. Don’t forget to sing along to the “Jungle Bells” theme music as you read it…!

You can also enjoy the whole back catalog of Freelance Freedom comics over at FreelanceSwitch.


AppStorm Giveaways

We have two fantastic competitions running over at the AppStorm network over the holiday period, and there’s still time to get your entry in to stand a chance of winning:

  1. Business Productivity Bundle Giveaway —Each bundle includes a license to Daylite and Billings Pro – it’s the perfect combination for getting your business organised and making money!
  2. The AppStorm Holiday ’11 Video Game Giveaway — In the spirit of this season we’ve hand picked a few critically acclaimed, and award-winning, games released over this year to give away to our readers!

Merry Christmas, and Happy New Year!

All that’s left is to wish you a very happy holiday on behalf of everyone at Tuts+! We hope you’ve enjoyed everything that we’ve had to share this year, and look forward to publishing thousands more top-quality tutorials, articles, freebies, and resources in 2012.

Here’s to another exciting year at Tuts+, and thank you for joining us on the journey!



View full post on Activetuts+

Oct 12, 2011 Posted on Oct 12, 2011 in Hints and Tips | 10 comments

Download the Winning Entries From ActiveDen’s “Widget/Apps” Competition

ActiveDen’s latest community-organised contest has just taken place. The theme was “Widget/Apps” and we had a number of outstanding entries, with $1,450 prize money up for grabs. We had a lot of fun with the contest and are thrilled to be offering the entries for free exclusively here on Activetuts+!


The Winner: Lion’s NeatList AIR App

Lion’s NeatList is a cool AIR app to keep track of your daily tasks. It also took home $1,000 for first prize!

NeatList AIR App
Download This Entry
Demo View It Online

Check out Lion’s ActiveDen Portfolio


RimV’s Flickr Box AIR App

Flickr Box is a cross platform AIR mobile app that runs on Android, iOS and RIM Playbook. Built by 3D legend RimV.

Flickr Box AIR App
Download This Entry
Demo View It Online

Check out RimV’s ActiveDen Portfolio


FlashEdge’s 3D Flickr Gallery

Coming in third was this amazing 3D gallery built by FlashEdge.

3D Flickr Gallery
Download This Entry
Demo View It Online

Check out FlashEdge’s ActiveDen Portfolio


Kontrast’s Survey/Feedback/Quiz Form

Build your own interactive form with this great entry from Kontrast.

Flash Feedback Form
Download This Entry
Demo View It Online

Check out Kontrast’s ActiveDen Portfolio


RubenBristian’s Media Love Widget

Create an online YouTube Poll with this awesome widget by RubenBristian.

Flash Poll Widget
Download This Entry
Demo View It Online

Check out Ruben’s ActiveDen Portfolio


PezFlash’s Snakes & Apples

Catch the dreaded Apples with this fun game by PezFlash.

Flash Game
Download This Entry
Demo View It Online

Check out PezFlash’s ActiveDen Portfolio


RabidFlash’s YouTube Comment Widget

Load YouTube comments with this cool widget by RabidFlash.

Youtube Comments
Download This Entry
Demo View It Online

Check out RabidFlash’s ActiveDen Portfolio


Zefs’ Envato API AIR App

View ActiveDen forum threads, the latest featured files and so much more with this awesome AIR app from Zefs.

Envato API AIR App
Download This Entry
Demo View It Online

Check out Zefs’ ActiveDen Portfolio


ZoomIt’s Flash Testimonial Rotator

Create a cool Flash Testimonial Rotator with this XML driven widget from Zoomit.

Flash Testomonials
Download This Entry
Demo View It Online

Check out ZoomIt’s ActiveDen Portfolio


Sergibh’s Flash Horoscope Widget

Present daily horoscopes with this neat component from Sergibh. Mobile App included.

Flash Horoscope Component
Download This Entry
Demo View It Online

Check out Sergibh’s ActiveDen Portfolio


CodingJack’s ChangeStar Envato API AIR App

Track your Envato marketplace file ratings with this easy to use AIR app.

Envato API AIR App
Download This Entry
Demo View It Online

Check out CodingJack’s ActiveDen Portfolio


More Info

Some entries do not include ActionScript source. Feel free to use the entries in your client projects but resale of any kind is not permitted.

Want to read more about the fun we had? Check out the competition threads over on the ActiveDen forums here and here.


The Competition Sponsors

Big thanks to all of these guys for sponsoring the competition:

Envato

BitFade   PezFlash   ZoomIt

LGLab   FlashEdge   Parker and Kent

Special thanks to Zefs and PatrickJansen for their amazing work on the competition banner!



View full post on Activetuts+

Sep 17, 2011 Posted on Sep 17, 2011 in Hints and Tips | 10 comments

Top Unity 3D Tools from ActiveDen

As a famous British band once sang – we all get by with a little help from our friends. And if you have ever decided to design a kick butt game, who couldn’t use a little help?

Today we’re going to run down some of the ultra-helpful Unity 3D tools that are available over at ActiveDen. And if this whole Unity 3D thing is new to you, please check out our introduction series on Getting Started with Unity. Now get out there and start designing me some games!


1. Cave Run 3D Unity Game Starter Kit

This is a 3D version of my Cave Run Flash Game . Run like crazy, jumping on platforms and avoiding obstacles. Collect as many gems as you can and don’t fall!


2. Mini Golf Construction Kit

Mini Golf Construction Kit has everything you need to create a mini golf game.You can create a 18 hole commercial ready game in a day.Package contains over 80 prefabs of course pieces and obstacles, a complete game demo with 6 courses included and a GUI example to help you get started, a setup guide and one video. There are few animated obstacles and one animated course piece.


3. FPS Starter Pack – Upgrades & Store

Have you ever wanted to make your own ‘Call of Unity’ FPS ? With this weapon upgrades and store system, along with the base Dastardly Banana FPS Constructor (included), you can! Create varied weapon upgrades, like scopes, secondary weapons, and camouflage, without any coding through the modular upgrades framework! Unlock weapons and upgrades through the store system; just drag the provided Store prefab into your scene and hit play! Add these new features, along with two new fully animated weapon models, to the base Dastardly Banana FPS Constructor and you can make your Unity FPS in no time.


4. Match-3 new style game starter kit

This is physics based match-3 style game. It would be helpful for beginners, here is tricky things: locking object’s position and rotation, parenting objects, instantiate particles and change their color to match destroyed ball’s color and much more.


5. BloodSplatter Prefab

Includes blood material and particle system blood splatter simulation. Hooray?


6. Day/Night Cycle

Component allows you to use realistic Day/Night Cycle in your Projects.


7. Bowling Game Starter Kit

The bowing game starter kit will help you to develop bowling games in Unity3d. It’s a bowling game all ready to go!


8. Local High Score Script pack

The Local High Score Scripts pack includes everything you need to add basic, local (as in, offline) high score tables to your Unity3d games.


9. 3D Memory

3D Memory is a classic memory game. This game is going to help you create any other matching game and high score system with multiple elements. In this case we have name, avatar and time, game is keeping scores of the ten best scores per level. There are 135 images to be matched so you can’t play the same game twice.


10. UFO3D – Unity Game

UFO3D is the Unity version of my other game, UFO2D. Move with the mouse, pick up cows and drop them at the portal. Get as many cows as you can before time runs out!


11. Guitar Unity

This game starter kit has you on the way to your own guitar reaction game. The included custom editor helps you create new songs, add your own music and design challenging note patterns with just a few simple steps.


12. Mighty Cannon Shooter Game

Shoot the targets and try to get as many points as possible! The further you shoot, the more you get.


13. Spawn Controller

Spend more time designing and balancing, and less time trying to make things work! With the Dastardly Banana Spawn Controller, designing, configuring, and customizing the way objects spawn in your scene is easy.


14. Air side-scroller

Every option is adjustable in this project, you can manipulate with player’s and enemy’s options: movement speed, bullet and rocket shooting speed, bullet resistance, explosion and bullet prefab, sounds etc…


15. Mech Starter Pack

This is a Starter Pack that will teach you how to get a head start on creating an advanced 3rd person shooter with amazing graphics, animations, and gameplay. It includes a fully rigged detailed robot mesh known as J3 along with all his necessary animations in fbx format such as run, jump, shoot, as well as strafe. It also has two different enemy types known as an EyeBot and SentryGun to provide J3 with win and losing conditions. Powerups that refill your health, ammo and missles.


16. Cloudy Night Skybox

This Skybox is custom made for the Unity environment, pre-packaged and ready for import and use. Easy as importing the package into an existing or new scene.


17. Unitroids Space Shooter

Unitroids is a game where you fly a small spaceship through unknown space worlds. Unfortunately, pesky little asteroids are cluttering up your way. You can either avoid them , or shoot them and blow them up. But when they explode, they will split and make things more complicated.


18. RC Helicopter Simulation

RC Helicopter Simulation can be used like a helicopter template project. Based on this simulation you can create your own helicopter game in no time. By adjusting helicopter stability control you can choose between simulation style and arcade style game. Package includes PDF help file that will help you get started and a fully commented source code.


19. Analog Clock for Unity3d

The whole clock, scripting and all, is neatly contained in an easy-to-use prefab. Just import the .unitypackage and drop it on your scene. All the settings can be modified via the inspector panel – you don’t even need to touch the Javascript.


20. Level loader (prefab-based level builder)

The level ‘maker’ script is designed to build a level dynamically from a layout specified within a script file.


21. Planet Earth Prefab

This realistic Earth prefab is super easy to work with. Includes stars and sun/camera flare reflections. Also, simply change speed with the speed setting.


22. Unity 3D Slot Machine Prefab

New to the Unity catalogue on Active Den, this is a fully working slot machine, modelled after the sort you see standing in a typical Las Vegas casino. You pay, you play, you might even win. Have a look at the preview and see for yourself.



View full post on Activetuts+

Page 1 of 612345...»Last »
search search search search search
Find an Article
Categories
  • Flash Video Training
  • Hints and Tips
  • Recommended
Please Support Our Sponsors
Recent Posts
  • Tuts+ Community Meetup in New York!
  • HTML5 Canvas Optimization: A Practical Example
  • Recreate the Cover Flow Effect Using Flash and AS3
  • Drawing Activetuts+ to a Close
  • Intro to Dart: Creating a Marquee
Tag Cloud
2011 ActionScript Active Activetuts+ Adobe animation Basic Basix Best Build Button Character Code Create Creating Critique Custom design Effect Effects Files Flash from Game Guide HTML5 Introduction Macromedia Motion Muzzle part Player Premium Professional Quick Silverlight Simple Text Tool Tutorial Tuts+ Using Video website Workshop
About Our Site:

Hey there and welcome to "Flash Video Training Source", a resource for anybody interested in learning more about Adobe's great tool. We feature educational videos, which will help you master Adobe Flash and help you get to know all of its features. We at "Flash Video Training Source" believe that video training and video... more

Why don't you follow us on Twitter and get the latest video tutorials twitted to your account. Just click on the floating twitter bar to your right!

Go Back In Time
May 2013
M T W T F S S
« Jul    
 12345
6789101112
13141516171819
20212223242526
2728293031  
Pretty Blank Box
top

Blogroll

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Planet

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Archives

  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
Powered by WordPress  |  Designed by Elegant Themes  |  Lightning Fast Hosting by Site 5 Hosting