Project

General

Profile

Bug #816

Bob Col registers constant collisions

Added by John McGarey over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Target version:
Start date:
09/05/2021
Due date:
% Done:

0%

Estimated time:
Affected version:

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

Ball Game works in amos pro not in aoz.zip (160 KB) Ball Game works in amos pro not in aoz.zip full aoz project John McGarey, 09/05/2021 04:47 PM
Ball Game works in amos pro not in aoz.png (545 KB) Ball Game works in amos pro not in aoz.png screenshot of the code I pasted above John McGarey, 09/05/2021 04:47 PM
#1

Updated by Francois Lionet over 1 year ago

  • Status changed from New to Resolved
  • Assignee set to Francois Lionet

Works in Beta 10...

#2

Updated by Brian Flanagan over 1 year ago

Re-tested in 1.0.0 (B10) u16 (9/7)
Collisions work!

There are still 2 unrelated issues that need to be resolved.

  1. Paint still fails.
  2. The default font is still wrong for the Text command. (Of course, the Amiga manifest.)

Also available in: Atom PDF