Jump to content
IGNORED

16-position rotation and movement


kisrael

Recommended Posts

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.

spin16.bas.txt

spin16.bas.bin

Link to comment
Share on other sites

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.

895501[/snapback]

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.

Link to comment
Share on other sites

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...)

Link to comment
Share on other sites

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...

896342[/snapback]

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...