Jump to content
IGNORED

Castle of Doom


atari2600land

Recommended Posts

Is there an easy way to make playfields the way you did in your code (0 and 1 instead of X and .) and make it look and be right?

 

I addressed that up above

 

make a program that is just the playfield (or it could be more than one playfield)

compile it

find the associated bB.asm file and open it in a text editor

copy the table of playfield data and paste it in to a new text file (that should get rid of most of the cruft)

use search and replace to get rid of the rest of the cruft (should be just .byte declarations)

now copy what's left once you've got it how you want/need it and paste it into

the end of the playfield(s) data statement.

 

not complicated, basically just

compile

cut and paste

search and replace

cut and paste

 

I think RT had a tool that would do what you want

but I'm not sure.

 

 

Link to comment
Share on other sites

Is there some reason for the first
playfield in bank 2 to have 12 lines
instead of 11 like the rest?

edit: looks like you got rid of the extra

line in castle21.bas.bin

nevermind

 

The very first playfield statement,

in bank 1, has 33 pixels per line.

in castle19.bas and earlier

Edited by bogax
Link to comment
Share on other sites

It occured to me that by slightly
rearranging the code (and at the cost of 5
bytes and 4 cycles) you could let level go
up to 85

 

  rem temp2.temp1 = level * 44 + PF_dat
 
  asm
  lda #$00
  sta temp2
  lda level
  asl
  adc level
  asl
  rol temp2
  asl
  rol temp2
  sec
  sbc level 
  bcs *+4
  dec temp2
  asl
  rol temp2
  asl
  rol temp2
  adc #<PF_dat
  sta temp1
  lda temp2
  adc #>PF_dat
  sta temp2
end

And just for the hell of it here it is
in bB with a small bit of asm (takes about
twice as much space and time)

 dim lvl_hi = temp4
 dim lvl_lo = level
 dim lvl = temp4.level

 dim ptr_hi = temp2
 dim ptr_lo = temp1
 dim ptr = temp2.temp1
 dim tmp_hi = temp4
 dim tmp_lo = temp3
 dim tmp = temp4.temp3
 
 const baselo = <PF_dat
 const basehi = >PF_dat

 macro ptr_x_2
 asm
 asl temp1
 rol temp2
end
end


 rem lvl is the 16 bit version of level, uses temp4 for the hi byte
 rem tmp uses temp4 as the hi byte, same as lvl, and temp3 as the lo byte
 rem tmp is a 16 bit temp variable, we can assign PF_data to tmp to use in the math
 rem ptr uses temp2 for the hi byte and temp1 for the lo byte 
 rem ptr is the 16 bit pointer in to the playfield data statement

 tmp_hi = 0 : ptr_hi = 0
  rem ptr = level * 3 (level * 2 + level = level * 3)
 ptr_lo = level * 2 + level
  rem ptr = level * 12 (ptr = level * 3 * 4)
 callmacro ptr_x_2
 callmacro ptr_x_2
  rem ptr = level * 11 (ptr = level * 12 - level)
 ptr = ptr - lvl
  rem ptr = level * 44 (ptr = level * 11 * 4
 callmacro ptr_x_2
 callmacro ptr_x_2
  rem ptr = level * 44 + PF_dat
 tmp_lo = baselo : tmp_hi = basehi
 ptr = ptr + tmp

edit: I added a little bit more asm
and stream lined the code a little.
Saves a few bytes, cycles, makes it
easier to use.

 dim lvl_hi = temp4
 dim lvl_lo = level
 dim lvl = temp4.level

 dim ptr_hi = temp2
 dim ptr_lo = temp1
 dim ptr = temp2.temp1

 rem takes 1 parameter an 8.8 variable
 rem shifts the 16 bit variable to the left (multiplies by 2)
 macro x_2
 asm
 asl {1}-1
 rol {1}
end
end

 rem takes 2 paramters an 8.8 variable and a constant
 rem adds the constant to the 16 bit variable
 rem if the constant is defined using the const declaration
 rem bB adds a # to it when it's passed as a paramter
 rem DASM doesn't seem to mind
 rem passing the data statement name works correctly
 macro add_con
 asm
 clc
 lda {1}-1
 adc #<{2}
 sta {1}-1
 lda {1}
 adc #>{2}
 sta {1}
end
end

 rem lvl is the 16 bit version of level, uses temp4 for the hi byte
 rem ptr is the 16 bit pointer in to the playfield data statement
 rem ptr uses temp2 for the hi byte and temp1 for the lo byte 

 ptr_hi = 0 : lvl_hi = 0
  rem ptr = level * 3 (level * 2 + level = level * 3)
 ptr_lo = level * 2 + level
  rem ptr = level * 12 (ptr = level * 3 * 4)
 callmacro x_2 ptr
 callmacro x_2 ptr
  rem ptr = level * 11 (ptr = level * 12 - level)
 ptr = ptr - lvl
  rem ptr = level * 44 (ptr = level * 11 * 4
 callmacro x_2 ptr
 callmacro x_2 ptr
  rem ptr = level * 44 + PF_dat
 callmacro add_con ptr PF_dat 

 
Edited by bogax
Link to comment
Share on other sites

  • 6 months later...

Added level 23. To start at room #1, press up+fire. Pressing fire without up warps you to room 23. The up+fire thing is just for convenience so I don't have to play through all the levels to test a new level at the end. I can't do Bob animation due to my code. Does anyone have any other feedback?

castle23.bas.bin

Link to comment
Share on other sites

I added a new room. I also played it on real hardware. I discovered my controller isn't very good. And my hands hurt after 30 minutes or so of playing it. I discovered a shortcut on room 21. I think I'll keep it the way it is, and if you discover it too that's OK.

castle24.bas.bin

Link to comment
Share on other sites

  • 4 weeks later...

Okay..I keep getting hit by the smelly-meatus-eye-nazi-bird badguys. I can't get to the door and I want to. I will try the other levels, as I started on #27. I couldn't stop laughing at how quick I was dying and If there was a counter for how many times I died it would probably be around one hundred and twenty. I'll try it on the cabinet and see what happens, maybe post a video or something. I would maybe cut back on the badguys, or make them have a slower/different pattern. It's HARD!

Link to comment
Share on other sites

  • 2 years later...

Very cool so far. I made it to 23 and couldn't get over the gap.

 

At level 21 when the enemy changes, you should make them be a different color. I see that you have place holder graphics in for a new enemy type so that may be your plan already.

 

The extra pixel for the Bob sprite makes the jumps get snagged easier.

 

Castle of Doom Bin with changes:

Castle of Doom b.bin

 

- removed extra pixel on Bob's front arm.

- made a bat sprite.

- changed room to cell

 

post-3832-0-60635500-1523110721.png

 

 

 

Link to comment
Share on other sites

I like it. Challenging, but not frustrating... as long as the unlimited tries remain. :)

 

Spent a few minutes to get to room 14, but had to put it down and get some things done. ;)

 

I imagine it will be even better when playing with a joystick instead of a keyboard.

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...