Sprite collisions in nxtBasic

For Scene Demos that display animations, graphics, and music. Also for tech demos of graphics capability of VERA or the audio capabilities of the PSG, FM, or PCM audio channels.
Post Reply
unartic
Posts: 145
Joined: Sat Oct 28, 2023 3:26 pm

Sprite collisions in nxtBasic

Post 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
User avatar
ahenry3068
Posts: 1136
Joined: Tue Apr 04, 2023 9:57 pm

Re: Sprite collisions in nxtBasic

Post 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...
unartic
Posts: 145
Joined: Sat Oct 28, 2023 3:26 pm

Re: Sprite collisions in nxtBasic

Post 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!
Post Reply