Retrospect Posted February 10, 2023 Author Share Posted February 10, 2023 39 minutes ago, senior_falcon said: I haven't made a lot of progress on this. I see the symptom in the compiled code. Testing this in XB is very difficult. It takes a lot of time to register a "hit." After hitting a death ship, I got BAD VALUE IN 25411 25411 AF=1 :: CALL SPRITE(#3,108,6,P5,P6,0,-40) AF=1 P5=0 P6=0 So P5 and P6 are the bad value. I don't think that is the problem because I think the compiler would be OK with this. But I think there is probably something along these lines that is causing the problem. This problem seems to happen after the last death ship has been killed. See if you can get XB to get this far to see what happens. I suspect the last DELSPRITE is not happening. Thanks Harry. The culprit in this case is line 25402, which is telling the '99 to jump to line 25411 if "AF" does not equal 1. AF is for the death ship's firing activation. I've been careless here. So it's basically skipped over the bit that would have fed the '99 with the information it needed to form a missile position. If AF did equal 1, then the death ship has already attempted to fire and these lines would not have been encountered. The compiler would throw a wobbler if A5 and A6 had never been declared (even as null) in the program at any point before that. There's the matter of other ships "haunting" the program by turning into ghosts as well. So I'm wondering if by the example of what I did in line 25402, I've been doing this all over the place and causing it myself? I'll have a good look at this in a little while, just need to sleep in a moment. Thankyou for having a look at it, I'll let you know what I've discovered ASAP. Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 10, 2023 Author Share Posted February 10, 2023 @senior_falcon I've altered the line 25402 to read; 25402 if af=1 then 25403 else 25411 25403 CALL POSITION(#1,P1,P2,#16,P5,P6) So it wouldn't get the bad value anymore And then this happened ..... (This is tested in XB not compiled) Classic99 QI399.063 - CPU Overdrive 2023-02-10 06-04-55.mp4 Line 25511 is for the activation of the walking robot missile! I've missed it's X and Y coords out. Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 10, 2023 Author Share Posted February 10, 2023 @senior_falconalso there's this .... now i've corrected the robot walker's missile, thats working .. however there are still "ghosts" hanging around on the screen , these should have been "Delsprited" as they obviously don't function, they just glide aimlessly .... this is in XB uncompiled Classic99 QI399.063 - CPU Overdrive 2023-02-10 06-10-20.mp4 1 Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 10, 2023 Author Share Posted February 10, 2023 I think a careful re-write of the code might be in order ... That I shall do in a few hours time , should I get a time slot. Should only take a few hours to get up and running and I'll see what the sprites are up to. Basically though they should only be there if they're called in a routine and if their "alive" array is set to 1. When they've been shot they should all be dead and gone. Quote Link to comment Share on other sites More sharing options...
+TheBF Posted February 10, 2023 Share Posted February 10, 2023 25402 if af=1 then 25403 else 25411 25403 CALL POSITION(#1,P1,P2,#16,P5,P6) I think this would be smaller and so probably faster if you did: 25402 if af<>1 then 25411 25403 CALL POSITION(#1,P1,P2,#16,P5,P6) 1 Quote Link to comment Share on other sites More sharing options...
SteveB Posted February 10, 2023 Share Posted February 10, 2023 25402 if af=1 then CALL POSITION(#1,P1,P2,#16,P5,P6) why using line numbers in the first place? Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 10, 2023 Author Share Posted February 10, 2023 36 minutes ago, SteveB said: 25402 if af=1 then CALL POSITION(#1,P1,P2,#16,P5,P6) why using line numbers in the first place? Steve. I get it , your TI-CODED doesn't need them . We won't have this discussion on this thread but at some point I will talk with you regarding TI CODED. Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 10, 2023 Author Share Posted February 10, 2023 Since the ghost sprites are happening when the game is not compiled rules out the compiler if that was ever in question. I will do a rewrite. Quote Link to comment Share on other sites More sharing options...
SteveB Posted February 10, 2023 Share Posted February 10, 2023 7 minutes ago, Retrospect said: Steve. I get it , your TI-CODED doesn't need them . We won't have this discussion on this thread but at some point I will talk with you regarding TI CODED. I would be happy to talk about TiCodEd with you someday, but this was really not my point here, I talk about plain XB. You use IF-THEN in XB very much like in TI BASIC, only with line-numbers, where you might enter the full statement as in my example, when it is just one or two statements. It might be a matter of personal taste, but IF <cond> THEN <next-line> else <line-after-next> looks more complicated to me, compared to IF <cond> THEN <code-from-next-line>. So I left the line-number 25402 on the left and just pulled the CALL POSITION up from the line after, reducing the code a little. 1 Quote Link to comment Share on other sites More sharing options...
fabrice montupet Posted February 10, 2023 Share Posted February 10, 2023 11 hours ago, senior_falcon said: Hi Fabrice: Can you post an example that shows this behavior? I would like to figure out what is happening. Not easy to make a video of this behavior due to the totally random of its appearing. To make a video, I would have to modify my program to pass anew several values in a same CALL LINK("VWRITE") then patiently waiting the problem occurs. But, I will do. All I can say this time is that I could use/test my game during very long minutes, even many hours without having any problem, then suddenly the problem appeared . Note that, in my game, I don't use the Sprite motion feature to move them, I just use CALL LOCATE. But when the problem occurred, some Sprites suddenly got diagonal motion movements and some characters pattern were destroyed (not the Sprite ones but some others and not all but always the same). A problem seen when the game was compiled or not, using Classic99 or ti994w emulators. Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted February 10, 2023 Share Posted February 10, 2023 11 hours ago, Retrospect said: @senior_falconalso there's this .... now i've corrected the robot walker's missile, thats working .. however there are still "ghosts" hanging around on the screen , these should have been "Delsprited" as they obviously don't function, they just glide aimlessly .... this is in XB uncompiled Classic99 QI399.063 - CPU Overdrive 2023-02-10 06-10-20.mp4 25.93 MB · 0 downloads The first thing I thought about when the video started is that it reminded me of R-Type. You know where you get that power-up addition in front of your spaceship 1 Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 10, 2023 Author Share Posted February 10, 2023 3 hours ago, SteveB said: but IF <cond> THEN <next-line> else <line-after-next> looks more complicated to me, compared to IF <cond> THEN <code-from-next-line> This is true. A few years ago, the compiler wouldn't let you use any logic after a THEN statement and so I used to simply branch off to another line to do the logic there, and it did seem tidier. Quote Link to comment Share on other sites More sharing options...
RXB Posted February 10, 2023 Share Posted February 10, 2023 I would replace this line: 25402 IF AF=1 THEN 25403 ELSE 25411 with 25402 ON AF+1 GOTO 25411,25403 ! if AF=0 does then same thing as ELSE above, if AF=1 then AF+1=2 so like the THEN 1 1 Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 10, 2023 Author Share Posted February 10, 2023 15 minutes ago, RXB said: I would replace this line: 25402 IF AF=1 THEN 25403 ELSE 25411 with 25402 ON AF+1 GOTO 25411,25403 ! if AF=0 does then same thing as ELSE above, if AF=1 then AF+1=2 so like the THEN Thanks Rich Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted February 10, 2023 Share Posted February 10, 2023 38 minutes ago, RXB said: I would replace this line: 25402 IF AF=1 THEN 25403 ELSE 25411 with 25402 ON AF+1 GOTO 25411,25403 ! if AF=0 does then same thing as ELSE above, if AF=1 then AF+1=2 so like the THEN I like these kinds of constructs when dealing with a constrained variable and use it (and ON...GOSUB) a LOT, but bear in mind this is not a nail. This assumes the only values for AF are 0 and 1. If AF is 2 or more, or -1 or less (i.e. not in {0,1},) this statement will error (which you can catch with ON ERROR.) 1 Quote Link to comment Share on other sites More sharing options...
RXB Posted February 10, 2023 Share Posted February 10, 2023 3 hours ago, OLD CS1 said: I like these kinds of constructs when dealing with a constrained variable and use it (and ON...GOSUB) a LOT, but bear in mind this is not a nail. This assumes the only values for AF are 0 and 1. If AF is 2 or more, or -1 or less (i.e. not in {0,1},) this statement will error (which you can catch with ON ERROR.) Well best case is AF=1 or AF=2 would be perfect fit. i.e. ON AF GOTO 25403,25411 Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 11, 2023 Author Share Posted February 11, 2023 16 minutes ago, RXB said: Well best case is AF=1 or AF=2 would be perfect fit. i.e. ON AF GOTO 25403,25411 I will keep that in mind for the re-write. Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted February 11, 2023 Share Posted February 11, 2023 2 hours ago, RXB said: Well best case is AF=1 or AF=2 would be perfect fit. i.e. ON AF GOTO 25403,25411 Yup. That said, I am not certain that ON...GOTO <next line>,<another line> is faster than an IF...THEN <another line> which then falls through to the next line. Definitely good for multiple values and targets like ON...GOTO <next line>,<another line>,<yet another>,<look another> &c. A lot of different ways to wax that car. 2 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted February 11, 2023 Share Posted February 11, 2023 TMOP identified a compiler bug involving comments at the end of a line. It turns out that lines with IF/THEN/ELSE that have trailing comments will not compile correctly. It turns out that ANUBIS has one such line: 1075 IF AF=1 THEN GOSUB 25435 ! death ship missile check I removed the comment and recompiled with high hopes. But sadly, the phantom sprites are still there. 2 2 Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 11, 2023 Author Share Posted February 11, 2023 Thanks for your time on this one @senior_falcon ... I've had a spare couple of hours today so I've done a couple of test with different games, and so far none of them have produced ghost sprites - only Anubis did .... which is making me think, it's me, not the compiler. In fact one out of the two "tests" is now a full releasable game called Morg Blaster. The only other thing I can think, (if this IS a compiler bug) .... is it happening when we try to control sprites automotion values, using conditions? Anubis does this for all of it's enemies apart from the robots - the robots are the ONLY enemies that don't produce a "ghost". (i think!) EDIT: Actually we do control automotion of the robots, scratch that.... I'm stuck then. I'll do a careful re-write starting tomorrow at some point 4 Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 18, 2023 Author Share Posted February 18, 2023 Psyching myself back into it with Anubis .... testing my sprite collision detection routine ... it ain't great ... then again I think it just needs more subs to the routine and it'll be golden. There's quite a lot in the sub-list, even a routine that recoils the player ship when it fires. Might keep it in, might take it out ... it's not THAT good .... Saucers are in anyhow, spinning away like they should .... player ships movement is spot-on ... just got missile-wrap issues. (Auto motion value 60 won't help that!) anubis project.mp4 2 Quote Link to comment Share on other sites More sharing options...
Tursi Posted February 18, 2023 Share Posted February 18, 2023 That looks really sharp 1 Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 18, 2023 Author Share Posted February 18, 2023 7 minutes ago, Tursi said: That looks really sharp Thanks Tursi If I can keep plugging away at it we'll have a good TI game here. 1 Quote Link to comment Share on other sites More sharing options...
Retrospect Posted February 18, 2023 Author Share Posted February 18, 2023 Here we have more progress and the sprite collision is 100 percent. For now the game just loops between two different enemy types, and the "cruisers" that come on spinning and tracking the player don't fire yet but they WILL and boy will they be deadly when they do. The saucers aren't too intelligent yet but don't they look good spinning like that? I got the idea from a 50's flying saucer movie which Senior Falcon correctly identified as "Earth Vs The Flying Saucers" and it was Ray Harryhausen that did the fantastic job of the animation for those saucers. When you've blasted so many saucers, the rest that are alive speed away , at an impossible speed, out of sight - just like flying saucers would do .... and then come the cruisers ..... We're getting there! At some point this year there WILL be a new side scrolling shooter and it's going to do the TI99 and the Compiler justice. Edit: At some point you'll see a slight pause - the TI did a garbage collection! I guess the garbage always goes out on this day??? anubis vid 2.mp4 3 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted February 18, 2023 Share Posted February 18, 2023 23 minutes ago, Retrospect said: Edit: At some point you'll see a slight pause - the TI did a garbage collection! I guess the garbage always goes out on this day??? That is kinda funny. I saw the pause but thought it was the video (audio muted.) 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.