Scrolling Game Development Kit Forum

SGDK Version 1 => General Discussion => Topic started by: billybob884 on 2005-12-17, 11:43:56 AM

Title: boss question
Post by: billybob884 on 2005-12-17, 11:43:56 AM
I
Title: Re: boss question
Post by: durnurd on 2005-12-17, 01:27:35 PM
Well, if it's something to make parts of the bridge fall, my first idea would be something like one of the following:

That kinda what you're looking for?
Title: Re: boss question
Post by: billybob884 on 2005-12-17, 08:39:26 PM
i like the last idea a lot (the shockwave one), im just not sure how to implement it, maybe it could create an "invisible" tiny sprite in the center of the crater, and the boss jumps up and coincidently lands on it when he causes the shockwave, then when he hits it, it creates a very long "invisible" sprite across the ground, and if you are on the ground (touching it), you recieve damage. ill have to test that idea a bit later, but thats great.

--edit--
oh, and 1 more question, would there be a way to make the screen shake slightly for like a sec or 2, like maybe have it activate similarly to the way the multiple hitpoint enemies do, where the script is activated by a function called up by the collision
Title: Re: boss question
Post by: durnurd on 2005-12-18, 03:01:42 AM
As for the invisible sprite thing, you don't actually mean all of the pixels are invisible, right?  (Since then there's no collision detected)

Second, my idea for the shockwave would be to create three or four "rumble" sprites (which basically just look like movement lines) that move rather quickly outward (three or four in each direction).  They could be animated or whatnot, then if any of those touch you, you get hurt.  But your way works too.

As for the shaking the screen effect, I'm sure it could be done, but it's 3:00 AM and I currently have the mental capacity of a bag of hammers.  It would have something to do with an inventory item that is set to (framerate * no. of seconds of shake) when the boss hits the ground and a global special function that continuously subtracts one from it.  In the script, check if that inventory is more than zero.  If it is, offset the display a random amount in the x and y coordinates (possibly you could multiply this random amount by some divisor of the inventory so the shake is drastic at first, but decreases as it reaches the end) and display it.  That would probably work well.  Just check for the inventory in the Player_OnAfterMoveSprites() and use the drawMap function (I think that's what it's called).  I guess my mental capacity wasn't so far gone.
Title: Re: boss question
Post by: billybob884 on 2005-12-18, 12:08:40 PM
As for the invisible sprite thing, you don't actually mean all of the pixels are invisible, right?

heh nah, thats why i put it in quotes.

Second, my idea for the shockwave would be to create three or four "rumble" sprites (which basically just look like movement lines) that move rather quickly outward (three or four in each direction).
Title: Re: boss question
Post by: billybob884 on 2005-12-24, 08:33:11 PM
ok, ive got a little problem, ive got the random boss choice setup goin on, and ive got the 'selector' set to random points, but it will only make one choice... i'll post a zipped file later on tomorrow, right now ive still got a little bit of last minute wrapping to do (heh, procrastination is the story of my life)
Title: Re: boss question
Post by: bluemonkmn on 2005-12-25, 09:13:10 AM
You might want to double-check the documentation on "Follow Path Random Points" if you haven't lately.  The sprite will only go to a point that is at least as close as the distance between the first and second points in the path.  So you want to make sure that when you create the path, you make the second point plenty far away from the first point.  This rule allows you some limited ability to restrict which points the sprite can jump to.  For example, if you have a set of points that go around a corner, you probably don't want the sprite trying to head directly from the first point to the last point (it might get stuck on the corner).  So you just make sure that the last point is farther away from the first point than the second point is.
Title: Re: boss question
Post by: billybob884 on 2005-12-25, 03:45:28 PM
o




heh yea that might be a problem, ill take a look at that once i get home
Title: Re: boss question
Post by: billybob884 on 2005-12-25, 07:17:13 PM
yes! worked!
Title: Re: boss question
Post by: billybob884 on 2006-01-22, 05:25:24 PM
oh, and 1 more question, would there be a way to make the screen shake slightly for like a sec or 2,


ok, i realize that this probably should be posted in the scripting forum, but its here for referrence. remember when i asked about this, well would it be possible to have a slight vibration while on a map? nothing severe at all, just like a slight tremor. see, after you kill the final boss, you're going ot fall through a trap door or something, (basically, whatever way you get there) you have like a one minute "exciting final escape", like a self destruct-enduced thing. its like the boss's last effort to kill you, ya know?
Title: Re: boss question
Post by: durnurd on 2006-01-22, 09:34:14 PM
Yes.  ShakeDelta is the number of pixels it shakes every frame, ShakeMax is how far it shakes before it shakes in the other direction.

Code: [Select]
Dim ShakeDelta, ShakeMax, curShake

ShakeDelta = 3
ShakeMax = 12
curShake = 0

Sub Player_OnAfterMoveSprites()
   With ProjectObj.GamePlayer
      .MapScrollX = .MapScrollX + ShakeDelta
      .rMap.draw .MapScrollX, .MapScrollY
   End With
   curShake = curShake + ShakeDelta
   If abs(curShake) >= abs(ShakeMax) then
      ShakeDelta = ShakeDelta * -1
      ShakeMax = ShakeMax * -1
      curShake = 0
   End If
End Sub

HostObj.SinkObjectEvents ProjectObj.GamePlayer, "Player"
HostObj.ConnectEventsNow()
ProjectObj.GamePlayer.Play 16
Title: Re: boss question
Post by: billybob884 on 2006-01-22, 09:37:56 PM
ok, but i need to specify a map... so just like "6-2FinalEscape"

---edit---
works great by the way! just put it in (surprisingly i did it right,) and it shakes like a pro!
Title: Re: boss question
Post by: bluemonkmn on 2006-01-22, 09:48:11 PM
Then I think you put a line something like this before the line with the "With":
Code: [Select]
If ProjectObj.GamePlayer.rMap.Name="6-2FinalEscape" Then
And put another "End If" after the existing "End If".

I say "something like" because I didn't test that or even look anything up in the Scripting Reference, but it really should be something like that, and hopefully exactly that :).
Title: Re: boss question
Post by: billybob884 on 2006-01-22, 09:51:59 PM
lol hopefully..., because we all know my scripting abilities aren't beyond 'uh oh, doesnt work'.