Page 1 of 1

Sprite collisions in nxtBasic

Posted: Sun Jul 07, 2024 3:57 pm
by unartic
A quick demo of how nxtBasic (new x16 compiler for Basic code) handles sprite collissions.

In this example there are three sprites (three balls) that move in a random pattern accross the screen. Whenever two or more balls overlap, the balls slow down significantly (on purpose), and which balls are overlapping is displayed on the screen. This works with any number of sprites.

Source is for reference only, as nxtBasic has not yet been released.

Try It Now!

Download
CollidingBalls.zip
(5.55 KiB) Downloaded 88 times
Source:
CollidingBalls.bas
(1.98 KiB) Downloaded 98 times

Re: Sprite collisions in nxtBasic

Posted: Sun Jul 07, 2024 8:51 pm
by ahenry3068
unartic wrote: Sun Jul 07, 2024 3:57 pm A quick demo of how nxtBasic (new x16 compiler for Basic code) handles sprite collissions.

In this example there are three sprites (three balls) that move in a random pattern accross the screen. Whenever two or more balls overlap, the balls slow down significantly (on purpose), and which balls are overlapping is displayed on the screen. This works with any number of sprites.

Source is for reference only, as nxtBasic has not yet been released.

Try It Now!

Download
CollidingBalls.zip

Source:
CollidingBalls.bas
I'm officially interested in what your coming up with. Don't you think it's time to take on a couple of Alpha or Beta users of your compiler. :).. I was using the ROM BASLOAD a long time before it was in the official Kernal...

Re: Sprite collisions in nxtBasic

Posted: Mon Jul 08, 2024 7:25 am
by unartic
ahenry3068 wrote: Sun Jul 07, 2024 8:51 pm
I'm officially interested in what your coming up with. Don't you think it's time to take on a couple of Alpha or Beta users of your compiler. :).. I was using the ROM BASLOAD a long time before it was in the official Kernal...
I think you're right :-) I'll put a message on discord soon!