New Pathfinding-system!!!

Hi.
I’m working on a RTS game and for that I need a pathfinding-system, so I decided to create one. It will be free for everyone and works in pro as well as indie, in webplayer as well as stand-alone.
It was built in javascript so no plug-in is needed.
And here it is: Tell me if you liked it.

http://arongranberg.com/unity/strategy/strategy

PS: you need to go fullscreen to move the units, the command is ctrl click or right click.

The script will be placed at the wiki soon.

What pathfinding techniques is it based on?

Also, it crashed Firefox 3. You probably have some null-reference exceptions.

Rune

I tried it with Firefox 3 and Safari and I can’t figure out how it’s supposed to work. I CTRL click with the mouse and a box is drawn on the screen, but the characters don’t move. How’s this supposed to work?

To give commands, it is necessary to choose the soldier. Choose him by the rectangle. Then all will work well.

Firefox falls when you choose a building instead of the soldier and give it the order to move. The building cannot move. Here the script error is hidden. It is necessary to do check who is chosen.

But it is very interesting work and I would like to know as strongly it loads the processor. Whether some preliminary preparation of level is necessary?

BTW, Thank a lot. I’ll be waiting for your release. 8)

P.S. I saw very low FPS on my comp. Why?

Ok, now I get it:

  1. Left click on a soldier, a cross-hair appears beneath him.

  2. Control-left click to create a square on screen. The soldier will run to the square area (path following).

Then it looks like if one soldier is in range of another he will shoot him.

Pretty cool!

Cool, works great here too, great job!!! :slight_smile:

Is the second soldier unelectable? I’m having trouble selecting him if he is… :slight_smile:

Works pretty good once I figured out how to use it. The AI seems to be able to figure it’s way around pretty well and it’s nice you can change the path on the fly.

I’d suggest a different approach to setting the way points though. As a player, I think I’d prefer the ability to select the soldier, then select the point on the map with a second left mouse click.

To me that seems like the more natural way of doing it for ease of use. You could then deselect the soldier by using the right mouse button rather than having to use a keyboard.

Total War uses that kind of set up and IMO it’s much easier because at that point you can just play with the mouse and have no need to use the keyboard while moving troops around.

Good start.

@crockett
How would you drag-select a new group if left-clicking is used for moving AND selecting? Anyway, this control scheme is Blizzard-tested for about a decade and I personally like it just the way it is. Also, not sure what deselecting would be useful for. Just select the next thing you care about. :slight_smile: Just sayin’. On the other hand, the specifics of the game should dictate the controls in the end.

@BigKahuna
It’s easier just to right-click to move rather than press control (if you’ve got a mouse, of course.)

@Nathan
The reason you can’t select the other guy is because he’s the enemy. :wink:

Also, don’t miss making more units at the house on the right.

Someone asked about the frame rate. I’d guess the frame rate is poor because the terrain and models are pretty complex for this type of game (especially on an average computer.)

Ha ha… Good enough reason for me! :slight_smile:

Whoa!!! Sweet! I thought this was just a simple pathfinding demo… wow, you can take the enemy down, create new units, select multiple units via left click and drag, and you can shift-click too.

You’ve really put a lot of work into this so far… really great job, keep up the great work!!! :slight_smile:

Great job Worked great for me.

Very good!

Hi again.
Now a site is available with a demo and of course a download-able project :smile:

Check it out on Pathfinding – Arongranberg.com

PS: I know the logo isn’t very nice, I shall improve it sometime.

/Aron

Thanks man :!:

Thanks!

Great contribution to the community.

Very nice, thank you so much for making this public. I am new to Unity and 3D programming in general but I was able to understand what is happening very quickly. Awesome community + awesome engine, why oh WHY did I mess around with other engines before coming here?!

Josh

it’s fun

although the commands are non standard, once you remap action to RMB it’ll be great

only problem on latest version of Firefox after going full screen then pressing esc the three circles (red, yellow, green) on the left disappear with the bar and window is cut in half unity bug or web player bug?

Edit: Latest version 3.04

I downloaded it, tried it, I like it.

I move a block, send the move order and hopla, it finds the new path - nice.

  • while it’s reaching its destination and an object moves, it doesn’t correct its path.
  • I noticed that in certain cases the character moves very slowly.
  • could it take into account the slop of the terrain?