Jump to content
IGNORED

7800basic beta, the release thread


RevEng

Recommended Posts

I'm not convince of the general utility of the idea, pretty much for the reasons that SmittyB points out here. If we had enough memory for independent palettes on each character (a mode I've been thinking about lately, for other reasons) then I'd see the merit. But as it is, it's something that's probably best tracked with game-specific code.

Link to comment
Share on other sites

OK, I seem to be stumped again: I can't get my animations right.

 

I am attaching my source code, binary, and the included image files.

 

Problems:

 

#1. The animation seems jerky and not smooth

#2. When he faces left, the head is drawn on the bottom facing the wrong direction and the feet are on the top.

 

What have I done wrong?

 

post-23798-0-92391100-1499826660.png

(Save this as level1_tileset.png)

ramcharmap3b.bas

walking.zip

ramcharmap3b.bas.bin

Edited by Synthpopalooza
Link to comment
Share on other sites

There's 2 things that were messing up the animation.

 

First, you were using a bitwise "&10" to reduce the animation frame to between 0 and 9, but the bitwise & generally only works with powers-of-2, less 1. There's more info here. I converted it to just use an if...then to check the range.

 

Second, you were using "10" as the offset from the right-facing graphics to the left-facing graphics, but this should actually be 20. Your sprite layout is 10x bottom-half right-facing sprites, 10x top-half right-facing sprites, 10x bottom-half left-facing sprites, 10x top-half left-facing sprites. To skip from the first sprite to the first left-facing sprite, you need to bypass both of the right-facing 10x sets.

ramcharmap3c.bas

  • Like 2
Link to comment
Share on other sites

I noticed something weird last night ... I was trying to use the tsound command like this:

 

tsound 0,mytemp+1,8,10

 

When I put the +1 in there after mytemp it changes the distortion quality of the sound from 8. Should it be doing that?

 

Totally off-topic, but whilst hovering over users in the list (yes, we do that), I noticed that yours is really stale. LOL

Screen Shot 2017-07-13 at 6.14.14 PM.png

  • Like 1
Link to comment
Share on other sites

OK, I think I broke it again ...

 

Attaching the source code ... when I compile, Windows barfs with the error "7800Basic.exe has stopped working" and the compile fails.

 

This is the dump generated by 7800Basic:

C:\Users\Coddington\Downloads\7800basic\ramcharmap3d.bas.asm (2063): error: Syntax Error 'plotsp ifnconst bankswitchmode'.

Unrecoverable error(s) in pass, aborting assembly!
Complete.
Cartridge data file must be at least 4K!

7800header 0.7 Jun  6 2017 19:03:32
*** WARNING: The file size of C:\Users\Coddington\Downloads\7800basic\ramcharmap3d.bas.bin isn't correct.

Attaching my source plus the images.

 

 

 

ramcharmap3d.bas

ramcharmap3d.bas.asm

images.zip

Link to comment
Share on other sites

The main problem was that you used "them" a couple of time instead of "then", in an if...then statement. The interpreter thought it was another variable term, and things went downhill from there.

 

I'll see what I can do about making the error a bit obvious.

 

I've attached the fixed source.

 

 

ramcharmap3d.bas

Link to comment
Share on other sites

OK, I think I broke it again ...

 

Attaching the source code ... when I compile, Windows barfs with the error "7800Basic.exe has stopped working" and the compile fails.

 

 

That error also happens if you leave out "then" in an "if...then" statement which sometimes I forget to include.

Link to comment
Share on other sites

Well now that makes me feel silly. A stupid syntax error ... ;)

 

So a couple more questions:

 

I am thinking of redoing the game to where the whole screen, besides the top two lines of the display, is used for the playing area. How would I modify the code so that a 40x24 level prints on the whole screen?

 

Also: I found the example of changing the first two char lines to hi-res ... how would I be able to print readable text in the top window? Ideally I would like to be able to use the colors from the second palette (the rocket man colors) in 320B mode.

 

I'm still debating on whether to do this, or stick with 160B on the whole screen ... because I also had an idea that when you lose a man, an explosion happens in the scoring area by your lives counter, which destroys one of your lives.

Link to comment
Share on other sites

I am thinking of redoing the game to where the whole screen, besides the top two lines of the display, is used for the playing area. How would I modify the code so that a 40x24 level prints on the whole screen?

Ensure the memory you're using for the character buffer (in your case, "screendata") has enough consecutive unused bytes to hold that many characters.

 

To exceed the 7800 object 32-byte limit, you can just plot 2 character maps on the screen, with the second one offset in memory from the other...

dim screendataright=screendata+32

plotmap screendata 0 0 0 32 26

plotmap screendataright 0 128 0 40 26

 

...you can sidestep that last bit if you use incmapfile+plotmapfile instead, since it can handle character maps bigger than 32-bytes.

 

You'll also need to adjust any peekchar and pokechar commands to use the new width.

 

 

Also: I found the example of changing the first two char lines to hi-res ... how would I be able to print readable text in the top window? Ideally I would like to be able to use the colors from the second palette (the rocket man colors) in 320B mode.

You need to import a font in the graphics mode you want to work in. Otherwise you should be able to follow the example.

 

You need to plan the palette usage a bit if you're going to mix 160 mode graphics with 320B/C/D graphics, due to the restrictions in these modes.

Link to comment
Share on other sites

Change this...

if mytemp1>31 || mytemp2>25 then goto falling
to this...

if mytemp1>39 || mytemp2>25 then goto falling

Change this...

        if herox>123 then herox=1
        if herox<1 then herox=123
to this...

        if herox>157 then herox=1
        if herox<1 then herox=157

it also looks like this code isn't needed, and interferes with traveling off the the larger range...

if herodir=0 && herox>120 then herox=118:goto donecheckfall
  • Like 1
Link to comment
Share on other sites

That last line of code is needed ... tho it will need to be altered. I have the game engine set so that if the man hits a block while flying and he falls, his X position is corrected to the nearest character position. This is so that when two low platforms are together, he can thrust between them and color both platforms.

 

The problem comes with the edges. At the right edge he wraps but it skips the left column altogether. This line of code was meant to correct that.

Link to comment
Share on other sites

When you want to update the score, you can use the plotvalue command. Other text stuff you can use alphachars and plotchars. For text that doesn't need to change, be sure to plot it prior to using savescreen. That way you don't need to keep plotting the same objects every frame.

Link to comment
Share on other sites

OK, so another q ...

 

I would like to use different graphics each level, but all I really want to do is change the block and background graphics each level ... rather than use a whole new incgraphic and redo all the characters, is there anyway I can just do an incgraphic, design only the characters I want to change, and slot in the changed graphics into memory where the current background and block characters are now? I have deliberately placed them at the beginning of the graphics block so that they will be easy to access in this way.

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