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.

Image Cutting

This one might be kinda tricky o_O
I need a method of some kind that will let me set the bounding box on images manually O.o I want to be able to specify each point individually...
Am trying to explain it clearly x_x
I want to be able to say... take this image:
http://img402.imageshack.us/img402/8104/linepic1xg1.th.png[/IMG]
And set the boundaries for it so I can make it show up in RMXP like this:
http://img443.imageshack.us/img443/7481/linepic2dm4.th.png[/IMG]
so I can make it look like the screen is being cut into pieces...
Have been messing around with rataime's destruction engine trying to make it work with bitmaps, but not having any luck x_x;
 

Jason

Awesome Bro

Couldn't you just make a picture and display it?

Make a 640x480 picture, colour it all black, and just erase an area in the middle which you will see your Game through, Like a window.
Don't know if this is any help, but meh.
 
To distort a picture like that effectively would require Open GL or Direct X.

Oh, you aren't actually distorting it? You could mess around with lots of fill_rect commands, or some sort of viewport manipulation, but jbrist has it right. Just make a black image and put it over the screen.
 
Well, this script I have modifies the battle transition.
It takes a picture of the screen, then cuts it into a bunch of smaller squares and launches them everywhere:
http://img89.imageshack.us/img89/6554/scatteryn0.png[/IMG]
which is why I can't use a set picture x.x
I want to modify it so it looks like it's being sliced into 4 random pieces using a couple of random variables, so I need either a way to set the viewpoint coordinates for each corner instead of by width/height, or a way to make a line through the picture and erase everything on one side of the line x_x Problem with fill_rect and viewports is theyre all rectangles, and use width/height x.x
 

Khala

Member

cool, if thats not random, then it will kinda stinks
i would say get a collection of scripts, make a random variable, and another main script that has this code
Code:
class initialize
if @variable = 1
     @picture1 = true
end
etc.
and inside every one of those scripts, prepend
if @variable = x
and append
end
or you can just do the second part
 
Nah, it's from the CA. No destruction engine in that one, it basically just puts the screenshot as a sprite a bunch of times then uses blt to cut it into squares. You can find the original version here: http://www.creationasylum.net/index.php?showtopic=16048

I did, however, fix my problem :D
Used the triangle method from the destruction engine to cut the angles, then the fill_rect method to clear away the leftovers. Couple of sword SEs, a white picture to use as a screen flash, and it looks perfect, and the flashes cover up the small amount of lag the triangle method creates :D
http://img470.imageshack.us/img470/3231/screenslicepq1.th.png[/IMG]
 

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