The Daily Click ::. Forums ::. Klik Coding Help ::. I need help again!
 

Post Reply  Post Oekaki 
 

Posted By Message

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
28th March, 2005 at 21:13:21 -

I still need a bomberman explosion engine in open source for TGF that works... I checked 1 out by Liquixcat, but it said: This is not a .GAM file even though it showed up as 1. If anyone has 1 please let me know.

THX.

 
Image
http://www.kevinhaag.ca

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
28th March, 2005 at 22:23:12 -

wtf mayte. WTF!

 
n/a

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
28th March, 2005 at 23:03:59 -

huh???

 
Image
http://www.kevinhaag.ca

clwe



Registered
  17/12/2002
Points
  702
29th March, 2005 at 06:26:39 -

Again, this is where I would recommend the fastloop - it makes some things so much easier. To begin with, you'll (obviously) need animations for the flame effects. You can be cheap here and just use one explosion effect, (that will be repeated for however many spaces). You will also need to lay out a bomberman-like play area, comprised of blocks (make them obstacles) of a certain size...for example, 32 by 32 pixels each. Be sure to lay them out correctly - using the 'snap to' grid helps here.

The actual 'code' would go something like this:


Upon pressing fire 1
• Create bomb object at 0,0 from player

If the number of bombs in play area is greater than 0
• Add 1 to alterable value A of bomb object (the bomb timer)

If value A of bomb object is greater than 150 (that's three seconds - every 50 is a second)
• create explosion object at 0,0 from bomb
• Position 'up explosion sensor' at 0,-32 from bomb
• Position 'down explosion sensor' at 0,32 from bomb
• Position 'left explosion sensor' at -32,0 from bomb
• Position 'right explosion sensor' at 32,0 from bomb
• Start loop 1 for 'bomb length' number of loops


Loop trigger 1
'up explosion sensor' is not overlapping an obstacle background
• create explosion at 0,0 from 'up explosion sensor'
• set y 'up explosion sensor' to y - 32

Loop trigger 1
'down explosion sensor' is not overlapping an obstacle background
• create explosion at 0,0 from 'down explosion sensor'
• set y 'down explosion sensor' to y + 32

Loop trigger 1
'left explosion sensor' is not overlapping an obstacle background
• create explosion at 0,0 from 'left explosion sensor'
• set x 'left explosion sensor' to x - 32

Loop trigger 1
'right explosion sensor' is not overlapping an obstacle background
• create explosion at 0,0 from 'right explosion sensor'
• set x 'right explosion sensor' to x + 32


If value A of bomb object is greater than 150 (that's three seconds - every 50 is a second)
• destroy bomb object


It might look a lot, but that's only about 7 events. The 'bomb length' is the name for a counter that determines...well, the bomb length. Set it to 3, and the explosions will travel three spaces from the bomb. Simple enough. The 'explosion sensor' objects that I've mentioned would be active objects. Just create four actives - up/down/left/right explosion sensor - which are a few pixels in size (very small), then make them invisible. These are used as 'sensors' to tell when the bomb blast should not travel any further in a direction.

 
n/a

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
29th March, 2005 at 12:56:59 -

Could you send me an open source example in .GAM format?

 
Image
http://www.kevinhaag.ca
   

Post Reply



 



Advertisement

Worth A Click