mybestanna.blogg.se

Gamemaker studio 2 surfaces
Gamemaker studio 2 surfaces













gamemaker studio 2 surfaces

I will implement a similar version for vertical tearings (for underwater levels? maybe?). Tearings_y = (tearings_y + tearing_speed) % (band_height * band_num)Īnd this is how I make that effect. We draw parts of our application surface on tearings surfaceįor (var current_band = 0 current_band < band_num * 2 current_band++)ĭraw_surface_part(application_surface, 0, band_height * current_band - tearings_y, dw, band_height, sin( (degtorad(360) / band_num ) * current_band) * tearings_x_offset, band_height * current_band - tearings_y)ĭraw_surface_stretched(tearings_surface, -tearings_x_offset, 0, dw + tearings_x_offset * 2, dh)

gamemaker studio 2 surfaces

Tearings_surface = surface_create(display_get_width(), display_get_height()) This video tutorial shows you how you can make a light system in gamemaker studio 2.

Gamemaker studio 2 surfaces code#

I place the following code inside a draw_post event of my controller. 15K views 3 years ago Game maker studio - Advanced. Tearing_speed = 4 // Change this to speed up/slow down the tearings Tearings_x_offset = 32 // How much you want to displace the bands horizontally Tearings_surface = surface_create(dw, dh) // We'll draw on this surfaceīand_num = 16 // How many bands you want on screen This goes into the create event of your game controller object. I wrote the code so it could be easily hackable. I jotted down some code and immediately hit a wall after asking around in the yoyogames forums, reading other’s comments, I could finally come up with a pretty decent solution.

gamemaker studio 2 surfaces

Knowing nothing about shaders, I was left with surfaces. I didn’t know how he achieved it so I had to start from scratch and think about different approaches. After playing Environmental Station Alpha, I decided I wanted to implement the screen tearing effect Hempuli is using in his game.















Gamemaker studio 2 surfaces