I want it to be something like this, see how when the little green guy walks into the other room it isolates it and covers the outside with black.
I did this on another project of mine but I used actives and made them invisible and reappear when I needed them. However for this project I want it to run really smoothly on older computers(not too old though)
I can think of one way but it involves making every tile an active, and I don't know if that is gonna work well.
So is there some way of doing this or is it a pipe dream?
Well couldn't you always have each room in a different layer?
Then when you walk into that room set the main character to the layer the room is on, and make all other layers black? (So you only see the room)
I'm not sure if you can do this with MMF2 of TGF2, and I know you can't with older versions.
It was just like thinking out loud.
Your just jealous that you're not as awesome as me.
(And my megaman avatar )
I don't think I can use layers since by just having layers it adds lag to the game. Since I'm using background system box for my paralax layers, I wonder if I can do what you suggested as well. Thanks for the fast relpy btw.
Originally Posted by DudeHuge I don't think I can use layers since by just having layers it adds lag to the game. Since I'm using background system box for my paralax layers, I wonder if I can do what you suggested as well. Thanks for the fast relpy btw.
I don't mean to sound rude here... but I honestly wish people would stop considering layers inefficiently laggy, I mean honestly if anything that does something as God damn useful as layers is efficient, then I'm going to run a vote on saying that 3D graphics, pixel shaders, and texture mapping are all some of the most wasteful uses of technology I have ever seen in my life. Upgrade your computer and stop whining. Please.
use an overlay object that makes that blacks out the whole screen with (1,1,1), but then goes over the 'still revealed area' with a rectangle of (0,0,0); transparent. Then make the other active objects all invisible
Layers do not cause lag on decent computers. I used to have a crappy 1.8 Ghz AMD Athlon XP (the old kind) and it ran layers just fine.
*EDIT ALSO
I had a game with parallaxing backgrounds, that i was able to play just fine on my mom's 300Mhz Celleron, 64 MB Ram.
Edited by Ricky
-
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
3rd January, 2009 at 22:11:05 -
I've run tests before and it is possible that layers slow down your game by simply having them. However I remember some particular problems with layers and background system boxes. DudeHuge, if you use normal backdrops instead of BSBs and you incorporate layers, then you should be able to do the layer hiding thing as well as parallax scrolling.
Yes. Like the Clickteam Movement Controller that controls the extra movements (pinball, space invader, etc.), the Layer object controls the Layers in runtime. Both are built into the runtime (meaning that they have no extensions), just like the Sub-Application.
EDIT: Oh yeah, you'd only need two layers, one with the main map, and the other containing the rooms that covers everything else with a large black quick backdrop object.
EDIT #2: Visual example below.
Where the yellow-orangish lines are on each picture is the same Y coordinate on both layers, and where the blue lines are is the same X coordinate. One big black quick backdrop goes on the back of layer 2, with the room being a white backdrop with objects in it. Make layer 1 invisible and layer 2 visible when you enter the room, and vice versa.
Yeah, so basically you only need to use 4 of the active overlays you explained. Instead of placing them all over the place, program them to move where you need them to be in relation to the character.
Originally Posted by Ricky Layers do not cause lag on decent computers. I used to have a crappy 1.8 Ghz AMD Athlon XP (the old kind) and it ran layers just fine.
*EDIT ALSO
I had a game with parallaxing backgrounds, that i was able to play just fine on my mom's 300Mhz Celleron, 64 MB Ram.
A-haha! I'd love to have a 1.8 Ghz machine. Though AMD's have always given me trouble. >_O