Author Topic: Lander (my version)  (Read 4674 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Lander (my version)
« Reply #15 on: November 15, 2020, 06:20:50 pm »
Try a higher limit.  You’re only running at 2 FPS.

Yeah, well be careful with that, you are falling one character height per frame and dx should be just +1 or -1 = one character width per frame. So in 20 frames or so you will be landed.

Really I debated whether to make left arrow dx = -1 and right arrow dx = 1 but then I would need a key to make dx = 0.

This is a complete toy Lander don't over think this. Just wait until Lander is over spot you want to land and press the left arrow to stop progress to the right and just keep the Lander Up with up arrow until you cut the right progress and let it drop straight down to ground, piece of cake!

Aurel this is two much:
Code: QB64: [Select]
  1.             kh& = _KEYHIT
  2.             IF kh& = 19200 THEN dx = dx - 2
  3.             IF kh& = 19712 THEN dx = dx + 2
  4.             IF kh& = 18432 THEN y = y - 5
  5.