Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a visual indication on the ground after a moving order as been clicked #34

Open
draaxk opened this issue Sep 3, 2014 · 10 comments
Open

Comments

@draaxk
Copy link
Collaborator

draaxk commented Sep 3, 2014

No description provided.

@draaxk
Copy link
Collaborator Author

draaxk commented Sep 3, 2014

Idée: un cercle qui s'agrandi rapidement ayant pour centre le clic reporté au sol.
Faut il mettre une sorte de flag de rappel du centre ? Pas sûr. Voir ce que fait la concurrence :)

@methusalah
Copy link
Owner

Le flag qui reste c'est compliqué. Devra t'on l'afficher mesure le groupe sera sélectionné ou tout le temps ? Que doit on afficher lorsque le groupe est scindé ou que de nouveaux ordres sont donnés à une partie seulement des unités ?

Niveau technique, c'est pas très compliqué dans tous les cas, mais Starcraft n'affiche pas eu flag en continu

@methusalah methusalah changed the title Indication visuelle d'un clic de déplacement d'une unité Add a visual indication on the ground after a moving order as been clicked Apr 6, 2015
@roroah
Copy link
Collaborator

roroah commented Apr 29, 2015

Idea : Do the opposite of what @draaxk said, so it will make the circle contracting to where the user clicked, then leave the circle with a cross on that position (as long the users keep the selection).
As all unit can't sit on the desired location the users selected location have to be considered as the average goal position for all unit.
This for the next part is important as, when the user selection change, the position will be relocated to match the new selection, This is interesting as when the user select 1 or a thousand unit he will always have an idea of the current goal of his selection without having 1 cross for each unit, (as side note maybe some user will want to have the accurate version of this, by that i mean having 1 cross for each unit)
This might solve the point from @methusalah

Et sinon starcraft le fait mais que lorsque l'utilisateur utilise le system de waypoint en gros quand tu maintient maj... sinon pour un seul ordre non il le fait pas. (Salut les gars :D)

@methusalah
Copy link
Owner

It's impossible to set a cross for each unit, because you can't nor decide neither predict where each unit will finally land.

I agree, however, that when you select a group in which units have different goals (which surely is a rare case), all goals must be drawn on the field.

(et pour les waypoints, on vera plus tard ! :))

@roroah
Copy link
Collaborator

roroah commented Apr 29, 2015

why not possible ? the engine know it no ?

@methusalah
Copy link
Owner

If the group can keep its formation all along the path then yes, the engine can ask to each unit to go to an offseted goal. It means no obstacles and no turn. This particluar but very common case still has to be managed.

Else, if the group formation is broken, the unit motion become unpredictable and the placement of units at arrival will depend on many things : available place around the goal, size and speed of the units, obstacles... it's stochastic.

@roroah
Copy link
Collaborator

roroah commented Apr 29, 2015

I don't get how the pathfind work so :/
I though it was calculated for individual unit, it isn't the case ?

@methusalah
Copy link
Owner

You may want to read that wiki's page about the motion : https://github.com/methusalah/OpenRTS/wiki/Unit-and-projectile-motion

Wathever the pathfinder, each unit has the clicked location as goal. But as you've mentionned, all units won't be able to stand at this precise location at the same time. When the firt arrives, it stops and lets pass allies. The second pushes it away to get to the point. The third pushes the two as well and so on.

In the current implementation, which may be not the best, a unit consider to be arrived when it reaches the point OR when one of the very close ally has reach the point. It doesn't yet consider its location as its post. It waits for the entire group to have reach the location in one way or the other before considering to have found a place to stay and hold.

For a large group of zergling, nobody can predict where that post will be before all the group has reach the average and acceptable destination.

@roroah
Copy link
Collaborator

roroah commented Apr 30, 2015

The AI is based on that ? http://gamedevelopment.tutsplus.com/series/understanding-steering-behaviors--gamedev-12732

The explanation you did there helped me more than the one on the wiki maybe adding it as introduction to that wiki part will be nice.

To get back to the subject, following the way the pathfind work i don't know, xD

@methusalah
Copy link
Owner

I've indeed read this learning guide, a long time ago, but I've been more inspired by the flocking article of the same site : http://gamedevelopment.tutsplus.com/tutorials/the-three-simple-rules-of-flocking-behaviors-alignment-cohesion-and-separation--gamedev-3444

The wiki article only talk about motion, which is not considered as "intelligence" but more as a behavior. Here we also talk about what I called post. The post is the location a unit intend to stand on. If the unit is pushed away by passing allies, it come back to its post.

In the first implementation, the units was always considering the target as their post, so that in large groups, units where fighting continously for the closest place : https://www.youtube.com/watch?v=OzB0FvhB5rM#t=0m7s

You're right to say that the wiki artcile lack some explanations about the post mechanism ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants