Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
I have problem blitting sprites
#15
A500 schrieb:Ohh I discovered something else on it. If I keep it on for sometimes it crashes. As if it causes some memory leak or something.
Works for me. Had it running for half an hour, and freed everything up to the last byte.
Did you use my code or did you change yours? I suspect you changed your code...
You need to take loop-invariant stuff out of the loop, e.g. cutting all the shapes.

A500 schrieb:Concerning how to switch between sprites I figured it out thanks Big Grin As for the crashing, it happens only within AmiBlitz but if I run it from it's stand alone it stays there but when I quit it crashes. Must because I did not free the bitmap,etc. Thanks by the way! Now I can start working on my game again Smile.
Probably you did it wrong, that's why it crashes. You don't have to free Blitz Objects, as I said in a post before. They are all auto-freed when you call "end". Also, if something throws you an error when running with Debugger from Amiblitz3, it will not magically work if compiled as executable. You will have the same bug, it just does not cause the machine to Guru immediately, but trashes memory and will produce all kinds of errors at a later time, often when resources are freed. That is why you run it with Debugger during development. The debugger is your friend ;-)
Zitieren


Nachrichten in diesem Thema

Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 6 Gast/Gäste