English
Forum

SetBackAutoCollision

 
Hallöchen
SetBackAutoCollision would Yes a swell thing, if I dahintersteigen would.
I Have a mask prepares, which The begehbaren Flächen Black contain.
now have I with
string area#,0=RES/L1NEG.BMP
backgroundneg&=LoadExtImage(area#)

CopyExtBmp(%HDC,50,50,800,500,background&,0,0,0)
> background& here otherwise becomes Yes The mask displayed <

these still in memory. (the Original becomes Yes displayed)
if I then
SetBackAutoCollision (sprites&,backgroundneg&,1,0,0,GetBmpWidth(backgroundneg&),GetBmpHeight(backgroundneg&),0,0,0,0)
take, becomes of course How desired on walls u.s.w angehalten - but not always and correctly - Figur runs withal WEIS from the Spielbereich out.
what could I wrong make?
thanks in the Vorraus
Rolf
 
04/20/04  
 



Hello Rolf,

the can I you so not answer, moreover should I your code testing.
can his, the The weißen Flächen not wide benug are ? The müßen naturally something breiter his, as How the Figur moving. Z.B. The Figur moving itself with speed 6, then must The weiße demarcation at least 7 Pixel wide/high his, otherwise it may with the Kollisionsprüfung occur, the the Sprite by the Wand runs...

If you me whom code + Graphics mail, I will it gladly testing.

beautiful Restwochenende,
Frank
 
04/20/04  
 



I versuchs time moreover - code evtl later.
but I have now The mask to right and down (means only the black - is a more expanse and the point too big enough!)moved and see there: now works it almost correct. comic?
means before has The mask very with the Original gedeckt well then shift the mask to right under and it works.
Rolf
 
04/20/04  
 



Hi,

I hope Yes, the your Maskenbitmap The same Size own, How your background, or ? otherwise can I me such Verschiebungen namely not explain.
Grade SetBackAutoCollision() have I with great care tested... )

Greeting, Frank
 
04/20/04  
 



Hi Frank - I swear
Yes The mask corresponds to spot-on the Original.
The mask have I Yes from the Original prepares. means everything Black what begehbar his should and everything wisely, what not.
Habs with bmp, gif and jpg tested well then even one other Image prepares - very the same thing.
it comes me to, as if The mask in memory somehow moved is - because if I running, then is z.B. one tree at a others place.
Rolf
 
04/20/04  
 



OK Have yet More rausgefunden:
it works pixelgenau with
CopyExtBmp(%HDC,0,0,%maxx,%maxy,background&,0,0,0)
- means if I whom whole screen copy
with
CopyExtBmp(%HDC,0,800,500,background&,0,0,0)
- there I get this Verschiebeffekt.
but so - genial - have a tree by wisely very filled and the Figur holds really on whom Pixeln on - STARK so haste really plenty plenty work on Coden erspart.
Rolf
 
04/20/04  
 



Hi !

How wide is because The Maskenbitmap? really 800x500?
Poste time Please, How You The Images load or The HDCs generierst.

at that copy is on the sichersten always:

CopyExtBmp(%HDC,0,0,GetBmpWidth(background&),GetBmpHeight(background&),background&,0,0,0)
CopyExtBmp(%HDC2,0,0,GetBmpWidth(background&),GetBmpHeight(background&),background&,0,0,0)

best mail You me time your Werk what about me werds vertraulich testing...

Greeting, Frank
 
04/20/04  
 



hey, Have straight yet what discover. there missing one Parameter !!!

CopyExtBmp(%HDC,0,800,500,background&,0,0,0)

-> must but hot...

CopyExtBmp(%HDC,0,0,800,500,background&,0,0,0)

Wars the ?

Greeting, Frank
 
04/20/04  
 



no Sorry, the was just one Kopierfehler here within this Forums (at Post) - habs simply wrong changed.
but How said with %maxx and %Maxy works correct.
Rolf
 
04/20/04  
 



Hello Frank and Rolf,

with the SetBackAutoCollision() have so did i already a little bit Problems had. If the mask and the background separated Bitmaps are and each extra loaded go works it. KOpiere I the two (and the sprites ) in a Bitmap and load then only The reaches works not and the figur verläuft itself. once The MAske a Own Bitmap is (copy the Hintergrunds with farbflecken) works it.

Gerold
 
04/20/04  
 



Hi,

self-evident must The Maskenbitmap a single Bitmap his, go yet others data therein stored, then changes itself naturally too The Size and length the Bitmap, and SetBackAutoCollision() rechnet with wrong Values.
Also becomes for a Maskenbitmap only one 2-colours-Image needed, everything else is Speicherverschwendung.

therefore is it on jedenfall vorteilhafter one Piece Source To post, there is a Error always rather to find as in a Fehlerbeschreibung.

i know, some functions are for Beginner not simply To manage, but eachone will think can, the functions How SetBackAutoCollision() maximum komplex works and thereby nevertheless only a function need...

nocturnal Regards,
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

4.781 Views

Untitledvor 0 min.
Mittermeier Daniel01/30/12

Themeninformationen

this Topic has 1 subscriber:

unbekannt (11x)


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