Log In  

Cart #22904 | 2016-06-15 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

It could be a little flashier, but the game is fully playable by itself at this point. Have fun playing an Atari classic.

Version 1.1:
Made asteroid collision much more exact
Added anti-aliasing (Thank you, Felice)
Made extra lives available after every 5k points instead of 10k
Made the extra lives indicator make more sense (Player has 3 extra lives plus their current one at start)

Version 1.0:
Added an invulnerability period after respawn

Version 0.9:
Added start and play again menu options
Added more sounds (game over and extra life)
Fixed controls working after death
Added scoring system that works to the tens of millions of points
Refactored some code

Version 0.5:
Added level spawning
Fixed randomizing of asteroid velocities
Added player death conditionals
Added respawning
Added a great deal more variation in velocities in general

Version 0.4:
Added randomly generated asteroids (yay!)
Added collision-based asteroid spawning
Added score increases
Added thruster and asteroid explosion sounds

Version 0.3:
Fixed the controls
Retooled how the velocity works (saved x,y velocity offsets)
Added (lame) asteroids
Added collisions
Added explosions!
Made explosions pretty

Version 0.1:
Initial preview posted

P#22426 2016-06-06 16:54 ( Edited 2016-06-15 16:41)

Post-Release Comments
:: Felice

OH, I LIKE IT. Well done.

Gets hairy in a hurry. The perils of a small screen.

One thing: Seems like collision detection is a bit over-zealous. It's nice when I'm shooting asteroids and getting hits I don't deserve, but not so nice when one hits me before it even gets to me.

P#22811 2016-06-13 00:35 ( Edited 2016-06-13 04:35)
:: Felice

I had to play around with something. :) Here, try adding this to the start of your program. It's probably not a look you're going for, given the platform, but it's an interesting variation...

 brighter = { 1,5,14,11,9,13,7,7,14,10,7,7,7,6,15,7 }
 function line(x1,y1,x2,y2,c)
  dx=x2-x1
  dy=y2-y1
  len=sqrt(dx*dx+dy*dy)
  if(len!=0) then
   for f=0,len,0.3 do
    x=x1+dx*f/len+0.5
    y=y1+dy*f/len+0.5
    pset(x,y,brighter[pget(x,y)+1])
   end
  end
 end
P#22814 2016-06-13 01:59 ( Edited 2016-06-30 00:25)
:: Vlek

Felice, thanks for the input. The reason why the collision is like that is because it does circle collision based on a radius. Since I'm randomly generating asteroids, they may not extend outward in all directions as far as the collision considers them to. Without going through a tremendously over-rigorous collision detection process, this was the best of the possible solutions. I can shore it up a pixel or two, but that's probably going to be about it.

That line veneer is actually pretty awesome. I think it draws everything a little crisper. It just messes up the score. haha

P#22832 2016-06-13 10:43 ( Edited 2016-06-13 14:43)
:: matt

@Felice that anti-aliasing is very clever! way to go.

@Vlek the score print can be fixed by putting a color(7) at the start of print_score()

P#22844 2016-06-13 16:32 ( Edited 2016-06-13 20:32)

Any chance for an "Asteroids Deluxe (or II)" where we can get saucers? :)

P#22925 2016-06-15 12:41 ( Edited 2016-06-15 16:41)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-06-06 11:14 | 0.026s | 2097k | Q:34