best path detection...  solving this riddle... (Development Foros MSX)MSX Resource Center            
                       
English Nederlands Espa�ol Portugu�s Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 36 invitados y 2 miembros en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - best path detection... solving this riddle...

Ir a la página ( Página anterior 1 | 2 )
Autor

best path detection... solving this riddle...

Rikusu

msx professional
Mensajes: 965
Publicado: Octubre 25 2007, 01:06   
Ghehe, is someone finally making Heroes of Might and Magic 3 for MSX?
yum
msx addict
Mensajes: 442
Publicado: Octubre 25 2007, 13:14   
It was about time
AuroraMSX

msx master
Mensajes: 1277
Publicado: Octubre 27 2007, 18:20   
Finding the best path or route is an NPC (read: very hard to solve) problem. A* is indeed one of the best approaches, but it cannot guarantee that the solution found is the best possible solution!

You could try a different approach: split up your map into rectangular "rooms" which interconnect through doors. Obstacles in your map need to stay *outside* of any room. The rooms don"t need to be all equal - thay just need to be rectangular and you need to know which rooms connect through which door. Then getting from A to B is a matter of finding a path through the rooms, from door to door. You still might want to use A* for that, but since you're not operating on map-cell level but on room-level, it will be a lot faster. Needless to say that getting from one door in a room to another is just a matter of drawing a straight line :-)
Again, this may not give you the shortest path but it will find a path considerably faster than having to A* over the complete map.
 
Ir a la página ( Página anterior 1 | 2 )
 







(c) 1994 - 2009 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation