kisrael Posted July 21, 2005 Share Posted July 21, 2005 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 Quote Link to comment Share on other sites More sharing options...
+batari Posted July 21, 2005 Share Posted July 21, 2005 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. Quote Link to comment Share on other sites More sharing options...
djmips Posted July 21, 2005 Share Posted July 21, 2005 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) Quote Link to comment Share on other sites More sharing options...
kisrael Posted July 21, 2005 Author Share Posted July 21, 2005 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...) Quote Link to comment Share on other sites More sharing options...
fsuinnc Posted July 22, 2005 Share Posted July 22, 2005 Using stella and Z28 all I get is some sound and an all black screen, but no jet? Quote Link to comment Share on other sites More sharing options...
kisrael Posted July 22, 2005 Author Share Posted July 22, 2005 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... Quote Link to comment Share on other sites More sharing options...
+stephena Posted July 22, 2005 Share Posted July 22, 2005 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.