# Shortest paths in graphs

## Recommended Posts

Hi all!

Has anyone tried to solve this problem in A8 ML?

Any help would be really appreciated!

F.

##### Share on other sites

something like this?

```my aim is to bring some emenies to boinxx and i would like to use some dynamic approach to give boinxx a more "professional" look...

so i played around with some approaches and asked one of my mates who is a doctor of physics and he gave me this formular:

* vex=(px-ex)/16
* vey=(py-ey)/16
* ex=ex+vex
* ey=ey+vey

where Vex,y is velocity of the enemy while px,y is the position of the player. ex,y is the enemy position... it took me a little while and with the help of Thomas J. i implemented the code. the difficulty was that we have to deal with signed numbers and to move smooth on screen even with 8.8 fixed point maths. and this is something i managed to understand on 68000 but not on 6502... esp. signed numbers + division. so Thomas - the 2600 maniac behind thrust+ conversion - gave me this:

calc lda px
sec
sbc ex
sta vex
lda px+1
sbc ex+1
cmp #\$80
ror @
ror vex
cmp #\$80
ror @
ror vex
cmp #\$80
ror @
ror vex
cmp #\$80
ror @
ror vex
sta vex+1
lda vex
clc
sta ex
lda vex+1
sta ex+1
lda py
sec
sbc ey
sta vey
lda py+1
sbc ey+1
cmp #\$80
ror @
ror vey
cmp #\$80
ror @
ror vey
cmp #\$80
ror @
ror vey
cmp #\$80
ror @
ror vey

sta vey+1
lda vey
clc
sta ey
lda vey+1
sta ey+1
rts
```

used here...

http://atari.fandal.cz/detail.php?files_id=5685

##### Share on other sites

Hi all!

Has anyone tried to solve this problem in A8 ML?

Any help would be really appreciated!

F.

You mean like Dijkstra and A* approaches ?

Check out Amit's pages.. There's a wealth of knowledge hiding in there and information as to selecting the best method to use for your requirements.. Start at the top, but this is the page most likely to bear fruit

There's other sites dedicated to the whole art of A*, but that's a good place to start I think

##### Share on other sites

I wrote an A* implementation on the PC (non-recursive) in C, but I'm sure it would be too large and slow for the 8bit.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

• ### Recently Browsing   0 members

×
• Forums
• Clubs

• All Activity

• #### Subscriptions

×
• Create New...