Actionscript 3 :: Pathfinding For Groups Of Objects?

Feb 7, 2012

Is there any open-source algorithm for path-finding that can handle groups of objects? I'm developing a (flash) game like Age of Empires.

I will be using AS3, but I can translate any code or pseudo-code.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Add Groups Of Objects Dynamically?

Jan 21, 2010

I've built a simple file to demonstrate what I'm trying to do (it's all dynamic, with AS3, no physical assets). Basically I've created 3 groups of objects via AS3: squares, circles, and triangles. I've placed 3 menu buttons on the side of the stage. I added all objects to the stage just so you can see them. Ideally I'd like to have each button call one of the groups to the stage and begin the tween that is assigned to the object. In this case I've made all the tweens 'alpha' for simplicity. So for example if the '1' button is clicked, it will add the group of squares to the stage and initiate their alpha tweens so that they fade in. Then when the '2' button is clicked, the squares will be removed and the circles will be added and their tweens initiated. I've never seen a tutorial on this so I'm not quite sure how to proceed. What I'd imagined is to group the objects into arrays then add the arrays to the stage with addChild?

I'm using this as a simple model to build a website where I'm going to be calling the content of each section of the site dynamically with menu buttons, instead of using the timeline at all. This is the next step in my actionscript evolution.

[code]...

View 0 Replies

Actionscript 3 :: Libs For Complex Animation Of Groups Of Objects?

Apr 3, 2012

Are there any libraries for animation groups of objects in as3? I need something like this: for example, I specify an array of images and creates the animation of all objects in the array - fireworks, the spiral vortex, 3D rotation, undulating, etc. Tweenlite and other libraries not fit, because there is no pattern complex motion.

I need to quickly apply complex animation paths to the set of objects.

View 1 Replies

ActionScript 3.0 :: Pathfinding Through Waypoints?

Apr 30, 2008

I need to create a pathfinding algorithm that goes through some predefined waypoints. Most of the examples I have found are about tile based layouts and the one that comes close to what i need is this:hich, unfortunately, I don't understand.Basically have a movieclip containing three different types of clips: Cities, roads and marked roads where something happens when you cross it.Going from city to city should always result in passing through the blue or orange waypoints jumping from one point to the next nearest point.

View 4 Replies

IDE :: Pathfinding With Direction Tiles

Oct 25, 2009

I've been experimenting with path finding, in particular the A* algorithm. I've understand the basics for it and can currently get an object to move from point A to B avoiding walls. However I'm trying to create one way blocks, (then eventually add turn left and right only and T juncs etc) so I don't have to use thick walls to prevent the object from taking a certain route. The code I have so far is....

[Code]...

View 1 Replies

ActionScript 2.0 :: AI Pathfinding For Text-Based Game?

Jun 1, 2010

Pretty much what I am looking to do is have an NPC find the shortest path from their location to the player's. Everything is turn-based, so the NPC would have the capability to move from one room to another adjacent room in one turn. Keep in mind that there would be no physical manifestation of the code, other than some text that would be displayed when the NPC enters the same room as the player.And as an added aspect if possible I would like the ability to stop NPCs from entering the same room as the player once they've reached it if the room/door/entrance is locked.So the end result would be something like this...

-------[E]
[P][ ][ ][ ][ ]

--------[ ]
[P][ ][ ][E][ ][code]..........

Only difference is that there would be no graphical representation.

View 1 Replies

ActionScript 3.0 :: Rudimentary Pathfinding/collision Detection?

Jun 6, 2009

I have a question regarding seemingly relatively simple collision detection and pathfinding. Thus far I've been doing pathfinding using the A* algorithm and nodes, but I want to do something simpler for a current project.

Simply put, I just want a character to traverse directly from point A to point B, and pillar-hump around any obstacles he encounters. Of course, if the unfortunate character walks into a concave area, he would never be able to get out... that's fine. Here's an illustration of the initial setup, what A* will do, and what I actually want to do:

I was wondering if anyone here has ever done this, and if so, could suggest the best way to go about doing it?

View 2 Replies

ActionScript 3.0 :: Incorporate The Actual Pathfinding Between The Vertices?

Aug 29, 2011

I'm making my own dynamic 2D polygon pathfinder and have reached the point where i need to incorporate the actual pathfinding between the vertices. I figured Dijkstras algorithm would do the trick. If you know of better algorithms for mesh-pathfinding, please tell me. I know i could write it from scratch with reference to C, but I'm sure there are more efficient algorithms out there than the one I'd come up with.

View 8 Replies

Actionscript 3 :: Pathfinding Implementation Not Giving Expected Results

Aug 10, 2011

My AS3 A* pathfinding implementation sometimes doesn't returns the most efficient route, rather like this:[code]The problem: i should have a total score of (distance to end) 30 + (distance from start) 10 = 40, while the tile above i should have a total score of (distance to end) 40 + (distance from start) 14 = 54. Why is 54 being picked instead of 40, I don't know - I use this to find the node with lowest total score on the open list:[code]

View 1 Replies

ActionScript 3.0 :: Isometric Grid Movement On Mouse Click With Pathfinding Bug?

Mar 23, 2012

I am currently working on a very simple isometric3d game with a hero to move to mouse click position, using path-finding. I am trying to code everything myself step by step,as a beginner , i am well aware of asolib3d but I don't want to use it...I have read tutorials and few books I completely done with my isometric3d map. i create my path finding A-star class which is working perfectly with 2d grid tiles, but when i try to use it with isometric3d grid world it doesn't work properly.

ActionScript Code:
package  {
import com.sayConcept.isometric.IsoUtils;
import com.sayConcept.isometric.GraphicTile;

[code]....

my character movement is not correct. If hero position=0,0 and I click 0,10 on my iso grid instead of moving down he will move on the right side. If I am in the middle and I click on the left he will move right. and like few steps for where it supposes to stop... my pathfinding is ok in 2d but isometric the movement is weird...

View 0 Replies

Make A Flash Game In Groups?

Oct 8, 2010

I've messed around a bit in Java and Visual Basic. For our class we've been assigned to make a flash game in groups, and our group has decided they want to do a base defense game. I've been looking hard for open source/tutorial versions of a simple base defense game, but all I've found are tower defense games.

View 1 Replies

Flash :: CS4 Losing My Panel Groups

Aug 27, 2010

I've noticed recently (the last week) that when I open Flash CS4, the Tools panel and the Actions/Timeline/Compiler Errors/Output panel group are not automatically open, like they always were before. Does anyone know of anything I could have changed by accident?

At the same time this started happening, I have a file that has a moving hot spot that is set with keyframes (depending where the active button is on the bitmaped screen capture behind the button). Even though the  button's onRelease handlers are advancing the timeline correctly, my button is not in the right place in the runtime version. If's still fine in the development environment. It's like the layers are out of sync with each other.

View 1 Replies

Flex :: Resize Groups Within A Group?

Apr 19, 2011

I am trying to automatically resize the children within an s:Group. The children are another s:Group and a H:Group. Each have a percentage width of 10% and 90% each. The problem is that when one of the groups is resized (using a transition and rotation combination in the Skin), the other group does not automatically resize to fill the space?

Shouldn't Flex do this automatically? or do I have to code this?

<s:Group
id="listsGroup"
width="100%"
height="255"

[Code]....

View 1 Replies

ActionScript 3.0 :: Creating The Logical Groups?

Aug 6, 2009

can I somehow create logical groups of objects without actually combining them into symbols which would appear in the libraryI was thinking of this approach

ActionScript Code:
var vertFloatGroup:Object = new Object();  // the logical object
vertFloatGroup.addChild(splashPhoto);  // splashPhoto is an existing instance on stage
vertFloatGroup.addChild(nav);  // same for nav

interact with the group as a whole this above tells me that addChild is not a function...

View 4 Replies

ActionScript 2.0 :: Flash8 Get Radio Button Groups

Mar 11, 2009

Using the Radio button component and I have 10 groups of buttons. Each group has a group name of g1, g2, etc for each yes/no button. I want to determine which button was clicked. When I run the code below I only get the first one and then each other button clicked I don't get a trace statement back.

var rbListener:Object = new Object();
rbListener.click = function(evt_obj:Object) {
trace("The selected radio button group name is "+evt_obj.target.groupName);
};
for (rb=1; rb<=10; rb++) {
_root["g"+rb].addEventListener("click",rbListener);
}

View 2 Replies

Flex :: Load Data For Groups In AdvandedDataGrid?

Aug 24, 2009

Load data on demand (lazy load data ) for groups in advanced data grid control.When the user expands a node the flex component can make a webservice calla and retrieve data for this group.

ignoring the webservie part, I am trying to figureout how to do the UI part in AdvancedDataGrid ?

View 1 Replies

Flex :: DataGrid - Allow Headers For Different Groups Of Rows

Oct 27, 2009

I am trying to extend the DataGrid to allow headers for different groups of rows. However, I cannot figure out which method to extend from DataGrid that would allow me to accomplish this. I do not want the headers to be included in the dataProvider, only the rows. I want to specify indexes to insert the headers at using a property of the custom datagrid.
Here is a quick photoshop showing what I am trying to do:
Is there any custom component already built that will do this?

View 2 Replies

Actionscript 3 :: Capturing Two Groups Out Of A String With A Regex?

Dec 9, 2011

I don't know anything about regular expressions and I don't really have the time to study them at the moment.I have a string like this:test (22/22/22)I need to capture the test and the date 22/22/22 in an array. the test string could also be a multiple words string:test test(1) tes-t (22/22/22)should capture test test(1) tes-t and 22/22/22I have no idea how to get started on this. I managed to capture the date string with the parentheses by doing:(.*)but that really doesn't get me anywhere.

View 3 Replies

ActionScript 3.0 :: Trying To Create Option Groups With ComboBox

Dec 23, 2009

I've been trying to customize each cell in a ComboBox using a custom CellRenderer class, as instructed on this article. [URL]. However, my problem is I am trying to customize *only* two cells in the dropdown list. And the dropdown is populated by an XML feed so I cannot hardcode which ones to stylize beforehand. In other words, I want to make it look like an HTML dropdown. So, I have been looking for an alternative...maybe a property that I can use or another ComboBox component that can support option groups, like HTML dropdowns.

View 1 Replies

ActionScript 2.0 :: Request: A Slideshow With Subjects Or Groups

Jan 12, 2009

I am working on a website that will show a portfolio of pictures. I would like to have a scrolling bar at the bottom, similar to what I have seen in this thread by rhamej. This would be perfect for my needs, but I need something that I can put into a movie clip or load in my current swf. Also, I need to be able to have the scrollbar images load up galleries.

For instance, , the image scrollbar scrolls through 15 pictures, starteding with a parrot, then a boat, a cat, a dog, lizards, etc.. When you click on the image of a parrot it will load up a larger pic of that parrot, then will slowly cycle through other pics of parrots. I don't need to see every other parrot pic in any other location, only just as it's cycling through them, nor do I need to be able to physically cycle back and forth

A gallery that loads up a cycling view of each subject, and one that i can include into an existing SWF, not a standalone. I've searched high and low, and everything i found will only do one thing or another, not everything.

View 1 Replies

ActionScript 2.0 :: Delete Radio Button Groups On Submit?

Jun 16, 2009

I have some radio buttons that are all created dynamically and range from maybe 1-4 or more. Is there a way when I click submit button I can wipe out all of those buttons?

View 1 Replies

ActionScript 3.0 :: Finding Corners Of Groups Within A Two-dimensional Array

Jul 26, 2009

I am currently working on a tile based game in Flash, so im working with a two dimensional Array containing the data for the map the player can jump around in. The script is already able to find all the groups within the Array. In the following example Array it groups the left ones and the right using the zero tiles to divide them:
 
[1,1,0,0],
[1,0,0,1],
[1,0,0,1],
[1,0,1,1]

I am already able to get the corners of the groups, but still they are not in the correct order. As well some corners exist twice.

get the corners in the correct order and how to get rid of the doubles?

View 6 Replies

Professional :: Importing Layer Groups From Photoshop To Flash Cs4?

Mar 14, 2010

I have about 5 layer groups in Photoshop and in each of the groups/folders there are some layers with some text and other layers with isolated images and also layers with some layer styles. When I import this file into Flash I need each of the layer groups to be imported as a flattened bitmap image. I don't want any of the text to be editable or to have any of the layer styles intact. So if there are 5 layer groups in Photoshop, I just need five bitmap images in flash. I've tried doing this but it still imports the layers separately. I know I can flatten the groups in Photoshop but I want to keep this file editable.

View 2 Replies

ActionScript 3.0 :: Comparing Arrays - Two Groups Of Text Areas

Nov 27, 2010

I have the following set up: 6 text input areas when button 1 is pressed these numbers are copied to 6 text areas these 6 (user input) with text areas appear and when button 2 is pressed a further 7 (result) text areas that appear to a timer and contain randomly generated numbers to string I need to compare these two groups of text areas in a way that treats the 7th text area as a special excluded case:

[Code]...

View 20 Replies

Media Server :: RTMFP Groups Vs Direct Connections?

Jun 4, 2011

I'd like to hear some opinions about using NetGroups VS. using direct p2p connections between everybody, considering there would either be 2,3 or 4 people max in the group.

View 1 Replies

ActionScript 3.0 :: Detect Loose Groups In Tile Game

Sep 16, 2011

I have a tile based game à la Scrabble where tiles are placed on the board.. during the game the tiles must all be touching, and there should be no groups of tiles anywhere else on the board..I can find single loose tiles and check for surrounding tiles easily enough but how would I go about checking if every tile is touching on a horizontal or vertical axis and if there are loose groups of tiles on the board ??

View 3 Replies

Media Server :: Error License Does Not Allow RTMFP Groups

Sep 20, 2011

We bought FMIS 4.0.  Is some other license required to multicast?

View 1 Replies

AS3 :: Flash - Convert List Of Pairs Into Array Groups?

Nov 29, 2010

I have an ActionScript 3 array that lists pairs of items like this:

pairs[0] = Array('ItemA', 'ItemB');
pairs[1] = Array('ItemA', 'ItemC');
pairs[2] = Array('ItemC', 'ItemD');

[code]......

View 3 Replies

ActionScript 3.0 :: CS3 - Project Logic - Display Content In Groups

Mar 26, 2009

I need to display my content in groups of 9 (3 rows, 3 columns). The content is listed in an XML doc. I load my XML and then (here's where I would like your thoughts):

1. I will create a loop to assign an int. for each XML sibling (the content that will be displayed).

2. I will create an empty MC for each int.

3. Display each int.'s corresponding content into the MCs.

4. Display each MC on the stage.

** displaying my MCs on the stage in 3 rows and 3 columns is also confusing me... but this is another thread for later.

View 2 Replies

ActionScript 3.0 :: Add Values From Groups Of Radio Buttons And Show The Answers?

Mar 15, 2010

I have eight groups of radio buttons. The student needs to pick on button from each group. It is a personal intrestet survey. So each of the groups will have a button with related values. I need to add the values and show the results.
 
how to add values from radio buttons and displaying the answers. this is what I have managed so far:

[Code]....

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved