Re: LZ: graphical question
[Prev][Next][Index][Thread]
According to "Will Stokes (3D Diamond productions / Global Games)":
> My next problem it not a problem at all. I was wondering what the
>fastest way to graph the two lines would be. I could go through all x
>values and y valeus for one line and then for the other. That would be
>under 63+127+127+63 so under 380 numbers. 400 numbers shouldn't take too
>long....right? Well any suggestions on methods to graph it would be
>appreaciated. I can't acces the graphing functions on the rom anyway can
>I?
You could access the ROM functions if you could find the locations of it for
each ROM set - I wouldn't bother though, cause they are SLOW - as you know.
Hmm... If you could set up your equation to operate on the ranges 0-128,
0-64, you get the idea... that would probably be easiest.
> Also, I have to determine a way to only draw on one side of the
>vertex, not both. I'm not drawing U turns. maybe that could be a variable
>(the vertex represented by x=somthing) and the program referes to that
>point and the magnitude of the turn (1-5 left, 6-10 right, you get the
>idea) to determine which side of the vertex to draw it. Any suggestions
>appreciated.
Hmm.. you could just stop drawing at the vertex... if you write your own
routines to do this, like I suggested. This is very much like a piece-wise
function. There are a set of equations that allow you to convert a
domain/function set in a piece-wise function to a single y=.... equation on
the graph screen regardless of whether or not the section is linear. But
even though it does it, on non-turboed calcs the converted equation takes
almost 15 seconds to draw. :(
> Finally, I have three pictures drawn of the car. They are small,
>under 20 pixels each. I don't think I should have to use sprites for
>these. Besdies, I have never used sprites before anyway.
I am assuming that the car stays relatively stationary while the track does
most of the motion. You shouldn't need to do sprites. If you move the car
back and forth across the track, then you will need a sprite routine.
> one more important thing. I plan on incorporating the cource into
>a matrix that has been precreated. How do I do this? In other words, could
>anybody out there specifically tell me how to:
>(a.) put the matrix with all of it's values, simple ones ranging from 1 to
>40, at the bottom of the program where one puts .db "junk" strings.
>(b.) depending on variable "HERE" access the appropriate value in the one
>dimentional matrix.
>(c.) alter a value in the matrix but placing the value of "THIS" into
>place "HERE"
>
Try checking Columns by Mel Tsai, he has a good routine for self-modifying
sections of code. He now has released the source code to 3.0 - 1.0 and 2.0
were previously the only available pieces of source, and they didn't have
the self-modifying code. Check his homepage. ;)
Hope this helps,
Ryan Myers ( rmyers@teleport.com )
http://www.teleport.com/~rmyers/
"Canthus" or "Darren" on DARKWORLD / Twisted Fate
C> Warning: REALITY.SYS may be corrupt. Reboot universe(y/n)?
Follow-Ups:
References: