omf Posted October 13, 2015 Share Posted October 13, 2015 Ok, i have been working on this for a month or so in the evenings / night after work and i think its coming along nicely now in the current version i have tried to include most of the features of the original atari 2600 game: 8 levels 8 speeds 8 different point amounts for collecting the bombs in the bucket this version does not follow the same bomb dropping as the atari 2600, i decided to spice it up a little and use some degree of randomness (based on the x position of the bomber and the x position of the player for the seed some features are not included as yet, the item that most concerns me is the extra life every 1000 points, i may be over thinking this quite substantially but to me right now this seems to be very complicated. you cant check dead on 1000 / 2000 etc because if your at 995 then earn 10 points you are at 1005 and the check will not catch it. using greater than would cause a new life to be added every program loop if the score higher than 1000 which is not wanted i tried to use: if (score / new_life_points) = cint(score / new_life_points), this caused its own issues, mainly because the jaguar as i understand it does not take kindly to decimal numbers and in my tests 995/1000 although should equal 0.995, the jaguar decides it equals 0. Nice!!! this option is however thinking about it no good because it still only basically gives you if score = 1000. so for the moment im at a loss on that one, if anyone has any ideas let me know moving on, there are only two sound samples integrated currently, the explosion sound and a splash sound all sprites are 16 colours i hope to work on this beautifying it somewhat in the future, as i am quite enjoying actually making something useful for the jaguar things to do: new life every 1000 change bombers face to smile at 10000 add rotary support, which I don't think can be tested in VJ add title / options / game over screens achievements - i am undecided on this one yet add a selection of bombs to use add a selection of buckets to use probably a load of things I haven't listed thanks goes to: CJ / GGN / SH3 for continued abuse comments and help and putting up with my stupid questions at times which has lead to the creation of this spaghetti bowl of bad code if anyone has any useful criticism, please post it here, i shall be keeping an eye on the thread to see what people think of this Kaboom.abs 12 Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted October 13, 2015 Share Posted October 13, 2015 (edited) Have a variable called highscore_check set it to 1000 then if score>highscore_check do highscore_check=highscore_check+1000 lives=lives+1 end if don't forget to reset it at the start of each game. Edited October 13, 2015 by CyranoJ 6 Quote Link to comment Share on other sites More sharing options...
Sporadic Posted October 14, 2015 Share Posted October 14, 2015 Excellent, sounds great. I'll definitely give it a go later on and feedback any thoughts, cheers Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted October 14, 2015 Share Posted October 14, 2015 Good on you OMF for working on that and posting the binary. 2 Quote Link to comment Share on other sites More sharing options...
ggn Posted October 14, 2015 Share Posted October 14, 2015 (edited) Hi omf - good stuff in there! I'm always glad to see people picking up and giving rb+ a spin! some features are not included as yet, the item that most concerns me is the extra life every 1000 points, i may be over thinking this quite substantially but to me right now this seems to be very complicated. you cant check dead on 1000 / 2000 etc because if your at 995 then earn 10 points you are at 1005 and the check will not catch it. using greater than would cause a new life to be added every program loop if the score higher than 1000 which is not wantedi tried to use: if (score / new_life_points) = cint(score / new_life_points), this caused its own issues, mainly because the jaguar as i understand it does not take kindly to decimal numbers and in my tests 995/1000 although should equal 0.995, the jaguar decides it equals 0. Nice!!! this option is however thinking about it no good because it still only basically gives you if score = 1000. so for the moment im at a loss on that one, if anyone has any ideas let me know Well, that's mostly C dickiness there. I assume you have "score" and "new_life_points" declared as integers - if so then when you try to divide those two variables C will take a look at the types and sizes and decide what's best for it. In this case it will probably do a long integer division, and this will result in an integer! I then expect cint to do nothing since the number will be already integer.So, with that out of the way let me offer a few suggestions on what you can do.The first solution would be to use floats, so your snippet above will most certainly work (if it doesn't, let me know!). However I do NOT suggest this as the floating point lib bundled with the compiler rb+ uses (gcc) is really slow.Ah, I just noticed the CJ has posted a good suggestion there as well. Saves me some time then! A small variation would be to have an array of extra live scores and check against that. Something likeset highscores as int 1000,2000,5000,10000,20000,999999999end setdim current highscore_index as short=0then in your main loopif score>highscores[highscore_index] thenlives=lives+1 if highscore_index<ubound(highscores) then highscore_index=highscore_index+1 endifendifHope this helps, and again keep up the good work! Edited October 14, 2015 by ggn 1 Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted October 14, 2015 Share Posted October 14, 2015 GGN's solution is a bit better as it's more flexible, but also means you have to define the full set of possibilities. Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted October 14, 2015 Share Posted October 14, 2015 A technique I've used on lesser machines than the jag for increasing lives, is to look at the score after its been BCD converted. Specifically the digit of the decade that increments the life counter. If its not the same as the last time I checked it, add one to the lives and save the new "digit" value. This might be applicable to RB+, but it all depends on what kind of buffers are exposed to the BASIC language itself. Quote Link to comment Share on other sites More sharing options...
Kiwi Posted October 14, 2015 Share Posted October 14, 2015 I'm making a Kaboom clone for the Intellivision. So my solution to increase the lives by 1 whenever the 1000th digit is added. Every digits is it own variable since I didn't want the 6 zeros to be drawn and wanted to be like the Atari 2600. Pretty much my procedure for the scores are, AddScore:procedure sc(5)=sc(5)+pointvalue if sc(5)>=10 then sc(4)=sc(4)+1:sc(5)=sc(5)-10:flag5=1 if sc(4)>=10 then sc(3)=sc(3)+1:sc(4)=sc(4)-10:flag4=1 if sc(3)>=10 then sc(2)=sc(2)+1:sc(3)=sc(3)-10:flag3=1:SL2=66:SPointer2=0:lives=lives+1:gosub loadlives if sc(2)>=10 then sc(1)=sc(1)+1:sc(2)=sc(2)-10:flag2=1:wait:define 6,1,ohface if sc(1)>=10 then sc(0)=sc(0)+1:sc(1)=sc(1)-10:flag1=1 if sc(0)>=10 then sc(1)=sc(1)-10 return end drawscore:procedure if flag1=1 then print at 7,$800+320+(sc(0)*+6 if flag2=1 then print at 8,$800+320+(sc(1)*+6 if flag3=1 then print at 9,$800+320+(sc(2)*+6 if flag4=1 then print at 10,$800+320+(sc(3)*+6 if flag5=1 then print at 11,$800+320+(sc(4)*+6 print at 12,$800+320+(sc(5)*+6 return end It is kinda obsessive to use a single variable to hold a binary digit, but the solution works and still have variables left to use. Quote Link to comment Share on other sites More sharing options...
omf Posted October 14, 2015 Author Share Posted October 14, 2015 Have a variable called highscore_check set it to 1000 then if score>highscore_check do highscore_check=highscore_check+1000 lives=lives+1 end if don't forget to reset it at the start of each game. with small modification i think this option is the best one for me and the game i integrated it today while at lunch at work Hi omf - good stuff in there! I'm always glad to see people picking up and giving rb+ a spin! Well, that's mostly C dickiness there. I assume you have "score" and "new_life_points" declared as integers - if so then when you try to divide those two variables C will take a look at the types and sizes and decide what's best for it. In this case it will probably do a long integer division, and this will result in an integer! I then expect cint to do nothing since the number will be already integer. So, with that out of the way let me offer a few suggestions on what you can do. The first solution would be to use floats, so your snippet above will most certainly work (if it doesn't, let me know!). However I do NOT suggest this as the floating point lib bundled with the compiler rb+ uses (gcc) is really slow. Ah, I just noticed the CJ has posted a good suggestion there as well. Saves me some time then! A small variation would be to have an array of extra live scores and check against that. Something like set highscores as int 1000,2000,5000,10000,20000,999999999 end set dim current highscore_index as short=0 then in your main loop if score>highscores[highscore_index] then lives=lives+1 if highscore_index<ubound(highscores) then highscore_index=highscore_index+1 endif endif Hope this helps, and again keep up the good work! danm c++. i still struggle with c quite a lot, i do dabble with arduino stuffs but im still shite at the language, i end up giving up when it spews out some weird errors as i have no idea how to fix stuff lol im pretty sure i had some issues with the set command, something about if it was defined in a subroutine if it was called more than once the array would contain zeros if i remember. I'm making a Kaboom clone for the Intellivision. So my solution to increase the lives by 1 whenever the 1000th digit is added. Every digits is it own variable since I didn't want the 6 zeros to be drawn and wanted to be like the Atari 2600. Pretty much my procedure for the scores are, AddScore:procedure sc(5)=sc(5)+pointvalue if sc(5)>=10 then sc(4)=sc(4)+1:sc(5)=sc(5)-10:flag5=1 if sc(4)>=10 then sc(3)=sc(3)+1:sc(4)=sc(4)-10:flag4=1 if sc(3)>=10 then sc(2)=sc(2)+1:sc(3)=sc(3)-10:flag3=1:SL2=66:SPointer2=0:lives=lives+1:gosub loadlives if sc(2)>=10 then sc(1)=sc(1)+1:sc(2)=sc(2)-10:flag2=1:wait:define 6,1,ohface if sc(1)>=10 then sc(0)=sc(0)+1:sc(1)=sc(1)-10:flag1=1 if sc(0)>=10 then sc(1)=sc(1)-10 return end drawscore:procedure if flag1=1 then print at 7,$800+320+(sc(0)*+6 if flag2=1 then print at 8,$800+320+(sc(1)*+6 if flag3=1 then print at 9,$800+320+(sc(2)*+6 if flag4=1 then print at 10,$800+320+(sc(3)*+6 if flag5=1 then print at 11,$800+320+(sc(4)*+6 print at 12,$800+320+(sc(5)*+6 return end It is kinda obsessive to use a single variable to hold a binary digit, but the solution works and still have variables left to use. humm i dont think i will be attempting an intellivision game any time soon, that looks far too complicated for a score system LOL 2 Quote Link to comment Share on other sites More sharing options...
ggn Posted October 14, 2015 Share Posted October 14, 2015 danm c++. i still struggle with c quite a lot, i do dabble with arduino stuffs but im still shite at the language, i end up giving up when it spews out some weird errors as i have no idea how to fix stuff lol Arduino Basic+ maybe? Quote Link to comment Share on other sites More sharing options...
Sporadic Posted October 14, 2015 Share Posted October 14, 2015 i integrated it today while at lunch at work Rb+ at work lunch for the win!!!!! 4 Quote Link to comment Share on other sites More sharing options...
ggn Posted October 15, 2015 Share Posted October 15, 2015 Also: im pretty sure i had some issues with the set command, something about if it was defined in a subroutine if it was called more than once the array would contain zeros if i remember. be nice if someone reported an example where this fails. Perhaps it was memory corruption? Quote Link to comment Share on other sites More sharing options...
omf Posted October 15, 2015 Author Share Posted October 15, 2015 Also: be nice if someone reported an example where this fails. Perhaps it was memory corruption? i thought i would give it a rest with reporting issues that 95% of the time were actually my issues LOL ill look into it again, i may have another mess of code that causes this to error saved in a project Quote Link to comment Share on other sites More sharing options...
ggn Posted October 15, 2015 Share Posted October 15, 2015 i thought i would give it a rest with reporting issues that 95% of the time were actually my issues LOL ill look into it again, i may have another mess of code that causes this to error saved in a project It's quite ok really! That 5% is always worth investigating. 1 Quote Link to comment Share on other sites More sharing options...
omf Posted November 26, 2015 Author Share Posted November 26, 2015 ok, i have been working on this for some time now in part this and the list editor i have released this has been the guinea pig for list editor work latest version is attached some stuff still needs adding and fixing, but all in all i think this is coming along nicely finally got round to fixing the issue where if you die it takes ages to destroy all the bombs Kaboom.abs 5 Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted November 26, 2015 Share Posted November 26, 2015 (edited) That's really coming together - good work, omf! Looking forward to spinner controls, it'll really take it to the next level fun-wise. Edited November 26, 2015 by sh3-rg Quote Link to comment Share on other sites More sharing options...
omf Posted November 26, 2015 Author Share Posted November 26, 2015 is there an example of spinner code for rb+?,i dont recall seeing any. i don't mind trying to get it working but may need a little nudge with working code so i know what i'm doing Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted November 26, 2015 Share Posted November 26, 2015 is there an example of spinner code for rb+?,i dont recall seeing any. i don't mind trying to get it working but may need a little nudge with working code so i know what i'm doing If you're using zero player it's super easy, will chat later. Quote Link to comment Share on other sites More sharing options...
omf Posted November 27, 2015 Author Share Posted November 27, 2015 If you're using zero player it's super easy, will chat later. had a go at getting rotary working tonight, it mist have been a wery poor attempt as all i could get by checking zero_rotary_delta was 0 i did enable it (i think) with Input_SetJoyPort2 Input_SetRotaryMode Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted November 27, 2015 Share Posted November 27, 2015 You have to do stuff in the right order, will chop it out of my game later and post. Quote Link to comment Share on other sites More sharing options...
Sporadic Posted November 27, 2015 Share Posted November 27, 2015 (edited) Also, did you remember to enable zeroplayer in the rapapp.s ? Edited November 27, 2015 by Sporadic Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted November 27, 2015 Share Posted November 27, 2015 Yep, do them in the other order: CALL Input_SetRotaryMode CALL Input_SetJoyPort2 Then just sub zero_rotary_delta from your 16.16 x-pos. Instead of <<16, I did <<17 to make it more responsive. xpos=xpos-(zero_rotary_delta<<17) Moves really slick, and so damn simple! 2 Quote Link to comment Share on other sites More sharing options...
omf Posted December 2, 2015 Author Share Posted December 2, 2015 rotary support added to the game now including main menu and achievement screen (which is not working yet) game detects dpad and rotary in joypad port 1 have fun! Kaboom.abs 6 Quote Link to comment Share on other sites More sharing options...
Sporadic Posted December 2, 2015 Share Posted December 2, 2015 rotary support added to the game now Another reason for me to get off my arse and convert my second joypad. Really must get on that 1 Quote Link to comment Share on other sites More sharing options...
omf Posted January 12, 2016 Author Share Posted January 12, 2016 achievements added which are not saved as yet various bugs / issues fixed the file name issue of 'bomb.bmp' took far to long to realise that that was the problem!!! play / test / give feed back (if you can be bothered) I don't care either way option screen and achievement saving is next up Kaboom.abs 6 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.