English
Forum

FINDPATH & 8-richtunngs-sprite

 
Hello frank,

finally be I moreover come my adventure moreover to program and the findpath commands einzufügen... Have me integrally beautiful time let, for that the order on my requests there eingefügt watts sorry, won't again vorkommen.

-little more präzision (on cost the rechenzeit) would already very helpful, it ought to not his, that the player itself whom 20fachen lane power circa in a tree vorbeizulaufen, the to its nose standing.

-the geforderte Black/white mask must very invertiert his in comparison with SetBackAutoCollision - the can sure not pseudo his. so must I twice one and the same mask provide with the each only Black and white vertauscht is.

-the theme I had Schonmal addressed and You meant it be very tricky and rechenaufwendig To solve - but is seeehr important! if I 4 directions for a sprite use is everything ok, but the schrägstellungen go in my opinion not correctly staid, everything what not 100% straight is using The slanting-frames. the should plenty More just aufgeteil his. supra = -22,5 To +22,5,rechtsoben = +22,5 To +77,5 then follows right with +77,5 To 110 - where The idealrichtun with of my auflistung always in the middle the both values lying.
with one MoveSpriteWithTable should means only yet the winkel from each 4 Coordinates accounts and be so The direction zugeordnet go. if it To plenty rechenzeit need can it still optional install, because as it now is saving one itself rather The slanting-directions, the sees namely very strange from.

the wars really again, I hope on a erfreuliche response

Sincerely,
sven
 
04/20/04  
 



Hello Sven,

finally be I moreover come my adventure moreover to program and the findpath commands einzufügen... Have me integrally beautiful time let, for that the order on my requests there eingefügt watts sorry, won't again vorkommen.
-little more präzision (on cost the rechenzeit) would already very helpful, it ought to not his, that the player itself whom 20fachen lane power circa in a tree vorbeizulaufen, the to its nose standing.

Well, whom 20fachen lane places it sure not back, the Have I not yet erlebt.
it's located indeed on the Grobheit the tuned Rasters (Parameter W). is the worth To big, müßen The walls very wide his, is it To small, then becomes the lane right inaccurate and the Berechnung lasts long. there must You your suitable worth for your jeweilige Programming find.
clear, It's all right too yet accurate, I could The Wegfindung so program, the always the optimale lane found becomes. moreover should of each point the calculated scheduler To each point a Bresenham Linienkonvertierung implemented and be eachone point eachone line compared go, whether a lane there spare is. the would but (whether Assembler or not) demaßen long last, the one vernünftiges game so not any more program go could.

-the geforderte Black/white mask must very invertiert his in comparison with SetBackAutoCollision - the can sure not pseudo his. so must I twice one and the same mask provide with the each only Black and white vertauscht is.

Yes, above I had me in Nachhinein angered, the was well my Error...
but then benötigst You even a Bitmap More, ought to Yes not the Riesenproblem his.
inverse copy goes through CopyExtBmp(...) (Kopiermodus 4).

-the theme I had Schonmal addressed and You meant it be very tricky and rechenaufwendig To solve - but is seeehr important! if I 4 directions for a sprite use is everything ok, but the schrägstellungen go in my opinion not correctly staid, everything what not 100% straight is using The slanting-frames. the should plenty More just aufgeteil his. supra = -22,5° To +22,5°,rechtsoben = +22,5 To +77,5° then follows right with +77,5° To 110° - where The idealrichtun with of my auflistung always in the middle the both values lying.
with one MoveSpriteWithTable should means only yet the winkel from each 4 Coordinates accounts and be so The direction zugeordnet go. if it To plenty rechenzeit need can it still optional install, because as it now is saving one itself rather The slanting-directions, the sees namely very strange from.

Hehe. it has here none sense, Winkel To to charge because the difference between two Points (Specifically in Kurven) often very small is, sometimes only one / two Pixel or even 0 (with of/ one axis). and spots skipping goes neither always (Specifically with geraden strain)...
in your drop must You The Animation by hand to charge, had to I with my game Asteroid too, went not differently. fetch The The position the Sprites and the latest (or. next) position your Sprites (in the example fx& and fy&). then berechnest You whom X-Offset in the Bitmap and setting by hand the new Animation:
CompileMarkSeparation
x&=-1
Case (fx1&>1):x&=6*48
Case (fx1&<-1):x&=2*48
Case (fy1&>1):x&=4*48
Case (fy1&<-1):x&=0*48
Case ((fx1&>3) and (fy1&>3)):x&=5*48
Case ((fx1&<-3) and (fy1&<-3)):x&=1*48
Case ((fx1&>3) and (fy1&<-3)):x&=7*48
Case ((fx1&<-3) and (fy1&>3)):x&=3*48

If x&<>-1

    SetSpriteAnim(raum1&,x&,0,48,48,1,1,8)

04/20/04  
 



Hello frank,

Perhaps not whom 20 fachen lane but already one detour, the whom adventure heroes as dope attend can so vaguely:  [...] 
>the would but (whether Assembler or not) demaßen long >last, the one vernünftiges game so not any more program >go could.
it must in the first not the perfect lane his and secondly not pixelgenau, You could the image again in cluster of x-pixel wide and höhe divide up and a additional genauigkeitgrad indicate. Perhaps can it too your jetztige procedure To, instead of one 10 ways auszuprobieren and of it whom best take - the would yet quick enough

>Yes, above I had me in Nachhinein angered, the >was well my Error...
>but then benötigst You even a Bitmap More...
Yes, the have I Pinned and me above angered I Please you either findpath or backcollision anzupassen. it might for recent user no trouble his your graphic ggf. To invertieren, but two Graphics in the memory To hold is unnecessary.

>for this code could so did i a faster function >make, if the desired is. look you my Asteroid game >at times, Specifically The Control.
jaaa, eachone here wish the The prospeed dll should everything take off what rechenzeit need.
 
04/20/04  
 



Hello Sven,

Perhaps not whom 20 fachen lane but already one detour, the whom adventure heroes as dope attend can so vaguely:  [...] 

well Yes, You could for different situations additional walls into mask install, sodaß one detour of in front come in prevented would.

it must in the first not the perfect lane his and secondly not pixelgenau, You could the image again in cluster of x-pixel wide and höhe divide up and a additional genauigkeitgrad indicate. Perhaps can it too your jetztige procedure To, instead of one 10 ways auszuprobieren and of it whom best take - the would yet quick enough

it would neither pixelgenau separate depends itself to Parameter W.
I wüßte neither, How I a almost-detailed lane release ought to... Perhaps have you got Yes to a idea )
10 ways mean zehnfache Ausführdauer, the would the latest, I wished. Ausserdem becomes IMMER the same lane accounts and a Wegsuch-function, on Zufallsbasis results in not and not more than To integrally large Umwegen...

I Please you either findpath or backcollision anzupassen. it might for recent user no trouble his your graphic ggf. To invertieren, but two Graphics in the memory To hold is unnecessary.
question: see that here because any so ?

jaaa, eachone here wish the The prospeed dll should everything take off what rechenzeit need.
your since verwöhnt !! ))))
OK.

Greeting, Frank
 
04/20/04  
 



>well Yes, You could for different situations >additional walls into mask install, sodaß one detour >of in front come in prevented would.
I know not How I the meaningfully make ought to

>well Yes, You could for different situations >additional walls into mask install, sodaß one detour >of in front come in prevented would
one can through each labyrinth weg, in the one itself always right holds or always left holds (simply time try) if one now whom direct lane of a to b dial and with one obstacle always intern right and left on it vorbeiläuft and the idealeren drop dial.
example:  [...] 
the sprite moving itself on the direct lane of a to b, with one obstacle becomes bevorzugt to right gone thereafter becomes again the direct lane to b adopted.

>your since verwöhnt !! ))))
its too in your senses, that your dll always perfekter becomes means mach time
 
04/20/04  
 



Hello,

i'm straight a simple and very sinnvolle improvement for findpath function invaded. You checkst first whether the direct lane spare is, unless then accounts The function How yet whom lane. because straight if one suitor lane existing power The function The biggest umwege.
 
04/20/04  
 



these function should whom player with findpath run, becomes no lane found goes the player normal with movesprite and remaining with one hinderniss dank SetBackAutoCollision(player&,mask&,1,0,0,0,0,0,0,0,0) stand. the trouble: if no lane found becomes runs the player until hinderniss, turn then circa and goes again to that startpunkt! lösche I The row path& = FINDPATH... then functions the stand stay on the hinderniss again How former - really ought to the still no einfluss hereon having, it'll Although a way sought but I move whom player then Yes not thereafter (because anyhow none found watts if movesprite is used)

one bow or one Error for may part?
CompileMarkSeparation
Proc Wegsuche

    declare path#,path&,array&,temp$
    parameters handle&,wstartx&,wstarty&,wzielx&,wziely&
    dim path#, 2048
    array&=InitExtFX(mask2&)
    path& = findPath(path#,array&,10,wstartx&,wstarty&,wzielx&,wziely&,1)

    if path&

        SmoothPath(path#,path&,8)
        SpriteTableMode (handle&,1)
        movespritewithtable(handle&,path#,div(path&,4),0,0,1)

    else

        MoveSprite(player&,wzielx&,wziely&)

    endif

    dispose path#

Endproc

 
04/20/04  
 



Hello Sven,

can you me Perhaps one funktionierendes example zuschicken, with Sprite- and Maskendaten ?

Greeting, Frank
 
04/20/04  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.260 Views

Untitledvor 0 min.
Peter Max Müller09/29/12

Themeninformationen

this Topic has 1 subscriber:

unbekannt (8x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie