+Retrospect Posted February 2 Share Posted February 2 Hello everyone. I'm creating another little game for RXB, this time I'd like to document the progress and hopefully pick up some tips from people as I go along. So far I've got the title screen and the start of the game. No enemies actually move yet, but the player does , and player can fire. The player is a sprite as is the player missile, the Morgs are character graphics, this was done so as not to trigger the 4 sprite limitation. The screen is simple, a boundary wall with 8 large blocks in the middle. The player and morgs aren't supposed to be able to pass through these "walls", but as yet there's no code in there to stop any of that. I've used the CALL JOYLOCATE command to move the Schooner around the screen, but as yet I've no idea how to stop the Schooner from passing into a wall due to the nature of JOYLOCATE not giving me the chance to "check my neighbours" before I make a move, unless anyone has any ideas on this? Attached is a little video of the game as is, and the documented badly written source code. I'm going to bed now. MORG BLASTER.txt << RXB source Classic99 QI399.063 2023-02-02 04-37-28.mp4 4 Quote Link to comment Share on other sites More sharing options...
+RXB Posted February 2 Share Posted February 2 Well I think this will work: ! ************ ! * JOYSTICK * ! ************ 2100 RR=R :: CC=C ! Save R and C incase 104 the h 2101 CALL JOYLOCATE(1,X,Y,8,8,#1,R,C,K) GOTO 2150 2104 CALL GCHAR(INT(R+7)/8),INT(C+7)/8,X) :: IF X=104 THEN R=RR :: C=CC :: GOTO 2101 ! If a h is hit it resets 2105 IF Y=4 THEN D=1::FD=1::GOTO 2145 2110 IF Y=-4 THEN D=2::FD=2::GOTO 2145 2115 IF X=-4 THEN D=3::FD=3::GOTO 2145 2120 IF X=4 THEN D=4::FD=4 1 1 Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted February 2 Share Posted February 2 Try inserting this line: 20 call moves("GV",512,1204,1024)😉 1 1 Quote Link to comment Share on other sites More sharing options...
+Retrospect Posted February 2 Author Share Posted February 2 8 hours ago, RXB said: Well I think this will work: ! ************ ! * JOYSTICK * ! ************ 2100 RR=R :: CC=C ! Save R and C incase 104 the h 2101 CALL JOYLOCATE(1,X,Y,8,8,#1,R,C,K) GOTO 2150 2104 CALL GCHAR(INT(R+7)/8),INT(C+7)/8,X) :: IF X=104 THEN R=RR :: C=CC :: GOTO 2101 ! If a h is hit it resets 2105 IF Y=4 THEN D=1::FD=1::GOTO 2145 2110 IF Y=-4 THEN D=2::FD=2::GOTO 2145 2115 IF X=-4 THEN D=3::FD=3::GOTO 2145 2120 IF X=4 THEN D=4::FD=4 Hi Rich. I inserted that code, but I got a Syntax Error in 2104. Although I know this code should work. Quote Link to comment Share on other sites More sharing options...
+Retrospect Posted February 2 Author Share Posted February 2 1 hour ago, sometimes99er said: 20 call moves("GV",512,1204,1024) ooohh ... I got the TI tall font! Nice! Is that what was supposed to happen? 2 Quote Link to comment Share on other sites More sharing options...
+Retrospect Posted February 2 Author Share Posted February 2 I've put an extra bracket in the statement that you wrote, @RXB , and it no longer gives an error, but it's affected the left/right pattern change and doesn't stop the Schooner from walking through walls. We'll get there, even if it means I have to go with CALL JOYST and a check beforehand for char 104 in the end .... 2104 CALL GCHAR((INT(R+7)/8),INT(C+7)/8,X) :: IF X=104 THEN R=RR :: C=CC :: GOTO 2101 ! If a h is hit it resets Classic99 QI399.063 2023-02-02 14-57-39.mp4 2 Quote Link to comment Share on other sites More sharing options...
+Retrospect Posted February 2 Author Share Posted February 2 So I've managed to get the Schooner to recognise the walls (char 104) and recognise when he's landed on a Morg ... for now the game stops when a morg is stepped on, but there will be a death routine programmed in later. I've slowed down the player missile so it has less chance of wrapping around the screen. In order for me to do this I had to use CALL JOYST but it does work. morg blaster call joyst routine.txt Also , when I get the Morgs moving, I want to use the CALL HPUT commands to move them, as @RXB proved , the other day, that the CALL HPUT command is quite a bit faster than CALL HCHAR. Classic99 QI399.063 2023-02-02 15-20-31.mp4 2 Quote Link to comment Share on other sites More sharing options...
+Retrospect Posted February 2 Author Share Posted February 2 By the way @sometimes99er I never knew about that command you provided, and I love the Tall Font, it gives it the look of a classic TI game, which I think you knew I was going for! 3 Quote Link to comment Share on other sites More sharing options...
+Retrospect Posted February 2 Author Share Posted February 2 morg blaster call joyst routine.txt << morg movement routine at line 2300 And now we have the Morgs moving. They won't kill the player yet (only when the player treads on a Morg, then game stops , for now, still) The code is clunky but it is working. I used a routine that rasmus provided for me , in 2013. That's ten years ago. Time flies. Classic99 QI399.063 2023-02-02 15-46-00.mp4 2 Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted February 2 Share Posted February 2 3 hours ago, Retrospect said: ooohh ... I got the TI tall font! Nice! Is that what was supposed to happen? Yes. 🤩 2 1 Quote Link to comment Share on other sites More sharing options...
+RXB Posted February 2 Share Posted February 2 4 hours ago, Retrospect said: ooohh ... I got the TI tall font! Nice! Is that what was supposed to happen? Yea nice thing about RXB is you could move just a few of them or all of them unlike most others that move entire thing. Say you only want capital C to E, you could not do that with others but can with RXB. 1 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.