Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

The Ultimate Script Request

Status
Not open for further replies.
Hmmm, you can drop the "Game Over" with "Show Picture" (off screen), Move Picture (to center), and Play SE (thump)
and then maybe shake the screen a little with the 'thump'

Then use a transition something like this..

http://img132.imageshack.us/img132/5785/shatterxo1.png[/img]

To 'Crack' the screen

If you are transitioning to a blank map, it will be black.

The music 'fizzling out', I'm stumped on how to do it even with a script. It's probably possible to find another Ruby Audio library that has more control, and integrate it into the game. But I'm just not that ambitious. :scruff:

The best I can recommend is to either create a sound effect that sounds similar to the music playing, but 'fizzles out', or
start a new BGM with the Game Over that has the 'fizzle' effect in it, and adjust the timing of the event to match.

Then, instead of going to the built-in Game Over, just go back to the Title Screen (Return to Title Screen).

I don't think we could do a whole lot better with a script.
 
That reminds me, how do you change the Game Over thing? Oh, and if anyone knows a program out there that can do this effect let me know, and/or tell me how to do it. Unless it can be done with the audio program I use, Audacity.

I forgot to ask...is it possible to distort the image when the cracked screen pops up? It's ok if it can't be done, but it would be nice to have that in there, lol.
 
If you mean, how do I go straight to the title screen instead of Game Over,
then you just use the "Return to Title Screen" event command.
You have to set your "Battle Processing" to "Continue even when loser" (check the box)

I love Audacity, and yes it can be done. What you do is figure out how much of the end of the file you want to 'drag out', then divide that by about 10 pieces.
So if your file is 5 seconds long, and you want to fizzle from 4.0 - 5.0...
select 4.9 - 5.0, use the "Change Speed" effect, and set it to -99%
then select 4.8 - 4.9, and change the speed by -90%
then 4.7 - 4.8, change to -80%
repeat that pattern, until you get to 4.0 - 4.1, which you'll change by -10%

you start at the end, because each section will 'grow' longer when you add the effect.

Then you can apply a "Fade Out" effect on the whole section 4.0 - ~6.0
so it both "slows down", and "fades out"


As far as the "Fly off the screen" effect goes. I've worked out an algorithm to do it.
converting that algorithm to RGSS will be no pretty task. So it may be a while. (weeks - months)
Just so you appreciate why, it consists of breaking the image up into triangles using sets of 3 points.  Since you can't chop out a triangle, you have to grab a rectangle that is the 2D envelope of that triangle, and then erase (pixel by pixel) every pixel that is not inside of the triangle.
repeat for every defined triangle, then display them all back on top of the current image.
erase the current image underneath the triangles. Shrink each triangle slightly to show the crack.
then one by one, move the triangles off of the screen.

So, to answer your last question. Yes, you can distort the pieces once you have them broken up.

I'll plug away at it if you have time to wait.

Be Well
 
So for fizzling them out I have to do that for every battle music right? And save the file and import it as a ME? lol, I'm not that advance in this thing yet, getting there though. About the Game Over thing, I mean is there a way to make it do something else besides showing the Game Over pic.

Oh, and I added another thing that I remembered. Thanks for helping me out, and I don't mind waiting for those things, not that important.
 
*bump*

I just remembered something, no clue if this requires scripting or what. In-game, how is it possible to have events on top of events? Like having some monster moving on a conveyor belt or something....
 
Sorry Bell, I just haven't had time to work on it. If someone else wants to take a stab at it, here's the algorith....  m

Code:
#-------------------------------------------------------------------
#  Create an array of triangles (A, B, C), 
#  where each corner is a point (x, y)
#  in the order you want them to fly off

#-------------------------------------------------------------------
# Save the current map to a bitmap

# For each triangle
#-------------------------------------------------------------------
# determine the bounding rectangle of the triangle ABC
# and copy that rectangle to a new bitmap (sprite)

x = [Ax, Bx, Cx].min
y = [Ay, By, Cy].min
xm = [Ax, Bx, Cx].max
ym = [Ay, By, Cy].max
width = xm - x
height = ym - y
src_rect = Rect.new(x, y, width, height)
new_bitmap = blt(0, 0, src_bitmap, src_rect)

#-------------------------------------------------------------------
# Trim each bitmap to the triangle
# Determine if point D is inside or outside triangle made by ABC

angle DA = arctan((Ay - Dy) / (Ax - Dx))
angle DB = arctan((By - Dy) / (Bx - Dx))
angle ADB = angle DA - angle DB
angle ADB = ADB < 180 ? ADB : 360 - ADB

angle DA = arctan((Ay - Dy) / (Ax - Dx))
angle DC = arctan((Cy - Dy) / (Cx - Dx))
angle ADC = angle DA - angle DC
angle ADC = ADC < 180 ? ADC : 360 - ADC

angle DC = arctan((Cy - Dy) / (Cx - Dx))
angle DB = arctan((By - Dy) / (Bx - Dx))
angle BDC = angle DC - angle DB
angle BDC = BDC < 180 ? BDC : 360 - BDC

if angle ADB + ADC + BDC < 360, the point is outside. Erase it.
#-------------------------------------------------------------------
# now place each bitmap into a sprite, and position it on the screen

#-------------------------------------------------------------------
# erase the background image (transfer to the battle screen)

#-------------------------------------------------------------------
# Now make the sprites fly off the screen
frame = 0
for i in 0..<# of triangles * speed * delay>  ???
  for j in triangles (or bitmaps)
    if j < frame / delay
      triangle.x -= speed
    end
  end
end

Be Well
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top