Jump to content

Sporadic

+AtariAge Subscriber
  • Content Count

    614
  • Joined

  • Last visited

Everything posted by Sporadic

  1. Is there any way to see if its doing anything during the freeze? As I suggested, poke the bg colour in the loop. Assign a different button to the call to save? Put a small delay before the save?
  2. How about copying your project folder to a new rb+ install? Could you be using a test version of rb+ for example? But then, if the scores project works then that probably isn't it. Is the 6 minutes relevant to anything in your code? Eg. 6x60x50 vbls. Does that equal some magic timer/counter you've made up? This is major straw clutching though! Edit: How about poking the background colour in your main loop and see if it keeps changing during the freeze?
  3. Very strange! Are you sure the MT actually works? My one was dodgy and stopped games loading. Turns out it had a random blob of solder joining 2 of the contacts! I just picked it off.
  4. hmm bummer Luckily i've not had my CD drive very long, so don't have any major MT saves yet. You say it's creating the save initially, but not writing until after the high score? That sounds different to what i've done above.
  5. Looking at my snippets there though, couldn't I have used the hiscore_check function before they enter their name? Rather than my own iteration through? Lol who knows.
  6. Nope, afraid not. It pretty much just worked out the box! I'll give you some snippets (with unrelated stuff removed). If not use then i'll just post the whole SUBs. FYI, all contained tidily in my score.bas First, before the main loop it does this; if raptor_mt_present<0 then 'no MT? for i=0 to 9 raptor_highscores_hex[i]=(9-i)*100 next i endif Then at game over detect if the score is actually in the highscore table (without writing to it); for i=0 to 9 IF score > raptor_highscores_hex[i] THEN inscoreboard=1 ENDIF next i Then, if inscoreboard=1 then player enters their name. After that, call this; if hiscore_check(score,name$)>0 then call RAPTOR_resort_score_table endif if raptor_mt_present<0 then 'no MT? else call RAPTOR_mt_save endif I'm sure that was it. Unless of course i've not noticed the same bug yet
  7. I can safely say i'm not anywhere near that (unless particles count perhaps lmao)
  8. The .abs is 1049k. So plenty there. I've not have time today (pub lunch was more appealing) so I will have a mess around as soon as I can and report back. Thanks
  9. I need to stop speaking too soon I just thought I would apply the tip for the variable in the loops to another area of code. I made that change and the problem has reappeared. I changed this; LIFECHECK=0 FOR currentmob = 0 TO mobsloop IF mobLife[currentmob] > 0 THEN LIFECHECK++ mobX[currentmob] = RGETOBJ(startmob+currentmob,R_sprite_x) mobY[currentmob] = RGETOBJ(startmob+currentmob,R_sprite_y) IF mobX[currentmob] < (minxx)<<16 THEN mobX[currentmob] = maxxx RSETOBJ(startmob+currentmob,R_sprite_x,(mobX[currentmob]<<16)) ELSEIF mobX[currentmob] > (maxxx)<<16 THEN mobX[currentmob] = minxx RSETOBJ(startmob+currentmob,R_sprite_x,(mobX[currentmob]<<16)) ENDIF IF mobY[currentmob] < (minyy)<<16 THEN mobY[currentmob] = maxyy RSETOBJ(startmob+currentmob,R_sprite_y,(mobY[currentmob]<<16)) ELSEIF mobY[currentmob] > (maxyy)<<16 THEN mobY[currentmob] = minyy RSETOBJ(startmob+currentmob,R_sprite_y,(mobY[currentmob]<<16)) ENDIF ENDIF NEXT To this; LIFECHECK=0 mobtmpcnt = startmob FOR currentmob = 0 TO mobsloop IF mobLife[currentmob] > 0 THEN LIFECHECK++ mobX[currentmob] = RGETOBJ(mobtmpcnt,R_sprite_x) mobY[currentmob] = RGETOBJ(mobtmpcnt,R_sprite_y) IF mobX[currentmob] < (minxx)<<16 THEN mobX[currentmob] = maxxx RSETOBJ(mobtmpcnt,R_sprite_x,(mobX[currentmob]<<16)) ELSEIF mobX[currentmob] > (maxxx)<<16 THEN mobX[currentmob] = minxx RSETOBJ(mobtmpcnt,R_sprite_x,(mobX[currentmob]<<16)) ENDIF IF mobY[currentmob] < (minyy)<<16 THEN mobY[currentmob] = maxyy RSETOBJ(mobtmpcnt,R_sprite_y,(mobY[currentmob]<<16)) ELSEIF mobY[currentmob] > (maxyy)<<16 THEN mobY[currentmob] = minyy RSETOBJ(mobtmpcnt,R_sprite_y,(mobY[currentmob]<<16)) ENDIF ENDIF mobtmpcnt++ NEXT At the top of the main program I also DIM'ed the new variable mobtmpcnt . Is there any chance I am near some kind of limit for sprite count, sprite memory, code memory?
  10. Thank you for the in-depth explanation. I have just had the chance to try again at home (on a different machine) and it's currently working. I forgot to copy my latest version of code so had the non-working version from yesterday - I changed the SUB to the code below and it just worked.... SUB SHOWPOINTS(num%) scoretmpcnt = scoresprites FOR scorei = 0 TO 4 IF RGETOBJ(scoretmpcnt,R_sprite_active) = R_is_inactive THEN IF num% = 100 THEN RSETOBJ(scoretmpcnt,R_sprite_gfxbase,score100gfx) ELSEIF num% = 200 THEN RSETOBJ(scoretmpcnt,R_sprite_gfxbase,score200gfx) ELSEIF num% = 500 THEN RSETOBJ(scoretmpcnt,R_sprite_gfxbase,score500gfx) ENDIF RSETOBJ(scoretmpcnt,R_sprite_active,R_is_active) RSETOBJ(scoretmpcnt,R_sprite_x,tx<<16) RSETOBJ(scoretmpcnt,R_sprite_y,ty<<16) RSETOBJ(scoretmpcnt,R_sprite_scale_x,50) RSETOBJ(scoretmpcnt,R_sprite_scale_y,50) EXIT FOR ENDIF scoretmpcnt++ NEXT END SUB As you can see, I have taken your advice regarding the variable and incrementing it at the end. I will try this code again tomorrow and see how it goes (if the problem reappears). If this works on my other machine then I will try swapping out code to try and break it again, then play spot the difference. It would be nice to know the cause, not just for my sanity but also in case it helps others. Thanks all again for the help and suggestions.
  11. Unfortunately neither worked. I don't know if it's relevant but the "line" appeared in a different location for -Os
  12. I will give it a go later, thank you for the suggestion. Yes, I was thinking the same kind of thing. I will report back as soon as i've tried it.
  13. Out of time for today now. If I take these lines out of those 3 score SUBs then the particle layer 'line' doesn't appear... RSETOBJ(tmpscorespr,R_sprite_gfxbase,score100gfx) RSETOBJ(tmpscorespr,R_sprite_gfxbase,score200gfx) RSETOBJ(tmpscorespr,R_sprite_gfxbase,score500gfx) So that to me says it's a funky graphics memory corruption type situation. I'm sure I have my vars set correctly. 'Snippet of DIMs; DIM scoresprites% :scoresprites=turreth+1 DIM score200% :score200=scoresprites+5 DIM score500% :score500=score200+1 'Grabbing the gfx locations; dim score100gfx% score100gfx=RGETOBJ(scoresprites,R_sprite_gfxbase) dim score200gfx% score200gfx=RGETOBJ(score200,R_sprite_gfxbase) dim score500gfx% score500gfx=RGETOBJ(score500,R_sprite_gfxbase) I've used a similar technique for the rocks, explosions, fonts etc and they seem ok. I might just try creating 3 of each score sprite in the object list and take out the R_sprite_gfxbase manipulation to see if that helps. That'll have to be another time though as back to work now.
  14. F*cks sake. it's back..... It's almost like if I add a variable or code, then it randomly reappears again. The search continues....
  15. Now it works again.... I removed the parameter from the SUB and created 3 subs instead, one for each score size (Yuk!) Still, it helps me with my UberLineNumber Achievement. SUB SHOWPOINTS100 FOR scorei = 0 TO 4 tmpscorespr = scoresprites+scorei IF RGETOBJ(tmpscorespr,R_sprite_active) = R_is_inactive THEN RSETOBJ(tmpscorespr,R_sprite_gfxbase,score100gfx) RSETOBJ(tmpscorespr,R_sprite_x,(tx)<<16) RSETOBJ(tmpscorespr,R_sprite_y,(ty)<<16) RSETOBJ(tmpscorespr,R_sprite_scale_x,64) RSETOBJ(tmpscorespr,R_sprite_scale_y,64) RSETOBJ(tmpscorespr,R_sprite_active,R_is_active) EXIT FOR ENDIF NEXT END SUB SUB SHOWPOINTS200 FOR scorei = 0 TO 4 tmpscorespr = scoresprites+scorei IF RGETOBJ(tmpscorespr,R_sprite_active) = R_is_inactive THEN RSETOBJ(tmpscorespr,R_sprite_gfxbase,score200gfx) RSETOBJ(tmpscorespr,R_sprite_x,(tx)<<16) RSETOBJ(tmpscorespr,R_sprite_y,(ty)<<16) RSETOBJ(tmpscorespr,R_sprite_scale_x,64) RSETOBJ(tmpscorespr,R_sprite_scale_y,64) RSETOBJ(tmpscorespr,R_sprite_active,R_is_active) EXIT FOR ENDIF NEXT END SUB SUB SHOWPOINTS500 FOR scorei = 0 TO 4 tmpscorespr = scoresprites+scorei IF RGETOBJ(tmpscorespr,R_sprite_active) = R_is_inactive THEN RSETOBJ(tmpscorespr,R_sprite_gfxbase,score500gfx) RSETOBJ(tmpscorespr,R_sprite_x,(tx)<<16) RSETOBJ(tmpscorespr,R_sprite_y,(ty)<<16) RSETOBJ(tmpscorespr,R_sprite_scale_x,64) RSETOBJ(tmpscorespr,R_sprite_scale_y,64) RSETOBJ(tmpscorespr,R_sprite_active,R_is_active) EXIT FOR ENDIF NEXT END SUB So, its working again. Hopefully thats that now!
  16. I jumped the gun there. Just changed to this so I can tell it which sprite to show and the line appears again now; SUB SHOWPOINTS(num%) FOR scorei = 0 TO 4 tmpscorespr = scoresprites+scorei IF RGETOBJ(tmpscorespr,R_sprite_active) = R_is_inactive THEN IF num% = 100 THEN RSETOBJ(tmpscorespr,R_sprite_gfxbase,score100gfx) ELSEIF num% = 200 THEN RSETOBJ(tmpscorespr,R_sprite_gfxbase,score200gfx) ELSEIF num% = 500 THEN RSETOBJ(tmpscorespr,R_sprite_gfxbase,score500gfx) ENDIF RSETOBJ(tmpscorespr,R_sprite_x,(tx)<<16) RSETOBJ(tmpscorespr,R_sprite_y,(ty)<<16) RSETOBJ(tmpscorespr,R_sprite_scale_x,64) RSETOBJ(tmpscorespr,R_sprite_scale_y,64) RSETOBJ(tmpscorespr,R_sprite_active,R_is_active) EXIT FOR ENDIF NEXT END SUB I'll keep looking......
  17. Ok that is weird. I seem to have got it working. But I have no idea why it now works. The "Does not Work" code produces a small horizontal line of pixels (of varying colours) in the particle layer that eventually gets erased by the star field as it's overdrawn. The line will re-appear whenever I call the SUB again though. The SUB gets called when you shoot a rock. The line that appears is in the same location on the screen every time (not near the sprite i'm drawing). Here is the code in question; Works SUB SHOWPOINTS FOR scorei = 0 TO 4 tmpscorespr = scoresprites+scorei IF RGETOBJ(tmpscorespr,R_sprite_active) = R_is_inactive THEN RSETOBJ(tmpscorespr,R_sprite_gfxbase,score500gfx) RSETOBJ(tmpscorespr,R_sprite_x,(tx)<<16) RSETOBJ(tmpscorespr,R_sprite_y,(ty)<<16) RSETOBJ(tmpscorespr,R_sprite_scale_x,64) RSETOBJ(tmpscorespr,R_sprite_scale_y,64) RSETOBJ(tmpscorespr,R_sprite_active,R_is_active) EXIT FOR ENDIF NEXT END SUB Does Not Work SUB SHOWPOINTS FOR scorei = 0 TO 4 IF RGETOBJ(scoresprites+scorei,R_sprite_active) = R_is_inactive THEN RSETOBJ(scoresprites+scorei,R_sprite_gfxbase,score500gfx) RSETOBJ(scoresprites+scorei,R_sprite_x,(tx)<<16) RSETOBJ(scoresprites+scorei,R_sprite_y,(ty)<<16) RSETOBJ(scoresprites+scorei,R_sprite_scale_x,64) RSETOBJ(scoresprites+scorei,R_sprite_scale_y,64) RSETOBJ(scoresprites+scorei,R_sprite_active,R_is_active) EXIT FOR ENDIF NEXT END SUB Basically scoresprites is an INT variable pointing to the score sprite in the object list. This sprite in the object list has its number (quantity) set to 5. Hence the FOR loop to iterate over those 5 to find an available one. As you can see, all i've done is to move the addition to a separate variable and then use that. There is a separate SUB called in the main loop to shink and eventually hide any active score sprites but i've not included that here as it didn't seem to have any affect. I have used the "does not work" technique in a couple of other places and it worked fine. The only difference is the "Exit For" which i've not used elsewhere. But if I take that out, the problem persists. The only other way I got the "Does not work" method to show a sprite without the dots was to remove the FOR loop and hard code scorei=0. All in all, very strange but it appears to work now so I am more than happy to just accept it and move on. I've just put this here for reference in case anyone is interested.
  18. Would have posted another version by now but I have a bug that i'm trying to kill. Basically when I display one of my new score sprites, I get about 6 particles appear on the particle layer in a horizontal line next to each other. I've seen this kind of wierdness before when getting something out of range or knackering something in the memory somehow. I've picked through everything and there seems to be a certain couple of lines that cause the problem (in my new score sprite code). If I take out or change the values in these lines then it seems to stop, but I cannot see why they would be causing the problem. So, I'm going to keep messing around and hopefully come up with a fix soon. Just thought i'd post a status update.
  19. Exactly what I was thinking
  20. Fair point lol. I'll keep it as I have then. It was just a random thought anyway. Cheers
  21. May have just added screenshake when a rock hits you lmao Started on a score sprite system as a little visual cue for points earned while playing. +100, +200 and +500 Edit: Currently doing the screenshake by jiggling the main "screen monitor" graphic. Which I am more than happy with. It got me thinking though... Does anyone know a better way of doing this? Perhaps something like changing the actual whole display location? If so, would this be more efficient etc ?
  22. Um, I just noticed your last sentence there.... sprites as particles? Is that for real? Cause that would be awesome. I never noticed that mentioned in the Raptor manual. Is it still on the cards for us RB+ peeps?
×
×
  • Create New...