The Daily Click ::. Forums ::. Non-Klik Coding Help ::. Asteroid Game & Meteor explosion simulation
 

Post Reply  Post Oekaki 
 

Posted By Message

Kokocipher



Registered
  03/06/2008
Points
  439
8th June, 2008 at 23:32:07 -

How does the classic Asteroid arcade make larger meteors explode into smaller pieces? I tried with having the large piece shooting 2 smaller ones, but it wasn't good enough. I also tried with Particle Spray, but it "sprayed" small rocks instead of "shooting" them out with a finite numbers.

 
http://blog.kokoarcade.com

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
8th June, 2008 at 23:42:19 -

Use the "Create Object" function in the event editor with a smaller active object version of your large meteors; for example:

+When Bullet Collides with "Asteroid"
=Create "Small Asteroid" as (0,0) from "Asteroid"
=Create "Small Asteroid" as (0,0) from "Asteroid"
=Create "Small Asteroid" as (0,0) from "Asteroid"
=Destroy "Asteroid"

Make sure to put the Create Object events before the Destroy event, or else it will create them in nasty places instead of at the big asteroid.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Kokocipher



Registered
  03/06/2008
Points
  439
9th June, 2008 at 16:25:11 -

that works, but how would you get the small pieces to move as if it was being blasted away?

Are there any good examples?

Image Edited by the Author.

 
http://blog.kokoarcade.com

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
9th June, 2008 at 17:34:00 -

give the "Small Asteroid" ball movement type, and either simply leave it to choose a random direction when they are spawned, or in the line where you create them, underneath the "Create Small Asteroid" event, put a "Set Small Asteroid Direction to (Direction of Bullet + random(4) - random(4))"

This will make them blow away in the direction the bullet hit them

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
9th June, 2008 at 20:38:33 -

Brings back memories of my first actually playable game... *sigh*

 

  		
  		

Kokocipher



Registered
  03/06/2008
Points
  439
10th June, 2008 at 17:28:57 -

Now everything is fine, but when I wanted to have the asteroids bounce off of each other, they tend to "stick" when overlapping. Is there a way to avoid such glitch?

 
http://blog.kokoarcade.com

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
10th June, 2008 at 20:52:50 -

If you're using a built-in ball movement type, make sure that your event is:

+Collision between "Asteroid" & "Asteroid"

=Bounce "Asteroid"


instead of

+"Asteroid" is overlapping "Asteroid"

=Bounce "Asteroid"


and on the event that spawns the smaller asteroids, position them apart so they aren't overlapping each other the second they are created.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
   

Post Reply



 



Advertisement

Worth A Click