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: Distortion in Game Maker?  (Read 3948 times)

0 Members and 1 Guest are viewing this topic.

Koh

Distortion in Game Maker?
« on: February 19, 2009, 02:51:48 am »
  • Tamer Koh
  • *
  • Reputation: +6/-0
  • Offline Offline
  • Gender: Male
  • Posts: 980
I know it's possible, but how in the world does one go about doing it?  I thought it was easy to find out, but...
Logged
  • Megaclipse Games
Re: Distortion in Game Maker?
« Reply #1 on: February 19, 2009, 02:53:44 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6206
Could you explain yourself a little bit more? Because distortion has several meanings.
Logged

Mamoruanime

@Mamoruanime
Re: Distortion in Game Maker?
« Reply #2 on: February 19, 2009, 03:45:19 am »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
o.o are you referring to things like shaders?
Logged
Re: Distortion in Game Maker?
« Reply #3 on: February 19, 2009, 05:26:04 am »
  • Fear my Blades
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 562
I completely recoded the system in Zelda: Just Beginning four times before I got it working well, and fast enough that It could actually be used.

The main thing is not to try to manipulate it at a pixel level, Game Maker is too slow for that.  Use a grid instead.
Logged

I've done it (sorta)!  Bloom Lighting in GameMaker, and 3D mode too!  Check out the awesome Screen Saver.
  • Kousou Games

Koh

Re: Distortion in Game Maker?
« Reply #4 on: February 19, 2009, 10:28:26 am »
  • Tamer Koh
  • *
  • Reputation: +6/-0
  • Offline Offline
  • Gender: Male
  • Posts: 980
Oh, sorry, I meant Distortion in a general way to do many things such as the wavy effect from OoA and many of the portal transitions.

Atrius, are you referring to DS Grids?  I never knew their purpose <=O.
Logged
  • Megaclipse Games
Re: Distortion in Game Maker?
« Reply #5 on: February 19, 2009, 01:34:29 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1141
I tried once (at pixel level) effects like refraction using C++, and when I tried to translate it to GM I had a 60 times lower FPS <_< (I'm serious, I did measure the time difference)

It seems it's not practical editing pixel by pixel in GM, but I don't know how it could be done using grids.

EDIT: In pixel level I'd use something like this:
Code: [Select]
//START ANIMATION EVENT:
t=0;

//STEP EVENT:
var xx,yy,newy,pix[640,480];
for(xx=0;xx<640;xx+=1)
  for(yy=0;yy<480;yy+=1)
  {
    newy=floor(yy+25*sin((yy+t)/25));
    if(newy>=0&&newy<480)
      pix[xx,yy]=pixel_get_color(xx,newy);//I'm not sure of the name of this function though
    else
      pix[xx,yy]=pixel_get_color(xx,yy);
  }
for(xx=0;xx<640;xx+=1)
  for(yy=0;yy<480;yy+=1)
    pixel_set_color(xx,yy,pix[xx,yy]);//I'm not sure of the name of this function either
t+=1;
« Last Edit: February 19, 2009, 07:58:55 pm by sjegtp »
Logged
Re: Distortion in Game Maker?
« Reply #6 on: February 19, 2009, 02:22:33 pm »
  • Fear my Blades
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 562
Oh, well the Zelda games do that by repositioning the view during the screens H-Blank periods, so you can achieve a similar effect by drawing the screen to a surface, and drawing each row of pixels individually moving them by a certain amount.
Logged

I've done it (sorta)!  Bloom Lighting in GameMaker, and 3D mode too!  Check out the awesome Screen Saver.
  • Kousou Games
Re: Distortion in Game Maker?
« Reply #7 on: February 20, 2009, 08:42:55 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2245
I did this once with game maker 5 by creating a background from the screen for each line then use a sin to offset their x value when drawing them.
Logged

Koh

Re: Distortion in Game Maker?
« Reply #8 on: February 22, 2009, 10:43:21 am »
  • Tamer Koh
  • *
  • Reputation: +6/-0
  • Offline Offline
  • Gender: Male
  • Posts: 980
Sow how does the DS stuff work, anyhow?  (BTW, I appreciate the way you guys are taking time to help me =))
Logged
  • Megaclipse Games
Pages: [1]   Go Up

 


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



Page created in 0.068 seconds with 53 queries.