Jump to content
IGNORED

Stupid question I probably shouldn't be asking...


Dragnerok X

Recommended Posts

What's wrong with this? I'm new to batari basic versions 99a and up, but not batari basic itself, and am wondering why, when I compile this, the background color only shows up right when I turn off the multisprite kernel option (which is why I downloaded this version, BTW.)

 

Combat_DX.bas

 

Any help would be appreciated.

 

:)

Edited by Dragnerok X
Link to comment
Share on other sites

What's wrong with this? I'm new to batari basic versions 99a and up, but not batari basic itself, and am wondering why, when I compile this, the background color only shows up right when I turn off the multisprite kernel option (which is why I downloaded this version, BTW.)

Hmm, it looks like a bug? I see this in the multisprite kernel, which looks suspicious:

 

ldy #88

lda #$02
sta COLUBK	;+5	18

; sleep 25
sleep 18

So I changed it to this, and it seems to work now-- but I don't know if I broke anything else by doing this, so...

 

ldy #88

;	lda #$02
;	sta COLUBK	;+5	18

; sleep 25
; sleep 18
sleep 23

Here is the modified file, which you can use at your own risk. :) (You'll need to rename it, change the .txt extension to .asm.)

 

multisprite_kernel.txt

 

Michael

Link to comment
Share on other sites

What's wrong with this? I'm new to batari basic versions 99a and up, but not batari basic itself, and am wondering why, when I compile this, the background color only shows up right when I turn off the multisprite kernel option (which is why I downloaded this version, BTW.)

Hmm, it looks like a bug? I see this in the multisprite kernel, which looks suspicious:

 

ldy #88

lda #$02
sta COLUBK;+5	18

; sleep 25
sleep 18

So I changed it to this, and it seems to work now-- but I don't know if I broke anything else by doing this, so...

 

ldy #88

;	lda #$02
;	sta COLUBK;+5	18

; sleep 25
; sleep 18
sleep 23

Here is the modified file, which you can use at your own risk. :) (You'll need to rename it, change the .txt extension to .asm.)

 

multisprite_kernel.txt

 

Michael

 

Thanks, that works. On to stupid question #2: Why aren't players 1 and 2 showing up?

Link to comment
Share on other sites

Thanks, that works. On to stupid question #2: Why aren't players 1 and 2 showing up?

Players 1-5 don't show up until you change the Y-positions of all of the sprites so they are all onscreen and don't overlap. Just one of the many bugs in the multisprite kernel. This and other bugs will be fixed before the next release of bB.

Edited by batari
Link to comment
Share on other sites

Players 1-5 don't show up until you change the Y-positions of all of the sprites so they are all onscreen and don't overlap. Just one of the many bugs in the multisprite kernel. This and other bugs will be fixed before the next release of bB.

 

Thanks for the info batari! I'll post it once I'm able to get it fixed. :ponder: ;)

 

(yes, this IS combat (+ extras) using Bb if you haven't already noticed.)

Link to comment
Share on other sites

Combat DX Demo 2: Basic Sprite Movement

 

Combat_DX___Demo_2.bin

 

I've tried to replicate the "feel" of the tank movement as best as I could for this, but if need be I'll go back tweak it and create "Combat DX Demo 3: Advanced Sprite Movement" which would include things like more accurate sub-pixel movement and possibly friction (Does combat even have that?).

If not I'll start working on level landscaping because it heavily corresponds to your tanks movement (i.e. collision detection against objects). That's when you'll notice a few changes taking place. :evil:

 

Comments?

 

:ponder:

Edited by Dragnerok X
Link to comment
Share on other sites

Comments?

Slowly but surely, it's taking shape! :) One thing I'd like to see, though, is the ability to move in reverse by pushing the joystick in the down direction. Atari 2600 Combat does *not* have that, but I think some of the other Combat-like tank games do?

 

Michael

 

I probably could do that, with a little work. Just give me a day or so. ;)

Link to comment
Share on other sites

what's wrong with this source?

This is your problem:

 

20 if a = 1 && e = 0 || if a = 9 && e = 1 then player0:
  %00000000
  %11111100
  %11111100
  %00111000
  %00111111
  %00111000
  %11111100
  %11111100
end

You can't use "if" after "||" like that. Furthermore, that comparison is too complex. Most all languages will let you do "if thing1 and thing2 or thing3 and thing4 then something." The order of precedence is "not and or." But bB can't handle stuff that complex (yet-- maybe eventually). Also, you can't put "player0:" at the end of an "if" like that. So what you'll need to do is break that code up into multiple lines, as follows:

 

20 if a <> 1 || e <> 0 then 21
  if a <> 9 || e <> 1 then 21
  player0:
  %00000000
  %11111100
  %11111100
  %00111000
  %00111111
  %00111000
  %11111100
  %11111100
end

Michael

Link to comment
Share on other sites

what's wrong with this source?

This is your problem:

 

20 if a = 1 && e = 0 || if a = 9 && e = 1 then player0:
  %00000000
  %11111100
  %11111100
  %00111000
  %00111111
  %00111000
  %11111100
  %11111100
end

You can't use "if" after "||" like that. Furthermore, that comparison is too complex. Most all languages will let you do "if thing1 and thing2 or thing3 and thing4 then something." The order of precedence is "not and or." But bB can't handle stuff that complex (yet-- maybe eventually). Also, you can't put "player0:" at the end of an "if" like that. So what you'll need to do is break that code up into multiple lines, as follows:

 

20 if a <> 1 || e <> 0 then 21
  if a <> 9 || e <> 1 then 21
  player0:
  %00000000
  %11111100
  %11111100
  %00111000
  %00111111
  %00111000
  %11111100
  %11111100
end

Michael

 

Thanks, it compiled. One problem. Where's the tank?

 

Combat_DX.bas

 

Combat_DX.bas.bin

Link to comment
Share on other sites

Thanks, it compiled. One problem. Where's the tank?

You stuck the two "if" statements on the same line, one after the other, so the second one is never being performed:

 

20 if a <> 1 || e <> 0 then goto 21 : if a <> 9 || e <> 1 then goto 21
player0:
%00000000
%11111100
%11111100
%00111000
%00111111
%00111000
%11111100
%11111100
end

You need to put the second if on a separate line, like I'd done in my previous post. I don't use line numbers, so I hadn't given the second line a line number; but if you want to give it a line number, you could call it "20a" or "20.5" or something like that. (bB uses alphanumeric line *labels*, not numeric line *numbers*, so "20.5" is valid, although "20a" probably looks better.)

 

Also, I made a boo-boo in my reversal of your original logic. The first "if" needs to be put back the way it was, but it needs to "goto" the line with the "player0:" statement, so that line will need a line label. The second "if" is okay the way I rewrote it. So it should look something like this:

 

20 if a = 1 && e = 0 then goto 20b
20a if a <> 9 || e <> 1 then goto 21
20b player0:
  %00000000
  %11111100
  %11111100
  %00111000
  %00111111
  %00111000
  %11111100
  %11111100
end

Sorry about that! I made that fix throughout and recompiled it. But the "reverse" feature that I had suggested seems to be buggy. I don't have time to look at that right now, though.

 

Michael

Combat_DX.bas

Combat_DX.bas.bin

Link to comment
Share on other sites

Thanks, it compiled. One problem. Where's the tank?

You stuck the two "if" statements on the same line, one after the other, so the second one is never being performed:

 

20 if a <> 1 || e <> 0 then goto 21 : if a <> 9 || e <> 1 then goto 21
player0:
%00000000
%11111100
%11111100
%00111000
%00111111
%00111000
%11111100
%11111100
end

You need to put the second if on a separate line, like I'd done in my previous post. I don't use line numbers, so I hadn't given the second line a line number; but if you want to give it a line number, you could call it "20a" or "20.5" or something like that. (bB uses alphanumeric line *labels*, not numeric line *numbers*, so "20.5" is valid, although "20a" probably looks better.)

 

Also, I made a boo-boo in my reversal of your original logic. The first "if" needs to be put back the way it was, but it needs to "goto" the line with the "player0:" statement, so that line will need a line label. The second "if" is okay the way I rewrote it. So it should look something like this:

 

20 if a = 1 && e = 0 then goto 20b
20a if a <> 9 || e <> 1 then goto 21
20b player0:
  %00000000
  %11111100
  %11111100
  %00111000
  %00111111
  %00111000
  %11111100
  %11111100
end

Sorry about that! I made that fix throughout and recompiled it. But the "reverse" feature that I had suggested seems to be buggy. I don't have time to look at that right now, though.

 

Michael

 

That's a bit of good news, I guess. I'll try and fix everything, but before I do that, could you re-post the code? It seems the link is broken.

Link to comment
Share on other sites

...I'll try and fix everything, but before I do that, could you re-post the code? It seems the link is broken...

 

...Please? :ponder:

Sorry, I've been preoccupied with completely wrapping up you-know-what. :)

 

Here you go...

 

Michael

 

I tested the link this time, and it seems to be okay. I'm not sure what happened with the other one.

Combat_DX.bas

Edited by SeaGtGruff
Link to comment
Share on other sites

...I'll try and fix everything, but before I do that, could you re-post the code? It seems the link is broken...

 

...Please? :ponder:

Sorry, I've been preoccupied with completely wrapping up you-know-what. :)

 

Here you go...

 

Michael

 

I tested the link this time, and it seems to be okay. I'm not sure what happened with the other one.

 

Thanks, but "you know what" is....? if you have to keep it a secret, then pm me because either you didn't tell me or I forgot.

 

Yes, I know I'm dense lately. :)

Edited by Dragnerok X
Link to comment
Share on other sites

Sorry, I've been preoccupied with completely wrapping up you-know-what. :)

Thanks, but "you know what" is....?

I was referring to the "E.T. Book Cart." I've now sent Albert all three final versions (NTSC, PAL/60, and PAL/50), after having completed an easter egg and finding/fixing a couple of obscure bugs. The easter egg isn't anything fancy, just a holiday-themed screen with music (gloriously out of tune, as only the Atari 2600 can do-- especially since this was the first time I'd ever tried to make music on the Atari 2600, and my music driver doesn't do anything fancy like waver between frequencies to get better in-tune notes). I'd actually wanted to add in a bonus game, but there wasn't much contiguous memory left over, and definitely not enough time. :sad: Still, I think the "E.T. Book Cart" is a pretty nice piece of work for my first-ever Atari 2600 cartridge! :) I'm really looking forward to holding it in my hands, stroking my fingers lovingly across its splendiferous label art, holding it beneath my nose to admire that "new cart smell," popping it into my Atari 2600, and powering it up. :cool:

 

Michael

Link to comment
Share on other sites

Sorry, I've been preoccupied with completely wrapping up you-know-what. :)

Thanks, but "you know what" is....?

I was referring to the "E.T. Book Cart." I've now sent Albert all three final versions (NTSC, PAL/60, and PAL/50), after having completed an easter egg and finding/fixing a couple of obscure bugs. The easter egg isn't anything fancy, just a holiday-themed screen with music (gloriously out of tune, as only the Atari 2600 can do-- especially since this was the first time I'd ever tried to make music on the Atari 2600, and my music driver doesn't do anything fancy like waver between frequencies to get better in-tune notes). I'd actually wanted to add in a bonus game, but there wasn't much contiguous memory left over, and definitely not enough time. :sad: Still, I think the "E.T. Book Cart" is a pretty nice piece of work for my first-ever Atari 2600 cartridge! :) I'm really looking forward to holding it in my hands, stroking my fingers lovingly across its splendiferous label art, holding it beneath my nose to admire that "new cart smell," popping it into my Atari 2600, and powering it up. :cool:

 

Michael

 

You made the ET Book Cart? :-o Sweet!!! :D

Link to comment
Share on other sites

Still, I think the "E.T. Book Cart" is a pretty nice piece of work for my first-ever Atari 2600 cartridge! :)

You are definitely going to be mentioned in the GoSub credits, that is, if it's going to be in the store. Albert's thinking it over...

 

(BTW, this is my 900th post! Yay me!)

Edited by atari2600land
Link to comment
Share on other sites

Combat DX: Demo 3 - Advanced Sprite Movement

 

Combat_DX.bas

 

Combat_DX___Demo_3.bin

 

Added reverse to the tanks and cleaned up the code (A LOT).

 

Next step is to add an enemy, which can either be player 2 controlled or AI (I'm pretty new to that, by the way.)

 

Questions, Comments, Suggestions?

 

Edit: SeaGtGruff: That was some of the most complicated movement code I've ever written! I guess I'm just lucky it's not in 3d...

Edited by Dragnerok X
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...