Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
basic saves the day
#1
My son is programming in an implementation of smalltalk and is working on a game where he has to keep track of world space and camera space and wanted to do a simple angle based system a shooter fires at a target and he hasn't studied trigonometry yet.  Dad to the rescue!  He was mixing up World space and camera space variables but that was fairly easy to spot. I showed him the proper formulas for calculating the difference in coordinates along angles but it wasn't working right for him so I showed him how it worked in QB64. It still wasn't working right for him and it took almost 2 hours of troubleshooting before I realized...doh.. "even though the internal logic of your programming language uses degrees it automatically converts to radians when doing trigonometry" . Luckily I had my little program to show the centuries old math is right. It was just a matter of figuring out which way his programming language thought 0 degrees was and figuring out the lag between object creation and when the angle between two objects was actually reported.

Being able to demonstrate the math in basic thanks to QB64 was the winner.
Reply


Messages In This Thread
basic saves the day - by James D Jarvis - 05-28-2023, 04:21 PM
RE: basic saves the day - by CharlieJV - 05-28-2023, 04:34 PM
RE: basic saves the day - by bplus - 05-28-2023, 06:19 PM
RE: basic saves the day - by aurel - 05-28-2023, 07:31 PM
RE: basic saves the day - by BSpinoza - 05-29-2023, 04:30 AM
RE: basic saves the day - by James D Jarvis - 05-29-2023, 04:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  BASIC is 60 years old bert22306 12 2,304 07-29-2024, 05:19 PM
Last Post: bobalooie
  When BASIC was at the top, do you agree? TempodiBasic 25 4,442 07-11-2024, 10:31 PM
Last Post: Pete
  a Tiny Basic Forum solo88 2 673 05-31-2024, 04:46 PM
Last Post: bplus
  Another Phoenix Basic with bird logo out there. Dav 9 1,844 05-18-2024, 07:19 PM
Last Post: Kernelpanic
  BASIC turns 60 today! TerryRitchie 10 1,872 05-02-2024, 05:36 PM
Last Post: TerryRitchie

Forum Jump:


Users browsing this thread: 1 Guest(s)