Jump to content
IGNORED

Touchdown Challenge - My first 7800basic game


Recommended Posts

Sorta, but not really. Horizontal fine-scrolling can be done by redrawing the background at a different X. We can't do vertical fine-scrolling yet, but its on the roadmap.

 

 

 

Looking at the source, you haven't used all the characters you can with alphachars. You've used lowercase letters and punctuation, but you still have uppercase letters, digits, and some others like =, -, _, ...

 

If its still not enough you can use a plain old data statement instead of alphadata, and specify tile index values for data.

 

Re: the center graphic, sprites are displayed with the first sprite drawn on the bottom, and the last sprite drawn on top. So to avoid having your logo floating over other sprites, just make sure it's the first sprite you draw.

 

Looking at your source, it would be best to fit the plotsprite in right after your plotmap command, so it gets saved along with the map.

 

Thanks for the detailed info, RevEng. If you have time I'd love to see a sample of how to do horizontal fine scrolling as you described, but no rush of course. It can wait until you get to it on your (probably extensive) roadmap list.:) Does the alphachars image file have to include uppercase and lowercase as well to match up with the "alphachars 'abcdefghij....'" statement in the code? Still learning and trying to understand everything...

Link to comment
Share on other sites

Not a problem.

 

The alphachars letters aren't really in the image file in the first place. Using the letters is just a way of conveniently referencing "the Nth character in the image file." The first letter in alphachars definition represents the first character in the image file, the second letter represents the second character, ...

 

When we use something like...

 

  alphachars ' abcABC'
  alphadata somedata tileset_blanks
  ' a b b a A B B A '
end
...it produces the exact same binary code as...

 

  alphachars ' xyzXYZ'
  alphadata somedata tileset_blanks
  ' x y y x X Y Y X '
end
...regardless of what's in the image. Edited by RevEng
  • Like 1
Link to comment
Share on other sites

Thanks again, that makes sense. I'll experiment more this week. Making this game is still all about trying to just figure out the basics.

 

Oh yeah... I had another question I had meant to ask. Is there an easy way to define multiple backgrounds? What if, as an example, I wanted to change the entire background of the football game to a soccer field after scoring a touchdown? I of course also have in the back of my head the game "engine" I used for many of my bB games that was based on SeaGtGruff's old move around rooms demo. I'd love to see a sample of something like that in 7800basic.

Link to comment
Share on other sites

Not a problem.

 

If you want to have multiple screens, you can create multiple data statements for the screens, and then use conditional logic to select between different plotmap statements.

 

I hear you on the sample thing. [looks at the rather long to-do list.] ;)

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

Not a problem.

 

If you want to have multiple screens, you can create multiple data statements for the screens, and then use conditional logic to select between different plotmap statements.

 

I hear you on the sample thing. [looks at the rather long to-do list.] ;)

 

Somehow I think I'm adding to your to-do list. Much appreciated. :)

 

I will spend as much time as I can reading what you've already added to your documentation. It's really easy to miss the obvious sometimes.

 

I learn best from example and tend to dive into other people's code first before studying documentation. There's not a whole lot of other games to look at yet, hopefully I'm going to help others with this game.

Link to comment
Share on other sites

I know zip about programming but do know football. Your field is only 90 yards long because the 50 yard line isn't marked on both sides. Is this a screen or programming limitation perhaps?

 

Game looks pretty neat but I almost like the way you did the 2600 field better (where you marked the yard lines themselves, as opposed to the field sections.) I also liked how the 2600 version had an image in the center of the field, albeit all white. Even a red or blue circle to indicate a team was "at home" might be neat.

 

I updated the background to make the field 100 yards and changed the line numbers to be in the center of the line. The compromise was removing the goal post from the bottom end zone. I also added the center image for the field.

football8.bas

football8.bas.a78

football8.bas.bin

gfx_v8.zip

post-2143-0-21919600-1402423624_thumb.jpg

  • Like 7
Link to comment
Share on other sites

Multiple sprites on-screen with no flicker still confuses and angers me. Can't wait until my last couple of 2600 projects are over =)

 

In RevEng's multisprite demo he has 24 moving sprites on screen at the same time (with no flicker). It says in the code that it's about the limit for real hardware. For those like me who are used to bB, it is indeed confusing and angering. ;)

  • Like 1
Link to comment
Share on other sites

RevEng - I figured out the multiple backgrounds/multiple plotmaps, it really wasn't that difficult. I can probably create a multiple room demo at this point.

 

I understand using alphachars better now and was able to expand on it for the background. Still not sure how to use data statements instead, but haven't looked in the manual again, you've probably explained it in there already.

Link to comment
Share on other sites

Excellent on figuring out multiple screens!

 

To be honest, I didn't document using regular data statements for the character plotting commands, mostly because it's bit of a complicated topic for new 7800basic programmers. From a pure code perspective it's no big deal... You just define a data statement with data values instead of using the alphadata with characters. If it helps, you can think of the data values as ascii lookup codes. 0 is the first character, 1 is the second, ...

 

But there is one wrinkle to keep in mind. MARIA works with the absolute location of the bytes in the graphic area, so when you have multiple images stored in the graphic area, you need to account for that in your data values, to skip over any preceding images.

 

Not sure if that's clear or not, but my overall suggestion is to try an stick with alphadata, as it was designed expressly to simplify all of this. If you hit a limit in the design, raise it, and we'll figure out a way to extend it.

Link to comment
Share on other sites

Excellent on figuring out multiple screens!

 

To be honest, I didn't document using regular data statements for the character plotting commands, mostly because it's bit of a complicated topic for new 7800basic programmers. From a pure code perspective it's no big deal... You just define a data statement with data values instead of using the alphadata with characters. If it helps, you can think of the data values as ascii lookup codes. 0 is the first character, 1 is the second, ...

 

But there is one wrinkle to keep in mind. MARIA works with the absolute location of the bytes in the graphic area, so when you have multiple images stored in the graphic area, you need to account for that in your data values, to skip over any preceding images.

 

Not sure if that's clear or not, but my overall suggestion is to try an stick with alphadata, as it was designed expressly to simplify all of this. If you hit a limit in the design, raise it, and we'll figure out a way to extend it.

 

As I understand it now the limit would be how many unique characters you could add to alphachars. It worked great in my testing today using all of the extra non-alphabet characters on the keyboard (`~!@#$%^&*()_+-={}[]|\":;'?><,./) but in a very large game it'd still be a limitation. Using uppercase characters resulted in the actual uppercase characters being displayed. For a really large game (yes, thinking big here) it still wouldn't be enough and personally I'd probably rather learn and use data statements over alphachars.

 

With that said, I know I just sent you a PM about something else and you've got a lot more important things you'd like to work on first I'm sure. I'd love to see an explanation of how to use data statements when you have the time.

Link to comment
Share on other sites

Using uppercase characters resulted in the actual uppercase characters being displayed. For a really large game (yes, thinking big here) it still wouldn't be enough and personally I'd probably rather learn and use data statements over alphachars.

The upper case characters were probably displayed because you ran past the number of actual bytes in your image and it went on to the next image in memory. (likely the text font image) MARIA has no built-in fonts, so 7800basic doesn't know the difference between a letter graphic and a space invader. Looking at my ascii chart, you'd have about 90 characters to play with, per alphachars statement.

 

So yeah, if you want more than 90 characters in any given data statement, it might be best to use plain data statements.

Link to comment
Share on other sites

Just got round to trying this game out and i gotta say its a lot of fun and deceptively difficult, The hit detection feels a litle off as sometimes i go through gaps that are wide enough but still get tackled but yeah i like it. it would be cool if you could add a field goal screen after each touch down just to change it up a little bit.

Link to comment
Share on other sites

  • 8 months later...

I know zip about programming but do know football. Your field is only 90 yards long because the 50 yard line isn't marked on both sides. Is this a screen or programming limitation perhaps?

 

Game looks pretty neat but I almost like the way you did the 2600 field better (where you marked the yard lines themselves, as opposed to the field sections.) I also liked how the 2600 version had an image in the center of the field, albeit all white. Even a red or blue circle to indicate a team was "at home" might be neat.

i'm not sure about this^^

you don't need to mark 50 yd line both sides. by counting the the halfway line (twice)

surely 0 to 10, 10 to 20, 20 to 30, 30 to 40, and 40 to 50 = 50 yards

therefore from each end to halfway = 50x 2 = 100

or have i misunderstood something?

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