Bug #816
openBob Col registers constant collisions
0%
Description
Background:¶
I have a simple game from AMOSPro. When the 'bob col' command registers that the bullet hits the asteroid they are both sent off screen to different locations and then moved back on screen when needed.
Problem:¶
In AOZ when the bob col registers the collision and the two objects are instantly sent off screen to different locations, they register as having collided even though they are not in the same place.
In AMOS Pro there is no problem no matter how I handle the collision.
Considerations:¶
They are not in the same location off screen so they are not colliding off screen. in
AOZ Studio this same game registers a collision every frame when they are sent off screen and the game cant proceed.
Attachments:¶
A screenshot with some context, and the AOZ project itself. One file is the original AMOSPro file, the other has the following code to help test.
Code Details:
' bob 3 is bullet. bob 2 is asteroid
' when they collide sometimes they keep colliding forever. Theres nothing under the bob col command that mentions this and
' none of this happens in amos pro (I tssted every line below)
' Fail: moving bullet and asteroid off screen (to different locations) fails with constant collisions
fails: If Bob Col(3,2 To 2) Then Boom : fx=-30: fy=-10: Y1=-60 : X1=Rnd(92)+104 : Add SCORE,1 : Text 0,40,"Score:"+Str$(SCORE)
' OK: moving bullet off to the side (but not off screen) and asteroid fully off screen works
'works: If Bob Col(3,2 To 2) Then Boom : fx= 30: fy= 10: Y1=-60 : X1=Rnd(92)+104 : Add SCORE,1 : Text 0,40,"Score:"+Str$(SCORE)
'fails: If Bob Col(3,2 To 2) Then Boom : fx=-30: fy=-10: Y1=-60 : X1=Rnd(92)+104 : Add SCORE,1 : Text 0,40,"Score:"+Str$(SCORE)
' OK: turning the bullet off and letting it come back on later works
'works: If Bob Col(3,2 To 2) Then Boom : bob off 3: fx=-30: fy=-10: Y1=-60 : X1=Rnd(92)+104 : Add SCORE,1 : Text 0,40,"Score:"+Str$(SCORE)
'fails: If Bob Col(3,2 To 2) Then Boom : fx=-30: fy=-10: Y1=-60 : X1=Rnd(92)+104 : Add SCORE,1 : Text 0,40,"Score:"+Str$(SCORE)
' OK: turning the asteroid off and letting it come back on after vbl works
'works: If Bob Col(3,2 To 2) Then Boom : bob off 2: fx=-30: fy=-10: Y1=-60 : X1=Rnd(92)+104 : Add SCORE,1 : Text 0,40,"Score:"+Str$(SCORE)
'fails: If Bob Col(3,2 To 2) Then Boom : fx=-30: fy=-10: Y1=-60 : X1=Rnd(92)+104 : Add SCORE,1 : Text 0,40,"Score:"+Str$(SCORE)
' OK: moving bullet off screen and asteroid almost off screen works
'works: If Bob Col(3,2 To 2) Then Boom : fx=-30: fy=-10: Y1=-15 : X1=Rnd(92)+104 : Add SCORE,1 : Text 0,40,"Score:"+Str$(SCORE)
'fails: If Bob Col(3,2 To 2) Then Boom : fx=-30: fy=-10: Y1=-60 : X1=Rnd(92)+104 : Add SCORE,1 : Text 0,40,"Score:"+Str$(SCORE)
Files
Updated by Francois Lionet about 3 years ago
- Status changed from New to Resolved
- Assignee set to Francois Lionet
Works in Beta 10...
Updated by Brian Flanagan about 3 years ago
Re-tested in 1.0.0 (B10) u16 (9/7)
Collisions work!
There are still 2 unrelated issues that need to be resolved.
- Paint still fails.
- The default font is still wrong for the Text command. (Of course, the Amiga manifest.)