Tried Collision detection sprite vs bitmap
At first, I tried a sprite created from my bitmap. But somehow, I couldn't get good result. So, I tried to use rectangle like picture 1.
The picture 1 shows rectangles which use palette#0 to 15 on background bitmap(4bit planes). The sprite(#0) is 4x4 rectangle with color#0-3 (2bit planes). If I use "SetColl 1,4", PColl(0) gets TRUE when sprite is over the color#1 rectangle. Good :)
I wonder that why SetColl takes bit plane param? It depends on(and should be) bitmap's depth isn't it? So, it doesn't need really. But it can take param.. Let me try this. I tested "SetColl 1,2". The result is that PColl(0) gets TRUE when the sprite is over the #1,#5,#9,#13. Ah, those color# has 0b01. How about "SetColl 1,3"? The result is PColl(0) gets TRUE when it is over the #1,#9. Interesting! More said, if I set "SetColl 1,1", PColl(0) is TRUE when palette# is odd. This is exactly same as "SetCollOdd".
SetCollHi also takes bit plane#. The manual said I should set the number of bitplanes of bitmap. But not said "must". If try "SetCollHi 2" for this 4 bitplanes bitmap, PColl(0) is TRUE when splite touches #2,3,6,7,10,11,14,15. Those color# has 0b10. Maybe I won't use this but interesting.
I took many time on this experiment though. Anyway, back to try collision detection with my bitmap. The picture 2 is that. The plane hits bitmap and back screen turns red. Yay!
Accomplishment:
- Tried collision detection
Get My First Shooting Game For Amiga
My First Shooting Game For Amiga
This is experimental project to create a shooter game from scratch. [Blitz Basic Game Jam 2022]
Status | Prototype |
Author | ElmonEPG |
Genre | Shooter |
Tags | Amiga, blitzbasic, Retro, Singleplayer |
More posts
- Testting multiple coplist in the 1 displayJan 22, 2023
- Added Logos and start screenNov 16, 2022
- Upload executable of submitted versionNov 15, 2022
- Resolve the issue to create executableNov 09, 2022
- Continue to develop this projectOct 31, 2022
- Update SourcesOct 28, 2022
- Upload sourcesOct 27, 2022
- Some moving functions for EnemyOct 24, 2022
- Now I can use global array in Statement/FunctionOct 21, 2022
- Screen shot of game and about scopeOct 20, 2022
Leave a comment
Log in with itch.io to leave a comment.