Jump to content
Atarius Maximus

Touchdown Challenge - My first 7800basic game

Recommended Posts

I spent a few hours today working on a clone of my recent 2600 game 'Touchdown Challenge'. I'm starting to get the hang of the differences between bB and 7800basic. This is a playable demo but is nowhere near finished. You can run up the football field, if you get to the top you score 7 points, if you touch an opposing player you're tackled and the game pauses, press fire to reset. The pattern of the other players never changes, I haven't gotten to that yet. I made a background that looks something like a football field, but still need to change the sprite graphics. They are from the samples in RevEng's distrubution.

football.bas

football.bas.a78

post-2143-0-98177400-1401996904_thumb.jpg

  • Like 14

Share this post


Link to post
Share on other sites

Needs music and animations, then it's a great start :)

 

Thanks! Yep, those are on the to-do list and I should be able to do both. I'm not great with music, but simple TIA sound effects should be no problem. I think I've got graphics figured out too, but animations will be a bit time consuming. I'd like to complete this game (as simple as it is) and then tackle a more advanced project. I'm trying to learn the basics with this one.

Share this post


Link to post
Share on other sites

Huzzah! Well done!

 

I say run with the graphics and make it "Elfen Football Challenge". :P

  • Like 1

Share this post


Link to post
Share on other sites

The game is now pretty much up to the same point as the 2600 version. I added in audio for running, scoring, and being tackled. There are 15 different patterns for the opposing players. Background graphics were cleaned up. Everything is working.

 

The main issue is collision detection. I think I've got it set up correctly, but collisions register when I'm seemingly nowhere near another sprite, and happen more when I'm trying to swing around one and I clip it from the top. You can see a registered collision that shouldn't be in the screenshot below (the top and bottom of the screen turns red when you're tackled). Any thoughts on that, RevEng?

 

I'm also including the graphics files this time in case anyone wants to compile this.

post-2143-0-06688700-1402083232_thumb.jpg

football3.bas

football3.bas.a78

football3.bas.bin

gfx.zip

  • Like 5

Share this post


Link to post
Share on other sites

Let's go 'full-on' license violation and instead of an elf, let's say it's a hobbit...

 

Call it, "Frodo Football" :grin:

  • Like 1

Share this post


Link to post
Share on other sites

You can see a registered collision that shouldn't be in the screenshot below (the top and bottom of the screen turns red when you're tackled). Any thoughts on that, RevEng?

They're colliding, but it just doesn't look like it. The adventurer sprite image is actually narrower than 16x16, and to exasperate the situation, heroup has the blank space on the left and herodown has the blank space on the right.

 

Here's a similar collision, except I colored each pixel in the corner of both sprites.

 

post-23476-0-30150900-1402099331_thumb.png

 

To avoid this you can justify both sprites from the top-left, and only use their visible size (14x16) rather than the sprite area size.

  • Like 4

Share this post


Link to post
Share on other sites

Aha, that makes sense. Thanks for clarifying. I think I'll justify them (as you described) and then maybe reduce the collision size a pixel or two less as well. I probably won't get back to making changes until next week.

 

One other question. It's not that important and no rush, but can you give me an example of how to put text on the screen with alphachars in this game? I couldn't get it to work today. Pasting in your sample code didn't seem to work, so I must be missing something. I'd just like a simple "Press fire to start" or something like that. Thanks!

Share this post


Link to post
Share on other sites

Ha. Trebor & David... I thought of both of those as well. I think I'll call it "Zelda & Frodo Touchdown Challenge". :)

 

Seriously, though, I probably will change the sprites at some point just to get some practice with animation on the 7800.

  • Like 2

Share this post


Link to post
Share on other sites

One other question. It's not that important and no rush, but can you give me an example of how to put text on the screen with alphachars in this game? I couldn't get it to work today. Pasting in your sample code didn't seem to work, so I must be missing something. I'd just like a simple "Press fire to start" or something like that. Thanks!

It looks like I need to add this tidbit to the docs, but if you're using direct strings with plotchars, you need to specify the font file with the characterset command. Otherwise plotchars doesn't know which graphic file to apply the text string to.

 

If you change "characterset tileset_blanks" to "characterset alphabet_8_wide" and add "plotchars 'press fire to start' 1 4 5" to the loop where you want to display the text, you should be good.

  • Like 1

Share this post


Link to post
Share on other sites

It looks like I need to add this tidbit to the docs, but if you're using direct strings with plotchars, you need to specify the font file with the characterset command. Otherwise plotchars doesn't know which graphic file to apply the text string to.

 

If you change "characterset tileset_blanks" to "characterset alphabet_8_wide" and add "plotchars 'press fire to start' 1 4 5" to the loop where you want to display the text, you should be good.

 

Aha! I definitely didn't change the characterset, that must have been the issue.

Share this post


Link to post
Share on other sites

 

Aha! I definitely didn't change the characterset, that must have been the issue.

 

Yep, that was it. It's working fine now, thanks RevEng. I don't have time today to work on sprite modifications, but changing the boxcollision from 16,16 to 13,13 is an improvement. It's not perfect but makes the game much more playable. I'll start on sprite changes next week.

post-2143-0-75013000-1402186434_thumb.png

football3.bas

football3.bas.a78

  • Like 4

Share this post


Link to post
Share on other sites

The addition of playsfx might help stop the hit sound from cutting off.

Share this post


Link to post
Share on other sites

The addition of playsfx might help stop the hit sound from cutting off.

 

The current effect is intentional, but I will be revisiting audio with the new playsfx command.

Share this post


Link to post
Share on other sites

Do we have scrolling routines?

 

What about moving the yard numbers instead of the screen itself? That might give a convincing illusion of scrolling..

Share this post


Link to post
Share on other sites

I don't recall seeing anything about scrolling in the manual. The numbers are part of the same bitmapped blocks that make up the background (including the yardlines). The screen is made up of individual 8x16 blocks. Scrolling just those wouldn't look right, if it's even possible. It'd look something like the screenshot.

post-2143-0-56140400-1402345542_thumb.jpg

  • Like 1

Share this post


Link to post
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.

  • Like 1

Share this post


Link to post
Share on other sites

You're right, it's only 90 yards. I could probably make it 100 and change the yard markers to the middle but would have to redo the graphics, there isn't enough room to add another 10 yards as it is now.

 

I was meaning to ask RevEng about this. I'm using alphachars to define the background graphics, which limits the number of tiles you can define. Is there a workaround or better way to do it?

 

I could also define a sprite for the center of the field but would need to change all the sprite definitions as only the 1st has priority, I don't want sprites to appear underneath the center graphic. Possible, just requires some extra work.

  • Like 1

Share this post


Link to post
Share on other sites

Do we have scrolling routines?

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.

 

 

I was meaning to ask RevEng about this. I'm using alphachars to define the background graphics, which limits the number of tiles you can define. Is there a workaround or better way to do it?

 

I could also define a sprite for the center of the field but would need to change all the sprite definitions as only the 1st has priority, I don't want sprites to appear underneath the center graphic. Possible, just requires some extra work.

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.

  • Like 3

Share this post


Link to post
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.

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