Rocket Game - from 101 BASIC Computer Games
|
08-16-2015, 04:39 PM
(This post was last modified: 08-19-2015 01:36 AM by smp.)
Post: #1
|
|||
|
|||
Rocket Game - from 101 BASIC Computer Games
I am attempting to convert the old Rocket BASIC game (from 101 BASIC Computer Games by Digital Equipment Corporation) to run on my HP Prime calculator. I'm doing this as one of my exercises in learning to program on the HP Prime, and also to end up with one of the vintage games I love running on my calculator.
Here's the original BASIC code: Code:
If you peruse the original code, you will see the quandary that I'm in. It is peppered with GOTOs and jumps as the result of IF THEN statements. Disentangling this has become somewhat of a mission for me. I have figured out the way I want to do my version of this program. It is a simple falling body in a vacuum problem, so there are two conditions: Are you still above the ground? and Do you have any fuel left for your retro rockets? You must manage your descent using different rates of fuel consumption in order to arrive at the ground with fuel left, and pretty near zero downward velocity. So I have the following code working for a falling body in a vacuum: Code:
This code I have works perfectly like the sample run in the original book for the time that there is 0 as the input for the burn rate, so I figure that I have the falling body in a vacuum code in good shape. Where I have been struggling for the past week, is to understand what the original author is doing to form the opposing vector made by the entry of the burn rate. It looks to me like the original code converts everything to increments of time somehow and computes distance and velocity from that? I'm pretty much stumped at this point. If anyone cares to take a look at the code and offer me any suggestions on how to implement the retro rocket burn rate to slow the descent, I would greatly appreciate any thoughts you may have. Thanks in advance! smp |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Rocket Game - from 101 BASIC Computer Games - smp - 08-16-2015 04:39 PM
RE: Rocket Game - from 101 BASIC Computer Games - Martin Hepperle - 08-18-2015, 08:34 AM
RE: Rocket Game - from 101 BASIC Computer Games - smp - 08-18-2015, 11:21 AM
RE: Rocket Game - from 101 BASIC Computer Games - Martin Hepperle - 08-31-2015, 09:43 AM
RE: Rocket Game - from 101 BASIC Computer Games - smp - 08-31-2015, 11:32 AM
RE: Rocket Game - from 101 BASIC Computer Games - DrD - 08-18-2015, 12:14 PM
RE: Rocket Game - from 101 BASIC Computer Games - smp - 08-18-2015, 12:30 PM
RE: Rocket Game - from 101 BASIC Computer Games - toml_12953 - 08-18-2015, 02:39 PM
RE: Rocket Game - from 101 BASIC Computer Games - smp - 08-18-2015, 04:06 PM
RE: Rocket Game - from 101 BASIC Computer Games - Mysha - 12-31-2018, 09:13 AM
RE: Rocket Game - from 101 BASIC Computer Games - Steve Simpkin - 12-31-2018, 07:16 PM
|
User(s) browsing this thread: 3 Guest(s)