RXB Posted January 27, 2022 Share Posted January 27, 2022 Working with Lee I replied to new routines for SPRITES in RXB 2022 written in assembly. 1. I have not finished with the ALL version yet: CALL COLLIDE(ALL,TOLERANCE,DOTROW,DOTCOL,SPRITE1,SPRITE2) ALL,TOLERANCE will be input into COLLLIDE DOTROW,DOTCOL will be output for location of collision SPRITE1 is first sprite of collision SPIRTE2 is second sprite of collision 2. Answered above. 3. You would use COLLIDE in place of COINC as it returns more data. I may add DOTROW,DOTCOL for COLLIDE i.e. CALL COLLIDE(AT,TOLERANCE,DOTROW,DOTCOL,SPRITE) AT like ALL is a token I can use without a problem. AT,TOLARANCE,DOTROW,DOTCOL will be input into COLLLIDE SPRITE is first sprite of collision So AT token used in COLLIDE will tell you what SPRITE hit at that dot row & dot column. 1 Quote Link to comment Share on other sites More sharing options...
RXB Posted January 27, 2022 Share Posted January 27, 2022 23 hours ago, InsaneMultitasker said: Hi Rich, I have a question about RXB and how you implement random number generation. Recently, I have been making some minor corrections to the Geneve Advanced BASIC and something I noticed is that the RND random number sequence is always the same. Also, if you call "RANDOMIZE" without a seed, the same seed is used every single time. So everything is quite predictable. Are you using a fixed seed or is the seed randomized somehow when RXB initializes its environment? I don't know the best way to approach this. I appreciate any insight you might be able to share. RXB unlike normal XB my RXB uses the same exact RANDOM number generator as TI BASIC written in GPL. The RXB source code included with RXB releases. Just look for RND and RANDOMIZE in the GPL source code. 1 Quote Link to comment Share on other sites More sharing options...
RXB Posted January 28, 2022 Share Posted January 28, 2022 What is needed in XB is you get a sprite to hit a certain spot on screen but WHICH SPRITE out of 28 HIT THAT SPOT? Got the first draft done of CALL COLLIDE(AT,TOLERANCE,DOTROW,DOTCOL,SPRITE) So now instead of CALL COINC(ALL,variable) you now can know WHICH SPIRTE HIT A SPOT. Next need to finish CALL COLLIDE(ALL,TOLERANCE,DOTROW,DOTCOL,SPRITE1,SPRITE2) This will tell you DOT ROW, DOT COL where these sprites hit and which sprite hit which other sprite. My view is the complication dealing with sprites is no clue where they are or easy access was missing from XB. Now CALL POSITION(#sprite,dot row,dot col) SUCKS as which sprite? What location? So COLLIDE is like COINC & POSITION in one single command. 2 Quote Link to comment Share on other sites More sharing options...
SteveB Posted January 29, 2022 Share Posted January 29, 2022 On 1/26/2022 at 9:33 PM, InsaneMultitasker said: Hi Rich, I have a question about RXB and how you implement random number generation. Recently, I have been making some minor corrections to the Geneve Advanced BASIC and something I noticed is that the RND random number sequence is always the same. Also, if you call "RANDOMIZE" without a seed, the same seed is used every single time. So everything is quite predictable. Are you using a fixed seed or is the seed randomized somehow when RXB initializes its environment? I don't know the best way to approach this. I appreciate any insight you might be able to share. Hi, if you want/need your own random number generator I would recommend the attached IEEE publication. I used it to build my own (S)XB RND generator because sometimes I want to be in control of the seed even when compiled and the Basic Compiler does not allow to set a seed. // Returns an integer 0 <= RES < UL and advances the seed. Useful when you want a repeatable sequence, but be aware that // neighbor seeds will compute similar results, while the seed is updated with distinct values. SUB RAND(SEED,UL,RES) XDQ=INT(SEED/144) XMQ=SEED-(XDQ*144) SEED2=(227*XMQ)-(61*XDQ) IF SEED2>0 THEN SEED=SEED2 ELSE SEED=SEED2+32749 RES=INT(SEED/(32749/UL)) SUBEND ssst.1989.72438.pdf 4 Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted January 31, 2022 Share Posted January 31, 2022 Thank you, RXB and Steve B. Lee helped me locate the necessary changes for the existing code and the RANDOMIZE issue in Geneve's BASIC is resolved. I feel like I got a great primer on random numbers from you all! Much appreciated. 2 Quote Link to comment Share on other sites More sharing options...
MikeV Posted February 7, 2022 Share Posted February 7, 2022 On 12/31/2021 at 11:46 PM, RXB said: Just install a new Character set in RXB 2022 that replaces the one used since 2015. Notices the need for change as in some game there was no pixel between outside of one and the next if using a full block. Hi Rich - thanks for that. The way the old font was centered made use of the inverse feature and screen borders awkward as well. Steve Davis had an appealing lower case font (no lower case descending letters so compatible with use in conjunction with TI upper case) in case you are looking. 1 Quote Link to comment Share on other sites More sharing options...
Willsy Posted February 7, 2022 Share Posted February 7, 2022 (edited) TurboForth has a font that plays nicely with inverted characters (at least in 32 column mode - it's hard in 40 column mode as there are two pixels missing). I think I stole the font from Funnelweb. ; funnelweb editor lower case font: data >0000,>3808,>7848,>7c00 ; a data >4040,>7844,>4444,>7800 ; b data >0000,>3844,>4040,>3c00 ; c data >0404,>3c44,>4444,>3c00 ; etc data >0000,>3844,>7c40,>3c00 data >1c20,>7820,>2020,>2000 data >0000,>3c44,>443c,>0438 data >4040,>7844,>4444,>4400 data >1000,>3010,>1010,>3800 data >0800,>1808,>0808,>4830 data >2020,>2428,>3028,>2400 data >3010,>1010,>1010,>3800 data >0000,>7854,>5454,>5400 data >0000,>7844,>4444,>4400 data >0000,>3844,>4444,>3800 data >0000,>7844,>4478,>4040 data >0000,>3c44,>443c,>0404 data >0000,>5c60,>4040,>4000 data >0000,>3c40,>3804,>7800 data >0020,>7820,>2024,>1800 data >0000,>4444,>4444,>3c00 data >0000,>4444,>2828,>1000 data >0000,>4444,>5454,>2800 data >0000,>4428,>1028,>4400 data >0000,>4424,>1808,>1020 data >0000,>7c08,>1020,>7c00 Edited February 7, 2022 by Willsy added image 1 Quote Link to comment Share on other sites More sharing options...
atrax27407 Posted February 7, 2022 Share Posted February 7, 2022 You are correct Willsy, I remember the selection process well. 3 Quote Link to comment Share on other sites More sharing options...
RXB Posted February 7, 2022 Share Posted February 7, 2022 8 hours ago, MikeV said: Hi Rich - thanks for that. The way the old font was centered made use of the inverse feature and screen borders awkward as well. Steve Davis had an appealing lower case font (no lower case descending letters so compatible with use in conjunction with TI upper case) in case you are looking. Hmm how did you get RXB 2022 have not finished it yet? (It has a new character set pretty much like XB3) You must mean RXB 2021? Also the Character set in RXB 2021 and RXB 2022 are in ROM now so you can change then using a HEX Editor of ROM3 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted February 8, 2022 Share Posted February 8, 2022 (edited) On 12/31/2021 at 11:46 PM, RXB said: Just install a new Character set in RXB 2022 that replaces the one used since 2015. Notices the need for change as in some game there was no pixel between outside of one and the next if using a full block. The old RXB font had the pattern all the way to the left in the 8x8 grid. This leads to the problem noted above and also the cursor is not well centered on the character it is flashing on. I remember that you really liked that font and so the solution is simple - just shift all the patterns 1 pixel to the right. Here it is, already done for you: You can paste this into ROM3 using a hex editor. Bytes 00 to >7F are the TI header and should be ignored. The pattern for ascii 32 starts at >0080. The last 8 bytes are for the cursor and can be set to zero or whatever you want. (There was a minor error in the lower case j which looked like a capital J. That has been fixed.) (Edit) Turns out the solution was not quite as simple as I thought. Most of the characters needed to be shifted one pixel to the right, but not all, and so some of the rightmost pixels were truncated when using text mode. RXBFONT40 addresses this and now all the characters show up properly when using 40 columns. As noted above, the last 8 bytes are the cursor, and I modified that as well to be 6x8 so it shows up properly in 40 columns) RXBFONT40 Edited February 13, 2022 by senior_falcon 2 1 Quote Link to comment Share on other sites More sharing options...
MikeV Posted February 8, 2022 Share Posted February 8, 2022 On 2/7/2022 at 7:15 AM, Willsy said: TurboForth has a font that plays nicely with inverted characters (at least in 32 column mode - it's hard in 40 column mode as there are two pixels missing). I think I stole the font from Funnelweb. ; funnelweb editor lower case font: data >0000,>3808,>7848,>7c00 ; a data >4040,>7844,>4444,>7800 ; b data >0000,>3844,>4040,>3c00 ; c data >0404,>3c44,>4444,>3c00 ; etc data >0000,>3844,>7c40,>3c00 data >1c20,>7820,>2020,>2000 data >0000,>3c44,>443c,>0438 data >4040,>7844,>4444,>4400 data >1000,>3010,>1010,>3800 data >0800,>1808,>0808,>4830 data >2020,>2428,>3028,>2400 data >3010,>1010,>1010,>3800 data >0000,>7854,>5454,>5400 data >0000,>7844,>4444,>4400 data >0000,>3844,>4444,>3800 data >0000,>7844,>4478,>4040 data >0000,>3c44,>443c,>0404 data >0000,>5c60,>4040,>4000 data >0000,>3c40,>3804,>7800 data >0020,>7820,>2024,>1800 data >0000,>4444,>4444,>3c00 data >0000,>4444,>2828,>1000 data >0000,>4444,>5454,>2800 data >0000,>4428,>1028,>4400 data >0000,>4424,>1808,>1020 data >0000,>7c08,>1020,>7c00 Thank you for the font. The font and inverse look quite good with their use. 2 Quote Link to comment Share on other sites More sharing options...
MikeV Posted February 8, 2022 Share Posted February 8, 2022 23 hours ago, RXB said: Hmm how did you get RXB 2022 have not finished it yet? (It has a new character set pretty much like XB3) You must mean RXB 2021? Also the Character set in RXB 2021 and RXB 2022 are in ROM now so you can change then using a HEX Editor of ROM3 Well actually my latest in use version is 2020 (trying to get caught up!) 1 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted February 13, 2022 Share Posted February 13, 2022 Turns out my solution of shifting the patterns for the RXB font 1 pixel to the right was simplistic. It is almost, but not quite correct. See post 1385 above for the RXB font shifted so it works properly in text mode. 1 1 Quote Link to comment Share on other sites More sharing options...
RXB Posted February 25, 2022 Share Posted February 25, 2022 Did a test of XB PRINT vs CALL EXE(31450) 31450=>7ADA Scroll routine used in XB so same exact routine used by PRINT in XB. 100 CALL CLEAR 110 OPEN #1:"CLOCK" 120 INPUT #1:A$,B$,C$ 130 FOR C=1 TO 10000 140 PRINT 150 NEXT C 160 INPUT #1:D$,E$,F$ 170 PRINT A$,D$:B$,E$,C$,F$ 180 END Replaced 140 with CALL EXE(31450) so times are: XB = 14 minutes 52 seconds RXB 2021 = 12 minutes 27 seconds Why is RXB faster well XB has to find PRINT and decide what to do then do the SCROLL. While RXB just goes to ROM and does SCROLL. 1 Quote Link to comment Share on other sites More sharing options...
RXB Posted February 27, 2022 Share Posted February 27, 2022 Well after discussing the issues with LEE it is apparent the two routines are impossible to do: CALL COLLIDE(AT,TOLERANCE,DOTROW,DOTCOL,SPRITE) and CALL COLLIDE(ALL,TOLERANCE,DOTROW,DOTCOL,SPRITE1,SPRITE2) The TI is just too slow to scan all 28 sprites for a location or which two sprites collided. The issue is VDP speed to check that many sprites that are moving way out of spot reported. You could never use this at speeds above 60 for motion in XB, even at 40 would be a huge issue. At motion speed 127 would always miss a collide value. But I do have a workable: CALL COLLIDE(#SPR,#SPR,TOLERANCE,DOTROW,DOTCOL) Sprite 1 and Sprite 2 within tolerance hit at DOTROW and DOTCOL So at least you can show the location of two sprites that collide at a location. 3 Quote Link to comment Share on other sites More sharing options...
RXB Posted March 7, 2022 Share Posted March 7, 2022 RXB DEMO 10 CALL COLLIDE(#SPRITE1,#SPRITE2,TOLERANCE,RETURN-DOT-ROW,RETURN-DOT-COLUMN) or CALL COLLIDE(#SPRITE,DOT-ROW,DOT-COLUMN,TOLERANCE,RETURN-DOT-ROW,RETURN-DOT-COLUMN) RXB 2022 DEMO10 - YouTube 3 Quote Link to comment Share on other sites More sharing options...
RXB Posted March 7, 2022 Share Posted March 7, 2022 2022-03-06 16-55-21.mkv 1 Quote Link to comment Share on other sites More sharing options...
LanceLHall Posted March 7, 2022 Share Posted March 7, 2022 Interesting. I actually just watched a PixelPedant video yesterday and he talked about the collision detection shortcomings of a standard TI. 1 1 Quote Link to comment Share on other sites More sharing options...
1980gamer Posted March 7, 2022 Share Posted March 7, 2022 (edited) 19 hours ago, RXB said: RXB DEMO 10 CALL COLLIDE(#SPRITE1,#SPRITE2,TOLERANCE,RETURN-DOT-ROW,RETURN-DOT-COLUMN) or CALL COLLIDE(#SPRITE,DOT-ROW,DOT-COLUMN,TOLERANCE,RETURN-DOT-ROW,RETURN-DOT-COLUMN) RXB 2022 DEMO10 - YouTube This is a nice feature. How about CollideC as in CENTER. Instead of using the 1,1 position of a sprite, user the "center" 4,4 position or CollideV allow a position. That is, IF I only care about the bottom of the sprite I would move to the 8th row maybe column 4 or 5. If I want to test for RIGHT edge collision I would use column 8 and row 4 or 5. I know the tolerance kind of does this, but not really. --Edit Think about this. Using the POSITION part of this, we can offset the position already. That is if pixel row is 100 and column 100 testing the sprite top left position, I could just change 100,100 to 96,96 and that should make the sprite "center"collide at 100,100. Hope that was understandable? LONG DAY. Edited March 7, 2022 by 1980gamer Quote Link to comment Share on other sites More sharing options...
RXB Posted March 7, 2022 Share Posted March 7, 2022 1 hour ago, 1980gamer said: This is a nice feature. How about CollideC as in CENTER. Instead of using the 1,1 position of a sprite, user the "center" 4,4 position or CollideV allow a position. That is, IF I only care about the bottom of the sprite I would move to the 8th row maybe column 4 or 5. If I want to test for RIGHT edge collision I would use column 8 and row 4 or 5. I know the tolerance kind of does this, but not really. --Edit Think about this. Using the POSITION part of this, we can offset the position already. That is if pixel row is 100 and column 100 testing the sprite top left position, I could just change 100,100 to 96,96 and that should make the sprite "center"collide at 100,100. Hope that was understandable? LONG DAY. That location is a hardware limitation not a software limitation. There are 64 pixels and they start at the top left corner when defined so how would you do this? Not that it would not be more convenient so I agree but how would you accomplish this in moving sprites? See the problem with your concept is this is a HARDWARE DESIGN PROBLEM by Texas Instruments. This is why the orginal XB has CALL COINC that has a TOLERANCE, it is forced on me also. And yes many programmers have tried to overcome this from software before. 2 1 Quote Link to comment Share on other sites More sharing options...
RXB Posted March 16, 2022 Share Posted March 16, 2022 New feature to RXB2022 all written in Assembly so way faster than PRINT: CALL SCROLLUP or CALL SCROLLUP(1,"") both do exactly same thing but faster one is without the (values) needed for 1 like up. Also SCROLLDOWN, SCROLLLEFT, and SCROLLRIGHT too. Of course you can include a string: CALL SCROLLUP(4," THIS IS A TEST") would be the same as: PRINT : : : : "THIS IS A TEST" Timed 10,000 loop: TI Basic 14 minutes 16 seconds XB PRINT 13 minutes 9 seconds XB 2.7 13 minutes 9 seconds XB3 9 minutes 7 seconds RXB SCROLLUP 8 minutes 25 seconds 6 Quote Link to comment Share on other sites More sharing options...
RXB Posted March 18, 2022 Share Posted March 18, 2022 RXB 2022 DEMO 11 RXB2022 DEMO 11 - YouTube 5 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted March 18, 2022 Share Posted March 18, 2022 Looks good Rich. Pretty snappy. 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted March 18, 2022 Share Posted March 18, 2022 It's definitely the way to go for basic basically 1 1 Quote Link to comment Share on other sites More sharing options...
Willsy Posted March 19, 2022 Share Posted March 19, 2022 That's a great demo, Richard. Watched the whole thing! 1 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.