Log In  


HELLO and welcome back to another exciting week of Applecart.

When we first started, we wanted you programmers out there to give us your own rendition of Apple ]['s own Saucer Attack, an old 6502-assembly Apple ][ game that was originally read in the computer by audiocassette.

There were two entries total, found HERE and HERE.

The week after that we had a new competition, to make a game called Saucer Invasion, slightly different from the above. In this case we had a bonus, a video to look at so we could indeed see the original game, its instructions, presentation, and operation.

Youtube video of Saucer Invasion

So there were two entries on this one, and you can find those HERE and HERE.

LAST WEEK your challenge was to make the game BOMBER based on THIS video.

This cart request was different from the others in that when the tank is hit by the bomb it blows up in a brilliant explosion where every pixel that made up the tank explodes outward. Quite lovely.

This week there were two entries. One of course by myself.


==PLAY GAME==
Bomber Revisited written by dw817 (01-12-20)



==PLAY GAME==
Bomber written by Nosnibor28 (01-11-20)


THIS WEEK's challenge (01-12-20) in lieu of the new movie out, "STAR WARS: The Rise Of Skywalker," is in fact STAR WARS. An interesting Apple ][ game in that you are given a choice of 2-different kinds of Ammo to fire at Empire Tie-Fighters in a pseudo 3-dimensional game which is straight out of the popular science fiction series.

Now before you say WAIT A MINUTE I CAN'T DO THAT ! Think about Pico-8 for a second. It has a mapper. What if ... just what if you drew that fancy target background in THERE from some well-placed 8x8 pixel sprites and then just just called MAP() to update the whole background of the screen ? That would do it.

Also as this game uses a regular Apple joystick, we are leaving the mouse behind for this one and you can code it using the arrow keys and (O) to fire a regular laser shot or (X) to fire a ball torpedo. The difference between the two the laser must be precise and counts as one energy while the torpedo doesn't need to be so precise yet counts two energy.

It is also possible for the enemy Empire ships to escape if you don't shoot them in time.

So good luck Squadron Leader ! The Resistance is counting on you !

2


Alright!! This sounds really nice, I will check what I can come up with, just hope I wont be too late ;)
Yet I got some few questions left
In the video ( which surprisingly I can only see on my Android phone - here on safari it doesn't show up at all) none of the spaceship escape,
so do they get smaller before they disappear?
I guess the laser is pixel perfect, saying it only hits if the exact one pixel somebody focuses is part of the spaceship. Shall the torpedos have a 3x3 hitbox instead?
What is the size of the map? Are there any bounds or could it as well be a map of the size of the screen, which actually wouldn't move at all but instead the spaceship swim around somewhere in the middle. What I want to say, shall the spaceships escape to the sides of the screen and then I could turn towards them again bringing them back to the screen? Can they also spawn off screen and come flying through? In the video all spawn on screen and are just vanishing on hits :D

ok nevermind about the video link, it showed up once I closed another youtube tab


Morning, @Yesyoor. Just now getting around to this.

[8x8]

A hit box of a single pixel is definitely too small, even for Pico-8. I would use the one to the right and make it 5x5 for the laser and maybe 9x9 for the torpedoes.

Experimentation is the key.

As for the map size, you would probably want to use 16x16 which covers the screen completely. Here, I'll draw a fancy box to show you.

Cart #duhozayoda-0 | 2020-01-13 | Code ▽ | Embed ▽ | No License

Look at the source-code for this cart. You can see there is not much to it. This is what I mean by using MAP() to draw a screen of your design.

To the best of my knowledge the tie-fighters do not change in scale or size, it's just if you don't hit them after some time, say 10-seconds, then they go away and you are penalized.

After you hit one a new one is chosen about 50% off the edge of the screen.

Watch the video especially to see enemy behavior.

HOPE THIS HELPS !


1

hey thanks a lot for the details and your effort! I think I used this technique in my snow simulation already with a mixture of pset() palt() spr() and loads of parameters :D

I am on this mission:

Here I tried out the pixel perfect shooting, checking for pget(63,63), if it is not black the ship explodes.
It's actually too easy, I will try out checking if it is white, this would reduce the hitbox to the core of the ship

edit: Oh now I understood how you meant it :D no with pixel perfect I meant every pixel of the ship is fine
But now reducing my idea to the white pixels is actually quite close to what you suggested ;)


OMY, @Yesyoor.

That is a vision of loveliness you have there ! Heck you even dithered it the way the Apple has difficulty drawing a white image on a color screen. PROPS TO YOU !

I think you're the first person ever in Pico-8 who has done this.

Sterling work ! Can't wait to see your final product.


1

Oh thanks a lot for the kind feedback! I honestly had to look up what dithered means .
It is funny that you talk about that since I was wondering why they had those lines and patterns for their borders.
I copied them, beeing curious about those pixels and trying to understand what they did.
It was hard to count the pixel of their spaceships though, because of the effect you mentioned.
I think I am only missing the torpedos and sounds now. Can I post it anytime this week or should I wait for sunday?


1

Post it whenever you are comfortable. That goes for anyone. If you have an Applecart (even past due or you just wanna take a crack at a previous challenge) :) That's fine, post it, I will find it, and include it in the Sunday review. Definitely.

Looks like you've mastered this one in record time though, @Yesyoor. Even down to the zappity zap when you hit it. Very nicely done !

A few things to consider as you breezed right through this.

  1. The game has levels of play, not just Trainee.
  2. Did you do the Star Wars music intro ?
  3. Have you considered adding the text story ?
  4. Does the game change your pilot status based on your shooting ability and also make the game harder for the next round ?
  5. Have you added the torpedoes ?

The torpedoes while not seen in the video I remember the original. They were just little balls that shot from the same place as the laser and rapidly collided in the middle making a kind of bee-yup sound, low to high. They cost 2 ammo but almost always zapped the tie-fighters as the target did not need to be so close to the center with them.


As this is the Applecart thread, this is probably the best place to mention this and the fact you have so closely matched the limitations of the graphics - it's definitely worth going over.

Apple graphics were a curious thing. When you used HIRES graphics you had a display of 280 pixels across by 192-pixels down. The only way to get true WHITE to appear on a color television or color monitor was to have two pixels touching each other. To get color based upon whether or not the pixel was even or odd with black between, it could be any of 2-colors.

Now the game-changer was you could shift 7-pixels by a half-pixel to the right by lighting the 8th pixel. Then you got white again but this time two more colors.
To get a color line you would plot a horizontal line that alternated between black and white pixels.

The colors of the Apple HIRES could be: black, white, green purple, orange, cyan (light blue).

The actual hardware of the Apple ][ graphic display screen is covered in complete depth HERE. (Good reading at that !)

As for your project, Good luck and good coding !


1

Oh wow! Thanks for the detailed information about the Apple HIRES Graphics!
It is nice to go back in time and see how things were done on ancient computers !

To come back to your points:

  • I included 5 higher ranks one can be promoted to.
  • I left out the story scene as well as the intro music, I gave the music a try but I am really bad at composing :D
  • The game is getting slightly harder with each rank
  • I added the torpedos, if you aim precisely the torpedos will hunt down the enemy.
  • It is possible to turn away from the enemy and leave him out of sight, missing torpedos will also shift according to your flight direction

I have uploaded it with this ID: #starwars_apple2_challenge-0
it can be loaded using

load #starwars_apple2_challenge-0

@dw817 thanks for this hint ;)

Press any key to skip the splash screen

btw, I really rushed through this so don't judge the code style :D it is quite a mess


Morning, @Yesyoor. I remember the torpedoes looked and acted like this with this speed:

Cart #bahagudufe-0 | 2020-01-16 | Code ▽ | Embed ▽ | No License

They did not track the target. Just flew out about that speed. The sound I put there is pretty close too.

Will try out what you've done here.

... Quite nice ! I see you have a list of interesting ranks there too. A surprise rank for the very best player. :)

Will definitely add you to the list this Sunday, ah ! Only a few days away now. I need to figure out what the NEXT challenge will be.


@dw817 nice nice! Just checked your code, the sprite and the sound! It really like it how simple and compact you archive such things, as seen before in your magic fireball!
I am still having some hard time understanding the flip() repeat forever thing you often use, very cool!

I thought since the torpedoes can't be as fast as lasers, which travel at the speed of light and hit the target immediately, there must be some kind of delay, so I went for the tracking idea. The hit-box is actually a little "+" in the middle of the screen, made out of 5 pixels where I check if the focused target is in this area.

Thanks for adding my cart! I am really glad to have stumbled across this challenge and very happy that you started this!
I think for your solution I would do this check once the torpedoes hit the center of the screen, which is also a nice idea since the player could/needs to correct his aiming while the torpedoes are flying.

Haha yeah and about the ranks, I am not so much the content guy, that's why I often leave out sounds or multiple levels and only worry about the mechanics themselves. I hope the fleeing enemy ships and the aiming is close to the original. I really would like to play it now :D:D


1

Hi @Yesyoor.

It's pretty simple. Here, try this:

c=0
cls()
repeat
for i=c%4,127,5 do
  line(i,0,127,i,c+1)
  line(0,i,i,127)
  flip()
end
c=(c+1)%15
until forever

Let's take a look at this code now.

1st we create a variable C set it to zero, clear the screen, and start a REPEAT loop.

In here we draw a nice iris-vector where c%4 returns a number from 0 to 3 based on the value of C and you can see the plotting color for the first line is always +1 (so it doesn't plot black).

The line after it does not need a color as we have already set one in the LINE before it.

The FLIP() command gives a slight delay to the system. If you want slower you can add _set_fps(n) at the top where N can be 15 or any number up to 60.

C=(C+1)%15 means C will contain a value modulos from 0-14 every time. As we are plotting the first line with this value +1 it means the colors will always be in the range from 1 to 15.

until forever is really my signature as variable "forever" does not even exist. This statement will always be false. You can use any variable name besides "forever" provided it has never been initialized in the code. It's a throwback for me from Blitz as FOREVER in there is a valid command for an infinite loop.

And there you have it !


Holy moly! Haha instantly started to smile when I ran it! And then just watched eyes wide open as the lines change color and their grid!
Crazy pattern!
Crazy Code! Thank you for this example!

haha I really thought forever is a keyword, must have missed that its color is grey ;D

I'll add you on discord now, finally got it up again ;)


1

I originally saw that line method done on an Apple ][ game years ago, called ZENITH I believe. At the time it was machine-language but looking at it carefully I saw how it was constructed and today - it's a pretty simple thing to draw. :)

Good to have you on the team. Can't wait to see what kind of code and ability you'll offer for Sorcery now.


Yes I am so happy to be on the team! Thanks for inviting me!

I played around with your code :D

c=0
cls()
spr(1,40,96,4,4)
repeat
for i=c%4,107,5 do
 line(63,99,64-i,0,c+1)
 line(63,99,64+i,0,c+1)
 flip()
end
for i=c%4,207,5 do
 line(63-i,99-i,63+i,99-i)
 flip()
end
c=(c+1)%15
until forever

Indeed, Sorcery is afoot.


Once again, I didn't get my submission done in time! But I'll post what I have as WIP.


No problem, @Nosnibor28. If you're late it certainly won't count against you. In fact you or anyone else is welcome to do any carts previous as well. I will definitely include them in the weekly listings and reviews if you like. :)



[Please log in to post a comment]