EXPL2021.BAS - GW-BASIC, 2021 refactor: 16-color explosion version
I toyed with my old code, and noticed I was setting X and Y velocities independently, which was causing a cross shape effect. I recalled my old code to use arc-tangent of 1 to compute PI, which is PI=ATN(1)*4. By this age I had already memorized PI to 15 or 16 digits since I had typed it so many times that it would've been impossible not to know. This version uses the 16-color 320x200 Tandy mode. I also toyed with trying to use the colorburst & erase parameter in SCREEN to clear screens quickly, but I couldn't get it to work; unsure if this is a PC-BASIC bug or if it never worked the way... since the documentation is strange; why would you want a quick screen clear that only is usable if you clear both the new and old screen? It forces you to use triple buffering instead of double buffering, and also requires a precise update to active/visible pages to ensure the pages being deleted are not the ones you are using, and it's unclear what new and old means.
My playlists:
--------------------
- Voxel: https://youtu.be/watch?v=XCVWEuhCCDM&list=PLjnbT4UISq0bQF1g85tE9jTrKfEtdRYlY
- Road: https://youtu.be/watch?v=ck5ALX11YU4&list=PLjnbT4UISq0bnfd1RC3M4PgTgkmhlkikV
- Ray Casting 3D: https://youtu.be/watch?v=zjswXUTMP2o&list=PLjnbT4UISq0YcFtRFjFQqK0g6ONNCtrvY
- Side-Scroll Shmup: https://youtu.be/watch?v=fF4X8zN-Raw&list=PLjnbT4UISq0Y_7IAN_zUzxgZnfhXxo_0Q
- MonoGame Tutorial: https://youtube.com/watch?v=WW1dJnfXWb0&list=PLjnbT4UISq0adw__Y9B2eXA0LL35TyORU
My websites:
---------------------
- my GitHub: https://github.com/JDoucette
- my company: http://xona.com
- my Blog: http://thefirstpixel.com