Scrolling Game Development Kit Forum
SGDK Version 1 => General Discussion => Topic started by: billybob884 on 2005-12-17, 11:43:56 AM
-
I
-
Well, if it's something to make parts of the bridge fall, my first idea would be something like one of the following:
- The boss jumps around three or four times in random places. If you get caught underneath, major damage
- The boss jumps way up into the air and is off screen for a few seconds. Then you see its shadow, getting bigger, so you can get out of the way (but only for like half a second) and then one major whammy that kills you (or takes you down to one hitpoint maybe) if you are underneath it
- The boss gets onto the bridge and starts throwing pieces of the bridge at you, or shoots at you and in the process of him being on the old bridge, since it's old, it just falls apart
- Finally, the boss could smack the ground that sends a shockwave where you need to jump just before he hits the ground to avoid it (and coincidentally, the shockwave jostles the bridge)
That kinda what you're looking for?
-
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
-
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.
-
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).
-
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)
-
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.
-
o
heh yea that might be a problem, ill take a look at that once i get home
-
yes! worked!
-
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?
-
Yes. ShakeDelta is the number of pixels it shakes every frame, ShakeMax is how far it shakes before it shakes in the other direction.
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
-
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!
-
Then I think you put a line something like this before the line with the "With":
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 :).
-
lol hopefully..., because we all know my scripting abilities aren't beyond 'uh oh, doesnt work'.