Game
Untitled Knight Project
8 years ago

Ghost Environments - GameMaker Surfaces


I had been trying to figure out a way to hide certain parts of the environment from the player and only reveal it when he gets close, like so:

5d0b1660ceb2f.gif

This all ties into the players ghost form, but so far, not sure how I am going to implement it as a main mechanic. So bear with me…

I had never used surfaces before in GameMaker, even after using it for a couple of years. I should have learnt about it much sooner, but I didn’t. So I started searching and came across this link:

http://www.davetech.co.uk/gamemakermasking

Now, this was pretty much what I wanted to achieve. The only problem I had was it only works by placing an image on top of another image or background.

So in my GIF, this is pretty much the same implementation, except I’m not using any fancy shapes or using the mouse. I am also not drawing the surface across the whole room and only on the section I want to be hidden.

My only problem I have now, is this will only work on this kind of level setup and not anywhere else. Reason being, I basically drew a rectangle over the tiles that was the same colour as the background.

What I want to achieve is going to be more complex. I need to figure out a way to store a portion of that background and put it on a layer infront of the tiles I want to hide without covering anything else.



2 comments

Loading...

Next up

Just as Pecaminosa's musicians #improvise this rendition of #LittleSunflower 🌻, so do we improvise with this post you're reading. 😂

What's coming out of your own improvs? 🤔

#Pecaminosa | #IndieDev | #OST | #Jazz

We are under attack!

Path of Kami: The Evolution of the Lore

Sometimes the suction cup get sticky. Small animation I made in Blender after doing my tutorial on picking up/dropping objects in animations. Crate model by jQueary (https://sketchfab.com/3d-models/game-ready-sci-fi-crate-d98deca6…).

I-Buki

Mio-Da!

Ibuki Mioda!

My D&D art for my family so far (WIP if you couldn't tell)

brung back my old oc plus a new one

...they don`t have names yet tho

Auto-chess meets Clash Royale in an intense strategic battle. Outsmart your opponent, hide your play and crush their armies! Empire Builder just got another major update, check it out! https://gamejolt.com/games/EmpireBuilder/558901

Pigs can push buttons for you!

#gamedev #pixelart #screenshotsaturday

Don't forget to wishlist Toodee and Topdee on Steam!

https://store.steampowered.com/app/1303950/Toodee_and_Topdee/

:] me sigue sin gustar

:] I still don't like it