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

Here's a peaceful little forest scene for this #screenshotsaturday, from the beginning of the game.

Quantum precognition is one of the most powerful cards. End game cards & equipment. Demo/alpha build boss is no match for this deck.

Just a Pico sprite

Heya! I wanted to show some gameplay progress i made so far. I hope you like it ^^

We're glad to announce that Baby Dino Adventures 🦖 is now available in Early Access here on GameJolt! Link: https://gamejolt.com/games/babydinoadventures/508121 Walk, run, and jump as a baby t-rex in this cute platformer Free demo available #IndieGame | #GameDev | #PixelArt

Regular exercise is key for healthy wings.

Try it out!

https://gamejolt.com/games/AeonNightmares/605184

brung back my old oc plus a new one

...they don`t have names yet tho

Let me introduce you to the new Mech line: Gendai Spec. Those are Mech that specializes in surprise attacks, covered operations, and stealth. They are equipped with melee weapons but one of Gendai's frames supports sniper rifles.

Made my first ever animation.