Subject: RE: [stella] Horizontal Positioning and Movement From: Piero Cavina <p.cavina@xxxxxxxxxxxxx> Date: Wed, 3 Sep 1997 13:55:28 +0100 |
At 14:01 -0500 2-09-1997, Robert "A." Colbert wrote: >>Could someone please give me some assistance with horizontal moveable >>object positioning and horizontal movement. >> >>I could really use a simple example of how it's done. Or at least a plain >>english explanation of the process. > >O.K. a plain English example it is then: >Now you're probably wondering if there is an easy way to translate a >horizontal pixel position into the coarse/fine positioning values. Yes :) (...) >The only problem with the above example is that it wastes 2 entire scanline. hmmm, if I'm not wrong the equivalent of "calcpos" used in "Adventure" is more compact, thoght you'll always end wasting 2 scanlines (one to calc the coarse/fine values, another to position the sprite). My suggestion for the beginner is always: FIRST write a little demo with ONE moving sprite, positioned during vblank time using the above routine (or a similiar one). THEN try to recycle a sprite to have multiple copies on the screen; you'll immediately learn that it's much harder if you've to do something else in the same scanlines used to position the sprite (ie to draw the other sprite or a missile). You need to know very well what you're doing at this point, so it's better first to gather some experience with some simple single-sprite experiments. >If you have only 1 copy of a player on a screen, then you can easily move the >player around by setting a movement value in HMP0 and using an HMOVE each >frame. This would move the player the number of pixels represented in HMP0 >each frame. Of course, with multiple copies of players, you have to keep >track of each copy's position on the screen and move the player to that >position before each copy is displayed. It seems that this feature (moving a sprite with repeated hits to HMOVE), together with RESMPx (the registers that reset the horizontal position of a missile to the center of its player) were designed to help the programmers to write some simple player/missile games. I doubt that they can have any use in more elaborate games. But I might be wrong... :-) P. -- Archives updated once/day at http://www.biglist.com/lists/stella/archives/ Unsubscribing and other info at http://www.biglist.com/lists/stella/stella.html
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: RE: [stella] Horizontal Positio, Nick S Bensema | Thread | Re: R: [stella] PCMSG 2.5 (Oystron?, Piero Cavina |
[stella] stock routines, Glenn Saunders | Date | Re: [stella] Wanted: Buff 2600 prog, kickass |
Month |