Jump to content

16-position rotation and movement


6 replies to this topic

#1  

    HMBL 2600 coder

  • 3,970 posts
  • Joined: 10-July 02
  • Location:Boston Burbs, MA

Posted Wed Jul 20, 2005 10:00 PM

This is just a small demo, I decided to see if I could do a "16 position rotation/movement" like you see in Combat. That's supposed to be a little jet, or something.

It's really crying out for "subpixel positioning" -- right now to throttle the speed and control I only change values of N frames, which is kind of primitive. But for "subpixel" I'd have to get into fractional, fixed point math and I think I'll wait and see what Batari adds to the language to help with that first, at least for now.

One thing I might try someday is a port of Intellivision biplanes, which is a bit like combat biplanes but there's gravity and stalling and all that good stuff.

Attached Files



#2  

    )66]U('=I;B$*

  • 6,193 posts
  • Joined: 20-September 04
  • begin 644 contest

Posted Wed Jul 20, 2005 10:19 PM

kisrael, on Wed Jul 20, 2005 11:00 PM, said:

This is just a small demo, I decided to see if I could do a "16 position rotation/movement" like you see in Combat.  That's supposed to be a little jet, or something.

It's really crying out for "subpixel positioning" -- right now to throttle the speed and control I only change values of N frames, which is kind of primitive.  But for "subpixel" I'd have to get into fractional, fixed point math and I think I'll wait and see what Batari adds to the language to help with that first, at least for now.

One thing I might try someday is a port of Intellivision biplanes, which is a bit like combat biplanes but there's gravity and stalling and all that good stuff.

View Post

I'm working on fixed point variables and math for the next release. I don't want to do just 8.8 since people will run out of bytes quickly, so I'm going to allow variables to be dim'ed as 4.4 as well. 8.8 should be useful for x and y positioning, and 4.4 should be good for velocities - and will be signed, such that it ranges from -8 to +8 at steps of 1/16th.

#3  

    Dragonstomper

  • 590 posts
  • Joined: 27-November 03
  • scrolling
  • Location:Seattle

Posted Wed Jul 20, 2005 11:42 PM

Ah... that's excellent. Supporting fixed point as a native type is something that the original 8 bit Basics should have had! (not to mention C)

#4  

    HMBL 2600 coder

  • 3,970 posts
  • Joined: 10-July 02
  • Location:Boston Burbs, MA

Posted Thu Jul 21, 2005 12:19 PM

djmips, on Wed Jul 20, 2005 10:42 PM, said:

Ah... that's excellent.  Supporting fixed point as a native type is something that the original 8 bit Basics should have had!  (not to mention C)

Yeah. 4bit/4bit would probably be useful too. I guess you just need commands that can add another 8 bit value to either the integer or the fractional part, as well as a command to extract either the integer or fractional part.

I wonder if a new syntax would be useful, for constants?
Like
5|3
representing a byte that was 5 for the integer and "3/16" for the fraction, so like
01010011 in binary

It might make sense to have that, rather than saying only
0.0625
0.125
0.1875

I'd still be ok with using 2 bytes per fixed point value, and then just having some special add and subtract routines (I think you're going to need some special routines anyway, I think it's going to be too weird to keep the syntax clean...)

#5  

    Chopper Commander

  • 173 posts
  • Joined: 10-May 01
  • Location:Chapel Hill NC.

Posted Fri Jul 22, 2005 5:30 AM

Using stella and Z28 all I get is some sound and an all black screen, but no jet?

#6  

    HMBL 2600 coder

  • 3,970 posts
  • Joined: 10-July 02
  • Location:Boston Burbs, MA

Posted Fri Jul 22, 2005 5:52 AM

You shouldn't be getting any sound.

I just downloaded and it worked in Z26 and PCAEWin but not Stella. Strange.

Try compiling it from the .BAS file...

#7  

    Stargunner

  • 1,850 posts
  • Joined: 11-May 02
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Fri Jul 22, 2005 6:17 AM

kisrael, on Fri Jul 22, 2005 8:22 AM, said:

You shouldn't be getting any sound.

I just downloaded and it worked in Z26 and PCAEWin but not Stella. Strange.

Try compiling it from the .BAS file...

View Post

It works with the current CVS version of Stella, so I guess there's a problem with Stella 1.4.2.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users