Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Explosions  (Read 2619 times)

0 Members and 1 Guest are viewing this topic.

King Tetiro

Leader of Phoenix Heart
Explosions
« on: February 20, 2011, 09:39:20 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Howdy folks, Tetiro's got a little problem. Explosions

Not the triggering though. This time it's down to the graphics. Now I know you're thinking why isn't this in the graphics. Im more working on the theory of it. Little bit of explanation.

The player will chuck a gunpowder bomb and once it hits the floor, BOOM! So it's a grenade of sorts.
Can someone explain in theory how the gunpowder bomb would look like and work in a game?

I did think about multiple fireballs of different sizes to create a random explosion. I dunno though
« Last Edit: February 20, 2011, 09:43:36 pm by King Tetiro »
Logged
  • Phoenix Heart
Re: Explosions
« Reply #1 on: February 21, 2011, 05:43:59 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
It all depends on what language you are programming in. GML, C++, C# or Java. Because it makes a lot of difference.
Logged

King Tetiro

Leader of Phoenix Heart
Re: Explosions
« Reply #2 on: February 21, 2011, 07:51:59 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Its still the good old GM for me. Im good with C++ now, just not that good (Few hurdles here and there to jump over)
Logged
  • Phoenix Heart

Mamoruanime

@Mamoruanime
Re: Explosions
« Reply #3 on: February 21, 2011, 08:02:14 am »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
It all depends on what language you are programming in. GML, C++, C# or Java. Because it makes a lot of difference.

I don't know how it would make a difference, since this sounds more like a graphical hurdle.

I say just go the Zelda route and have a shadow representing the object's true x/y coordinates. Have an additional "z" variable that will change the position of the grenade on the Y axis. When it's thrown, throw in some simple physics for Z and trigger the explosion when Z reaches 0.
Logged

King Tetiro

Leader of Phoenix Heart
Re: Explosions
« Reply #4 on: February 21, 2011, 09:40:06 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Im more focusing on the explosion part of it. Like FOR EXAMPLE in Windwaker that rather than it being a proper explosion is a ton of those swirl like graphics.
Logged
  • Phoenix Heart

Mamoruanime

@Mamoruanime
Re: Explosions
« Reply #5 on: February 21, 2011, 09:45:54 am »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
>_o just make a particle emitter... aka spawn a bunch of objects who's only purpose is to "draw something and disappear"...
Logged

King Tetiro

Leader of Phoenix Heart
Re: Explosions
« Reply #6 on: February 21, 2011, 11:31:07 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Ok then better question. What does an explosion consist of?
Logged
  • Phoenix Heart

Mamoruanime

@Mamoruanime
Re: Explosions
« Reply #7 on: February 21, 2011, 12:55:45 pm »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
Ok then better question. What does an explosion consist of?

Not really a better question :s Explosion consists of particles... Your bomb/grenade/whatever goes off, it creates a bunch of particles...
Logged

King Tetiro

Leader of Phoenix Heart
Re: Explosions
« Reply #8 on: February 21, 2011, 01:53:45 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Ok then better question. What does an explosion consist of?

Not really a better question :s Explosion consists of particles... Your bomb/grenade/whatever goes off, it creates a bunch of particles...

Yup i know that. How would the particles move? Remain still or move in a random direction
Logged
  • Phoenix Heart

Mamoruanime

@Mamoruanime
Re: Explosions
« Reply #9 on: February 21, 2011, 01:56:46 pm »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
Neither... They would push out and gradually slow down... Just study Minish Cap and tWW explosions
Logged
Re: Explosions
« Reply #10 on: February 21, 2011, 06:59:29 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
It all depends on what language you are programming in. GML, C++, C# or Java. Because it makes a lot of difference.
I don't know how it would make a difference, since this sounds more like a graphical hurdle.
Actually it does matter. For C++, C# and Java, I would also say create a particle emitter. However in this case for GML I have to differ. GameMaker Pro has some particle system effects that you can use, but these are Pro only. For Lite I suggest you just make a big sprite containing the explosion and have a single object draw it.

If you are going to make an object for every little particle, you can get a dozen objects at once, which Game Maker treats as regular objects, like the player, MC, NPC and obstacles. And when you get a barrage of explosions that the number of objects can increase rapidly, even if their life time is limited. This increase in objects can seriously lag your game. Okay any particle emitter already puts a strain on the game anyway, but creating objects is even worse.

But then again you could create only one object and then draw the various particles at their right places for each frame. This requires some serious calculations or a very big switch statement.
Logged

Mamoruanime

@Mamoruanime
Re: Explosions
« Reply #11 on: February 21, 2011, 11:29:31 pm »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
It all depends on what language you are programming in. GML, C++, C# or Java. Because it makes a lot of difference.
I don't know how it would make a difference, since this sounds more like a graphical hurdle.
Actually it does matter. For C++, C# and Java, I would also say create a particle emitter. However in this case for GML I have to differ. GameMaker Pro has some particle system effects that you can use, but these are Pro only. For Lite I suggest you just make a big sprite containing the explosion and have a single object draw it.

If you are going to make an object for every little particle, you can get a dozen objects at once, which Game Maker treats as regular objects, like the player, MC, NPC and obstacles. And when you get a barrage of explosions that the number of objects can increase rapidly, even if their life time is limited. This increase in objects can seriously lag your game. Okay any particle emitter already puts a strain on the game anyway, but creating objects is even worse.

But then again you could create only one object and then draw the various particles at their right places for each frame. This requires some serious calculations or a very big switch statement.

Why do you have to create a lot of objects???... Really it's not that tough to simulate the explosion in one single object :\... It's a workaround; but people don't really think centrally when it comes to GM. You make 1 object with a few arrays for particle simulation (position/life/etc). In the step event, you modify those values and lower the life for each. In the draw event, you draw each part to the emitter with a for loop. The thing is particles don't really serve any purpose outside of  being "visual flare". They don't need to have their own unique entity because they're just so simple in structure. Just a controller object (read: emitter). *shrugs* I mean I've made a damn near full engine using only 2 objects in GM. I don't know why people are so quick to add a new one for everything.
Logged

DJvenom

super-sage
Re: Explosions
« Reply #12 on: February 22, 2011, 03:50:06 am »
  • Colbydude was here.
  • *
  • Reputation: +7/-0
  • Offline Offline
  • Gender: Female
  • Posts: 2898
<<
Logged
I do art
I ermmm... DID do art
I do art
Re: Explosions
« Reply #13 on: February 22, 2011, 03:52:29 am »
  • *
  • Reputation: +12/-2
  • Offline Offline
  • Gender: Male
  • Posts: 4849
<<

Go away, Jordan.  You ruin everything D:
Why you always got to /thread like this?

Logged
  • Super Fan Gamers!

DJvenom

super-sage
Re: Explosions
« Reply #14 on: February 22, 2011, 03:58:10 am »
  • Colbydude was here.
  • *
  • Reputation: +7/-0
  • Offline Offline
  • Gender: Female
  • Posts: 2898
He asked what explosions should look like.
Logged
I do art
I ermmm... DID do art
I do art
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.054 seconds with 68 queries.