🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: rec.games.programmer
1 messages
1 total messages Started by Pat Draper Tue, 04 Aug 1992 04:30
Moving things around
#404
Author: Pat Draper
Date: Tue, 04 Aug 1992 04:30
34 lines
2098 bytes
I've adapted the Bresenhan line drawing algorithm for the purpose of moving
objects around on the screen. I'm pretty proud of my work so far (half done)
but the idea is most likely not original with me.

I'm writing the programmer's equivalent to the literate's "Great American
Novel" - the Great American Star Trek Game. :-) (How many of these ARE there
I wonder.)

Anyway, I needed a quick way to move an object along a line from point x to
point y, and Bresenhan was close to what I wanted. It's entirely integer, so
it's fast. Is the thing patented? I wouldn't want to cause trouble..

To get the endpoints of my line, I plan on using a single sequence of
transcendental functions and floating point to calculate polar coordinates,
with the current ship position at the center.I figure that the overhead will
not be very great since the calculations will have to be done relatively
infrequently.

Does anyone have any INTEGER methods of calculating polar coordinates and/or
translations? I'd be most interested, since the single floating point
location in my code could possibly turn into a performance limiter.

Also, what methods have anyone else come up with similar/different to my own
to solve the spaceship movement problem?

Thanks for any comments, answers, and flames.


------------------////////////////////\\\\\\\\\\\\\\\\\\\\------------------
| Patrick Draper           Disclaimer:  I can't control my fingers,        |
| draper@irie.ais.edu                   I can't control my toes! - Ramones |
| University of Michigan                                                   |
| Computer Club                We are a nation of laws, not people         |
------------------\\\\\\\\\\\\\\\\\\\\////////////////////------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads