Re: Intelligent Running Algorithm
- From: Paul Donnelly <paul-donnelly@xxxxxxxxxxxxx>
- Date: Sat, 28 Mar 2009 21:26:31 -0500
Cuboidz <Dieter.Bercx@xxxxxxxxx> writes:
On 28 mrt, 01:36, Paul Donnelly <paul-donne...@xxxxxxxxxxxxx> wrote:
1. Ignore the distance behind us. Probably only along the axis we're
actually running in; doubling back diagonally is something a person
might want to do.
I don't really know what you mean by this. :-)
What I had in mind was that the program would probe for interesting
distance increases in all 8 directions.
So for example, if @ is moving to the left here....
#######################
# <- @ #
# / #
# #########
# #
# #
###############
The @ would stop when that diagonal move was available. It might or
might not be desirable to stop for the diagonal *and* the later
vertical, but it was the idea in my mind.
#######################
# |<- @ #
# / #
# /#########
# / #
# / #
###############
But obviously it wouldn't do to count changes in the direction @ came
from (marked with =====), since it has to increase unless the walls are
chasing the player. Normally the direction @ is moving in could be
ignored as well (it should continuously decrease), but there's no harm
in including it, and it's possible that changes to the map could occur,
making it useful.
#######################
# <- @=====#
# #
# #########
# #
# #
###############
#######################
# <- @=====#
# #
# #########
# #
# #
###############
You sidestepped it completely by excluding diagonal movement, and by
only testing the axis not being moved along.
Oh, and here's the specific case I had in mind, about doubling back. If
diagonal movement is included, the player might want to run into this
passage when they get lined up with it.
<- @
\####
###
########
<-@
\ ####
\###
\
########
.
- Follow-Ups:
- Re: Intelligent Running Algorithm
- From: Cuboidz
- Re: Intelligent Running Algorithm
- From: Gelatinous Mutant Coconut
- Re: Intelligent Running Algorithm
- References:
- Intelligent Running Algorithm
- From: Cuboidz
- Re: Intelligent Running Algorithm
- From: Paul Donnelly
- Re: Intelligent Running Algorithm
- From: Cuboidz
- Re: Intelligent Running Algorithm
- From: Paul Donnelly
- Re: Intelligent Running Algorithm
- From: Cuboidz
- Intelligent Running Algorithm
- Prev by Date: Re: Refactoring
- Next by Date: Re: Refactoring
- Previous by thread: Re: Intelligent Running Algorithm
- Next by thread: Re: Intelligent Running Algorithm
- Index(es):
Relevant Pages
|