Jump to content
IGNORED

GoSub (WIP)


Recommended Posts

So playing with the code again, I discovered that I will only have room for 20 levels, not the 25 I had thought before. I could fit 25 if I make the level data smaller, but then it looks all weird, so I am going to go with 20. I want to add a secret level select code, and I'm having trouble with it.


    rem temporary level select code for testing only.
    if joy0right && !keygot{2} && levelnumber<$20 then keygot{2}=1
    if !joy0right && keygot{2} then keygot{2}=0 : dec levelnumber=levelnumber+1
    if joy0left && !keygot{3} && levelnumber>$1 then keygot{3}=1
    if !joy0left && keygot{3} then keygot{3}=0 : dec levelnumber=levelnumber-1    

I can't make the levelnumber variable work correctly. I put this before the title loop and before the level data getting code, but it won't work right. What do I have to do?


    levelnumber=converttobcd(levelnumber)

I also thought of a cool idea I would like to implement but don't know if I could: Have the score be a scroll, like from a lost treasure map or something (see crude pic below). I am wondering if I could do that somehow.

scroll.png

Link to comment
Share on other sites

Are you treating levelnumber as a bcd variable throughout your code? If you set it that way initially and do all addition and subtractions with "dec", then you shouldn't have to use the conversion function to begin with. I would think that if you run the conversion function on a number that is already BCD or has already been converted to BCD, then in some cases it would corrupt the number. E.g. if levelnumber starts out with a value of 10, and you run converttobcd, the value becomes $10. If you run it again, it is assuming that you are starting with a binary number, so after converting again, the value would be $16.

 

In most cases, I think the easiest thing would be to start with a BCD number, and have all addition and subtraction operations be in "dec" mode so that you never have to convert.

  • Like 1
Link to comment
Share on other sites

OK, I think I fixed that problem, but I have another one. I tried putting in a scroll image as a banner, but it gave me this error message:


*** (): INFO, GFX Block #3 starts @ $E000
        scroll01
*** (): INFO, GFX block #3 has 1800 bytes left (225 x 8 bytes)

Why won't it put the whole image in if the GFX block has 1800 bytes left in it?

 

scroll.png

Link to comment
Share on other sites

Is there more to that message? I wouldn't say that's an error just looking at it, but.... 

As your graphic is 16 pixels tall it's imported as 2 graphics. 160A graphics are 2 bits per pixel so a byte defines 4 pixels. 124/4 = 31 bytes, 31 * 2 zones = 62 bytes for that image. 256 - 31 = 225 so that tells me it's only imported the first half meaning you may have used incgraphic rather than incbanner.

Link to comment
Share on other sites

As it turns out, the sub/coral collisions weren't working in the boss stages. I figured out the cause by remembering the boss stages use a different character set. Everything is fixed now. I have 166 bytes left in DMA hole #0, which should be plenty of room for a bonus stage song. I made an ending song and a boss song while I was at it.

gosub2019october10v2.zip

  • Like 2
Link to comment
Share on other sites

Great job.  The only complaint I have is that it's hard to tell what's going on in the game over screen.  The sky looks very green and blends in with the captain.  If you're using a color in the Ax or Bx range, it's going to look very green on a lot of setups.  I recommend not going past the 9x range for blues especially for a sky color.

Link to comment
Share on other sites

Hi Chris

 

great work....works well on real hardware...why not

go upnto more KB???This would mean more space for more levels ?

Would it be possible to ad d another boss instead 

of octopus for 2 times?

Maybe a giant jelly or a shark?

This are just suggestions...the game plays very well.

greetings Walter

Link to comment
Share on other sites

13 hours ago, KevinMos3 said:

Great job.  The only complaint I have is that it's hard to tell what's going on in the game over screen.  The sky looks very green and blends in with the captain.  If you're using a color in the Ax or Bx range, it's going to look very green on a lot of setups.  I recommend not going past the 9x range for blues especially for a sky color.

on my TV...it looks very well

Link to comment
Share on other sites

This is what it would look like using 9A for the sky:

 

GoSub_9A_Sky.thumb.png.d008b5b6f06d8b6ee00ecd618d5e5402.png

 

Compared to the current color in 2 different emus.  Many TVs will look somewhere between these.  Some will lean more toward the picture on the left, but that's pretty much the best you can hope for.  Some of my older TVs definitely lean more toward the in-between of these pics or more toward the right.

0001.png.4deccc03285ce1789ce28fbb37bd57a7.png gosub.11Oct19_00.png.5d35e01dab84f4592fd12592d9720e37.png

I've worked with colors and how they look on many different TVs.  Just saying that you don't really want to go past the "9x" range for sky blue.  The "Ax" range can work depending on surrounding colors, but it's likely to appear too greenish (though suitable for water).  The "Bx" range will definitely be too green for sky.

 

Unless it's a shared color with something you want to appear green, but in that case, "Ax" would be a suitable compromise.

Edited by KevinMos3
  • Like 1
Link to comment
Share on other sites

I just noticed the pic of the game over screen in post 200 on the previous page.  Not having the sky a different color (same color as the water) makes it look less boxed in.  I kinda think that looked better.  Here it is with the 9A color used to highlight some of the waves/spashes while the sky is removed to avoid the boxed in look, but keep the extra color detail.  The man's jacket is B4 in this mockup.  It could go one lower to give more contrast with the water, but I don't have my actual 7800 color pallet for my art program available right now.  I'd avoid any luminance 2 or lower if you also have black though (as you do here), because on a lot of TVs a value of 2 or lower looks almost indistinguishable from black.

 

gosub.11Oct19_alt.thumb.png.de40293a9ac470731854627ea0512d4c.png

  • Like 2
Link to comment
Share on other sites

14 hours ago, TIX said:

yeah,

I got the right hue in Altirra !

Altirra maybe be leveraging the factory/cool appearance of the palette (Palette customization and selection is available under Altirra due to a number of factors). 

 

Regardless, take note of the attachments.  9x remains distinctively blue, but for many values of Ax, it can look more green than blue over consistent system running time.

 

COOL:

COOL_9x_thru_Bx.PNG

 

HOT:

HOT_9x_thru_Bx.PNG

 

The 7800 8BitDev site provides a more detailed explanation respecting the 7800 palette; including the gif linked below to help with visualization of what transpires.  Truth is most colors stay consistently near the same, visually.  Ax is one range in which the change over time can be significantly noticeable.

 

http://7800.8bitdev.org/index.php/File:YIQ-7800-warmup.gif

  • Like 3
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...