TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Extensions
→
Extension Ideas
→
A* as a Stencyl extension (with basic sample) [ABANDONED]
Pages:
1
2
3
4
...
7
A* as a Stencyl extension (with basic sample) [ABANDONED]
jihem
Posts: 161
October 20, 2012, 04:54:39 am
Done. You can update from
https://github.com/jihem/Stencyl-DecisionMaking
See sample (actor event create) to know how to manage a closed path.
1°) I added a test in the method path (in the extension) to return an empty string if this.pth is null ( "".substr(1) -> "" ).
2°) Using a split block on an empty text with separator freezes stencyl... (stencyl 3 bug?) So you have to test the result before the split. If empty, the path is closed (and in the dm-astar-1 sample, the actor dies).
Sorry for the inconvenience
« Last Edit: October 20, 2012, 05:10:02 am by jihem »
while (!success=retry());
Dom818
Posts: 1292
October 20, 2012, 10:57:18 am
Thanks for the update, I will test it out!
Effect Apps
Check Out Our Apps
Dom818
Posts: 1292
October 20, 2012, 03:46:14 pm
I don't know if this would be possible to add, but is there a way to get the cost of the current path? I know A* finds the path with the lowest cost and this might be helpful in some games.
Effect Apps
Check Out Our Apps
jihem
Posts: 161
October 21, 2012, 01:17:40 am
Yes. I can add this in about fifteen days. If you have an emergency, you can send me a private message. I will revise my planning. The next days, I'm working on a core animations engine.
while (!success=retry());
Dom818
Posts: 1292
October 21, 2012, 05:43:26 am
That's fine, add it when you have time. No hurry.
Effect Apps
Check Out Our Apps
jihem
Posts: 161
October 22, 2012, 10:57:43 am
You may be happy (I hope so...).
while (!success=retry());
Dom818
Posts: 1292
October 22, 2012, 11:52:55 am
Quote from: jihem on October 22, 2012, 10:57:43 am
You may be happy (I hope so...).
Many thanks jihem! I will implement this into my game later and tell you how it works out.
Effect Apps
Check Out Our Apps
jihem
Posts: 161
October 22, 2012, 12:54:32 pm
I made this during my lunch time and uploaded when I was back at home. Let me know if something goes wrong or if you need something else...
while (!success=retry());
Dom818
Posts: 1292
November 10, 2012, 09:21:28 am
Hi jihem,
I need a bit of help with the extension again. Iam trying to set the code cost of a letter in the path to a number before it makes the path so it can choose the one that is the cheapest to get to. Problem is, it either throws an error or the person does not move at all. I have modded the sample game to give you an example. Hope you can figure this out.
Effect Apps
Check Out Our Apps
jihem
Posts: 161
November 12, 2012, 04:14:43 am
It's my fault... I fixed it.
In DecisionMaking.hx, update setCost to (github has been updated) :
public static function setCost(s:String,c:Float)
{
if (AStar.cst==null)
{
AStar.cst=new Hash<Float>();
}
AStar.cst.set(s,c);
}
See the new sample dm-astar-2. Why not follow me to get the next updates ?
while (!success=retry());
Dom818
Posts: 1292
November 12, 2012, 09:10:40 am
Thanks jihem, it works now. What do you mean by follow you, on Stencyl or somewhere else?
Effect Apps
Check Out Our Apps
jihem
Posts: 161
November 12, 2012, 10:28:28 am
> What do you mean by follow you, on Stencyl or somewhere else?
On Stencyl. "nobody follows jihem" message made me sad...
Now, I have one follower.
And you know what? I'm happy. Thanks
while (!success=retry());
saulochina
Posts: 214
November 12, 2012, 01:46:54 pm
now 3!
Finding the fun!
Squib Wars. Now complete, and avaible for free on App Store!
http://bit.ly/LxJ62L
https://www.facebook.com/twoheadedgames
Twitter: @saulochina
MSN:
sauloj.china@hotmail.com
jihem
Posts: 161
November 13, 2012, 04:48:08 am
Waouh... incredible ! Thanks. Now, I'm not a poor lonesome stencyler...
while (!success=retry());
Ninjadoodle
Posts: 313
November 20, 2012, 01:38:05 pm
Hi Jihem
Thank you for an awesome extension
I've read your guide and have been playing around with the settings but I'm having trouble applying it to my game.
Basically I would like to have a key controlled player move around and an enemy to follow them.
Is this possible with your extension? Do you have any tips on how I would go about doing this?
Thank you again!
It's all fun and games until somebody get's a shuriken in their eye!
Pages:
1
2
3
4
...
7