Jump to content

Photo

WIP Kaboom!

Kaboom Raptor Basic

34 replies to this topic

#1 omf OFFLINE  

omf

    Dragonstomper

  • 773 posts

Posted Tue Oct 13, 2015 5:06 PM

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

 

Attached Files



#2 CyranoJ ONLINE  

CyranoJ

    Quadrunner

  • 5,320 posts
  • RAPTOR in LOCAL
  • Location:Adelaide, SA

Posted Tue Oct 13, 2015 5:48 PM

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 by CyranoJ, Tue Oct 13, 2015 5:49 PM.


#3 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • 490 posts
  • Probably RB+ing
  • Location:UK

Posted Wed Oct 14, 2015 12:14 AM

Excellent, sounds great. I'll definitely give it a go later on and feedback any thoughts, cheers



#4 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,388 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Wed Oct 14, 2015 12:16 AM

Good on you OMF for working on that and posting the binary.



#5 ggn OFFLINE  

ggn

    Stargunner

  • 1,357 posts
  • Location:Athens, Greece

Posted Wed Oct 14, 2015 9:31 AM

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 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 :)


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!


Edited by ggn, Wed Oct 14, 2015 9:32 AM.


#6 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,388 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Wed Oct 14, 2015 9:34 AM

GGN's solution is a bit better as it's more flexible, but also means you have to define the full set of possibilities.



#7 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 9,818 posts
  • Busy bee!
  • Location:England

Posted Wed Oct 14, 2015 9:52 AM

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.

#8 Kiwi OFFLINE  

Kiwi

    Stargunner

  • 1,580 posts

Posted Wed Oct 14, 2015 12:48 PM

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)*8)+6
if flag2=1 then print at 8,$800+320+(sc(1)*8)+6
if flag3=1 then print at 9,$800+320+(sc(2)*8)+6
if flag4=1 then print at 10,$800+320+(sc(3)*8)+6
if flag5=1 then print at 11,$800+320+(sc(4)*8)+6
print at 12,$800+320+(sc(5)*8)+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. 



#9 omf OFFLINE  

omf

    Dragonstomper

  • Topic Starter
  • 773 posts

Posted Wed Oct 14, 2015 1:40 PM

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)*8)+6
if flag2=1 then print at 8,$800+320+(sc(1)*8)+6
if flag3=1 then print at 9,$800+320+(sc(2)*8)+6
if flag4=1 then print at 10,$800+320+(sc(3)*8)+6
if flag5=1 then print at 11,$800+320+(sc(4)*8)+6
print at 12,$800+320+(sc(5)*8)+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



#10 ggn OFFLINE  

ggn

    Stargunner

  • 1,357 posts
  • Location:Athens, Greece

Posted Wed Oct 14, 2015 1:51 PM

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? :D

#11 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • 490 posts
  • Probably RB+ing
  • Location:UK

Posted Wed Oct 14, 2015 2:12 PM

 

i integrated it  today while at lunch at work :)

 

 

Rb+ at work lunch for the win!!!!!



#12 ggn OFFLINE  

ggn

    Stargunner

  • 1,357 posts
  • Location:Athens, Greece

Posted Thu Oct 15, 2015 12:52 AM

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?



#13 omf OFFLINE  

omf

    Dragonstomper

  • Topic Starter
  • 773 posts

Posted Thu Oct 15, 2015 2:13 AM

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



#14 ggn OFFLINE  

ggn

    Stargunner

  • 1,357 posts
  • Location:Athens, Greece

Posted Thu Oct 15, 2015 3:51 AM

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.



#15 omf OFFLINE  

omf

    Dragonstomper

  • Topic Starter
  • 773 posts

Posted Wed Nov 25, 2015 6:05 PM

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

 

Attached Files



#16 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,388 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Thu Nov 26, 2015 1:05 AM

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 by sh3-rg, Thu Nov 26, 2015 1:07 AM.


#17 omf OFFLINE  

omf

    Dragonstomper

  • Topic Starter
  • 773 posts

Posted Thu Nov 26, 2015 3:02 AM

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



#18 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,388 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Thu Nov 26, 2015 3:27 AM

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.



#19 omf OFFLINE  

omf

    Dragonstomper

  • Topic Starter
  • 773 posts

Posted Thu Nov 26, 2015 6:38 PM

 

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



#20 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,388 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Fri Nov 27, 2015 12:54 AM

You have to do stuff in the right order, will chop it out of my game later and post.



#21 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • 490 posts
  • Probably RB+ing
  • Location:UK

Posted Fri Nov 27, 2015 1:36 AM

Also, did you remember to enable zeroplayer in the rapapp.s ?


Edited by Sporadic, Fri Nov 27, 2015 1:36 AM.


#22 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,388 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Fri Nov 27, 2015 1:46 AM

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!


#23 omf OFFLINE  

omf

    Dragonstomper

  • Topic Starter
  • 773 posts

Posted Tue Dec 1, 2015 7:23 PM

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!

Attached Files



#24 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • 490 posts
  • Probably RB+ing
  • Location:UK

Posted Wed Dec 2, 2015 1:38 AM

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 :)



#25 omf OFFLINE  

omf

    Dragonstomper

  • Topic Starter
  • 773 posts

Posted Mon Jan 11, 2016 6:14 PM

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 ;-) :P

 

option screen and achievement saving is next up

 

Attached Files





Reply to this topic



  



Also tagged with one or more of these keywords: Kaboom, Raptor, Basic

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users