Jump to content
IGNORED

WIP Kaboom!


omf

Recommended Posts

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

 

post-18126-0-40821100-1444777410_thumb.png

Kaboom.abs

  • Like 12
Link to comment
Share on other sites

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
  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

  • Like 2
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

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

  • Like 5
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

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!

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

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

 

Kaboom.abs

  • Like 6
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...