Jump to content

Photo

16-position rotation and movement


6 replies to this topic

#1 kisrael OFFLINE  

kisrael

    HMBL 2600 coder

  • 4,071 posts
  • 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 batari OFFLINE  

batari

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

  • 6,680 posts
  • begin 644 contest

Posted Wed Jul 20, 2005 10:19 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.

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 djmips OFFLINE  

djmips

    Dragonstomper

  • 634 posts
  • 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 kisrael OFFLINE  

kisrael

    HMBL 2600 coder

  • Topic Starter
  • 4,071 posts
  • Location:Boston Burbs, MA

Posted Thu Jul 21, 2005 12:19 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)


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 fsuinnc OFFLINE  

fsuinnc

    Moonsweeper

  • 487 posts
  • 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 kisrael OFFLINE  

kisrael

    HMBL 2600 coder

  • Topic Starter
  • 4,071 posts
  • 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 stephena OFFLINE  

stephena

    River Patroller

  • 3,355 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Fri Jul 22, 2005 6:17 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...

View Post

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




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users