By Duane Alan Hahn (Random Terrain) using hints, tips, and code snippets from AtariAge members such as batari, SeaGtGruff, RevEng, Robert M, Atarius Maximus, and jrok.

About this program:

I might turn this into a real game and possibly call it Seaweed Patrol if I don't think of a better name.

You are part of an advanced underwater civilization. Everyone has a job and yours is to patrol your section of the ocean in a semi-organic submarine. Highly aggressive seaweed surrounds you and it keeps trying to replicate faster than you can shoot. Use your missiles to blast any bits of seaweed that appear before they clog up your sector and spread to others, making it nearly impossible for anyone to travel. Don't let the seaweed strangle your civilization to extinction.

Your ship will be damaged if you bump into the seaweed, so be careful.

If I turn this into a game, there will be an enemy or two and bonus items to collect. I'll also have to figure out if it's a non-stop game or if there will be rounds.

Hit the reset switch if you want to restart the program.

This is the first draft. I still need to add variable descriptions and probably a few more comments too. I'll do that later today or tonight. Remember, this is not a complete game. There is no title screen, no bonus items, no enemy sprite, and the difficulty doesn't increase yet (it's pretty much on the easiest setting).

There are probably ways to crunch the code down that I don't know about yet. If anybody who is good at that can point out where I might be able to save hundreds or thousands of bytes, I would appreciate it. I don't want to put this on the bB page until it is as perfect as we can get it.

I'll add future drafts to this first post. If nothing unexpected happens, the second draft will be posted later today or tonight.

Thanks.

Update: I just had an idea. Since you can shoot more than one piece of seaweed with one missile, it might be possible to have the first hit be worth 10 points, the second hit 20, the third hit 40, the fourth hit 80, and so on. The player would be more likely to wait until a nice row is lined up before shooting and it would be kind of satisfying.

I dug through the code a bit, and everything looks efficient to me. Its probably the easiest to read bB source code I've ever seen!

I like what you've done so far, and I'd love to see it turned into a full game. The sliding effect is a nice touch, and multiplied scores for lining up the targets would make for a interesting bit of strategy.

This one is simple and fun. I like the story line and how you wrote it. I like your idea about the first hit worth XX, the second worth XX, etc.

I think this might be fun as a "Berzerk" or "Smash TV" like game.. block off the top and bottom. You are required to stay on the screen and clean up so much before you can exit the level.

I like the sliding a lot. I've always wanted to add that to a game.

Finish up whatever needs to be finished, modify RevEng's title screen so that you can use it in a few banks.. this way you can have an animated title screen. Bam.. your first finished game on cartridge.. I'll display it at my table at the Video Game Trader Expo in October if you want.

For my own stuff I got a price on boxes if we want to do like 20 copies. Maybe those 20 copies can all be printed differently to give them some sort of randomness to it.

I'm interested in the advanced joystick reading code. Reading SWCHA and on goto/gosub seems to be the way to go. Comments are nice. The asterix's makes them stand out and are much more readable.My emulator doesn't seem to want to continue going diagonal. I get the inital keypress in and then it veers straight north or south. My guess is that Keyboards Are Evil.

Thanks for the replies. Yeah, if the code can't be crunched that much, next step is bank switching. First thing is to add variable descriptions and a few more comments tonight, then I can see what I can do to turn this into a game.

This is actually the first bB program I've played with (I don't do emulators). I'm impressed. It reminds me of Turmoil, Ram It, and Squeeze Box, but the free roaming nature w/ diagonal movement really opens up that style of gameplay. I look forward to seeing where you take this.

Ugh, I can't make much of this in terms of adding it to my own code. There's too much extra where as I just need to know how to shoot from an animation in only 2 directions and how to move using an animation. But I don't need to have a diagonal animation, just the normal walk.

If you mean one that uses the new titlescreen kernel (instead of using the kernel's playfield to draw a title) then a tutorial for that should be forthcoming in a few weeks. Hold tight.

I mean one like I already have made, that works in my own code but not this example. Like I said, this example seems to over complicate some things, it's like signing up for a math class but instead of teaching you just math the teacher decides to teach math, physics, biology and english. In this case, your going in expecting to learn how to shoot in 8 directions, instead it trys to teach you how to shoot in 8 directions while animating 8 directions while sliding with a health bar, score, objects to hit etc.

Like I said, this example seems to over complicate some things, it's like signing up for a math class but instead of teaching you just math the teacher decides to teach math, physics, biology and english.

I see what you mean, though I know RT intended this to be a more integrated example, rather than the short (and difficult to mix) examples in the code snipplets thread.

And to be fair, you are asking for him to integrate yet another feature into his program - a titlescreen.

Maybe if he called it something like "Advanced Example: A game with missile shooting in 8 directions" your expectations would have matched the example better.

Like I said, this example seems to over complicate some things, it's like signing up for a math class but instead of teaching you just math the teacher decides to teach math, physics, biology and english.

I see what you mean, though I know RT intended this to be a more integrated example, rather than the short (and difficult to mix) examples in the code snipplets thread.

And to be fair, you are asking for him to integrate yet another feature into his program - a titlescreen.

Maybe if he called it something like "Advanced Example: A game with missile shooting in 8 directions" your expectations would have matched the example better.

I was just asking where I could add a title screen in the code as I already had one made, though I looked at the simpler code snippet and based my code off that to create a animated moving shooting character.

Like I said, this example seems to over complicate some things, it's like signing up for a math class but instead of teaching you just math the teacher decides to teach math, physics, biology and english. In this case, your going in expecting to learn how to shoot in 8 directions, instead it trys to teach you how to shoot in 8 directions while animating 8 directions while sliding with a health bar, score, objects to hit etc.

Instead of working on the second draft tonight, I have another example program I can adapt to simply shoot missiles. Do you want me to use Advanced Joystick Reading with SWCHA or do you want if-thens with joy0up, joy0down, and so on?

Like I said, this example seems to over complicate some things, it's like signing up for a math class but instead of teaching you just math the teacher decides to teach math, physics, biology and english. In this case, your going in expecting to learn how to shoot in 8 directions, instead it trys to teach you how to shoot in 8 directions while animating 8 directions while sliding with a health bar, score, objects to hit etc.

Instead of working on the second draft tonight, I have another example program I can adapt to simply shoot missiles. Do you want me to use Advanced Joystick Reading with SWCHA or do you want if-thens with joy0up, joy0down, and so on?

Joy0up etc seem to work well. I got the missile shooting and character movement working using the snippets. I thought I was ready to get it all at once but I hadn't realized how much it would actually be as what you made is pretty much a full game.What I need to get working now is collision detection(which I've yet to take a look at the snippet, so I need to do that) and enemies that chase you. After that I'll need to figure out how to add playfield obstacles.

Since my first try at a large example program was a failure, I'm going to turn it into a game without worrying about using it as an example program. I'll make a new thread about it when I'm done upgrading it to bank switching.

Before I can make a new thread, I need to know the name of the game. Here are two possible names:

Since my first try at a large example program was a failure, I'm going to turn it into a game without worrying about using it as an example program. I'll make a new thread about it when I'm done upgrading it to bank switching.

Before I can make a new thread, I need to know the name of the game. Here are two possible names: