Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

551 Excellent

About vitoco

  • Rank

Contact / Social Media

Profile Information

  • Gender
  1. Did it take me 2 minutes to write the first paragraph? Really? Both paragraphs were written in the same reply and submitted at the same time... 🤔 Update: In the notification email it says: 🤨
  2. About email notifications, I miss a link to the first unread post in the related thread. Sometimes I receive many emails with the same subject for some days, but when I couldn't read each of them from my mailbox, I think it's time to go to the forum to be updated, but if I click the link at the last notification, I get that last post, not the first unread one. Going back manually to find the last one I've read is a pain... and spoiler!!! I also miss a "Re:" prefix in the subject in posts that are replies in a thread I follow.
  3. New sprites are nice, but BL uses gloves in his game, not wristbands. I'm not sure, but I guess that they are used for P/M collision detection on fights and for climbing.
  4. No... the joystick must be read just before the player is drawn, but not immediately after, in the sense that other game logic must be between them, and the trigger subroutine is one of those other logic. This is one alternative of re-ordered code: 5 GR.17 10 I=0:Y=10:SCRI=19:SCRY=23 15 SCREEN=PEEK(88)+256*PEEK(89) 17 ME=SCREEN+200:DI=0:DY=1 30 OLDME=ME:ME=SCREEN+I+20*Y 35 IF DI OR DY THEN POKE OLDME,0:POKE ME,202 40 TR=PEEK(644) 47 IF TR=0 THEN GOSUB 200 49 STK=PEEK(632) 50 DI=(STK=7)*(I<SCRI)-(STK=11)*(I>0) 55 DY=(STK=13)*(Y<SCRY)-(STK=14)*(Y>0) 82 Y=Y+DY:I=I+DI 100 GOTO 30 200 POS.5,10:? #6;"TRIGGER" 205 RETURN I added OLDME variable to store the previous value of ME, just to perform both the remove of the player from the last position and to put it in the new position as close as posible to avoid a blinking effect. Line 17 initializes the player position and forces a delta asignment at start to draw the player in the first loop. I also simplied the check for a movement of the player in line 35, and included the corresponding screen limit restrictions in lines 50 and 55. Anyway, while this code remains simple, without any other game logic, it will be hard to stop at the desired position. You can simulate more processing with the following line between the player's redraw and the joystick read: 48 FOR X=0 TO 99:NEXT X Finally, I removed the parentheses from the POKE statements, in order to save a bit of time in the expresion calculation.
  5. I forgot to mention that you also check the trigger between the joystick read and the player draw (longer lag). You should read the trigger and also perform some other activities like the logic for enemies and such after the player is drawed and before the joystick is read for the next iteration. I could rewrite your code to get a better response, but that would take away your fun.
  6. Atari BASIC is slow, and you should move your player just after you read the joystick position. If you do many calculations and checks after the read and before the actual player movement, the effect will be a considerable lag. In a simple loop like yours (the one in the original post), you read the joystick immediately after you move the player, so you will get an extra lecture of the unreleased joystick because the player (user) will release the stick just after his eyes see the player (game element) in the place of the screen that he wants to be, advancing one step beyond the required one as a result. BTW, when things goes too fast and you must insert a delay, it cannot be put between the joystick lecture and the player redraw. But in Atari BASIC things never goes too fast!!! 😉
  7. Oh, you are right. Atari BASIC does not have boolean operators, and it could be "painful" to try to obtain that bits using standard algebra. Before I reply, I should notice that you were using PEEK instead of DPEEK to get the screen data memory address. Almost all other BASIC flavors available have DPEEK function. Instead of adding and substracting the other checks for diagonal movements in line 50 and 55 (to get 6 conditions in each expression), you could initialize two 16-elements arrays with the precalculated deltas, and use the STICK(0) as the array index to get the current delta. You could use a single array for screen positions instead of X and Y coordinates and assign, for instance, -21 for the up-left delta, -20 for the up delta, -19 for the up-right, ... and 21 for the down-right. Of course, this method requires to check for wall collisions (using PEEK) instead of to check for the horizontal and vertical limits, because you should need to compute the modulo 20 of the relative screen position to get the horizontal position and avoid a warp around.
  8. You might use binary algebra an check for the bits that represent each of the four joystick positions. This is a portion of code from one of my turbo basic tenliners: t=stick(0) j=x+(t&8=0)*(x<39)-(t&4=0)*(x>0) k=y+(t&2=0)*(y<3)-(t&1=0)*(y>0) It not only accept each 8 joystick directions, it also checks for valid limits at the same time. X and Y are coordinates for current position, J and K are for the new one. You can keep only X and Y variables if you don't need to do something in the old position like remove something from screen memory, and that will save a couple of assignment statements to update current coordinates.
  9. BTW, in my Atari page I have an ATASCII table you can print. For internal codes, you must reorder character columns in this way: 2, 3, 1 and 4. Or just check the Internal Code table I just made for you (and everyone else).
  10. Sorry, that was a very quick response from me... my fault. When you POKE values into screen memory area, you should use Internal Codes, not ATASCII codes. To get internal codes, you should use range 0 to 63 to get the first set of ATASCII codes 32 to 95, so for that range, you must substract 32 and you'll get the first color. For the second set (color), you should POKE the range 64 to 127, which represents the ATASCII codes 0 to 31 (control chars) and 96 to 127 (lowercase letters), so for the first half (numbers and punctuation), you should add 64, but use the same ATASCII code of lower case letters to get the uppper case. Use the previous but add 128 for inverse video and you'll get the other 2 colors of graphics mode 1 and 2 (ANTIC mode 5 and 6) . Better?
  11. Control (graphics chars) are used for the other 2 colors for the number and punctuation. Just add or substract 32 in your pokes for punctuation ATASCII codes.
  12. A simple but very nice effect approaching cities. Pressing the joystick button somehow holds the animation, and joystick up and down seem to control the travelling height. Congrats...
  13. Rally Speedway included a track editor.
  14. An extra paragraph took you more time to write the post...
  15. Atarimania has the 8K ROM file in a ZIP. http://www.atarimania.com/game-atari-400-800-xl-xe-basketball_529.html
  • Create New...