Camera-Mounted Tile Layer?
by Chris Jorgensen · in Torque Game Builder · 10/04/2006 (12:41 pm) · 5 replies
I've got an interesting problem that maybe someone can suggest a creative solution to. Basically, I've got this foggy/green-nebula level for my game. In the background, I've got big sprites for the nebula and it works pretty well. But I'd like to add some depth to the level. So I thought it'd be cool if I had a slow-moving green fog that overlayed the the player's view. That way it looks like the spaceships are in another one of these nebula, or that the camera is *in* the fog.
The problem is that my game has the camera zoomed in/out depending on how far the ships are apart from one another. So I can't just overlay a scrolling tile on top of the level. I've also tried fog sprites in the level itself, but it adds no depth and slows the game down.
I'm trying to figure out how I can have the fog overlay the 600x600 part of the screen that shows the ships/background (the side has a 200x600 wide hud) and make it so it doesn't zoom in/out with the camera. How do you think I could set about doing this?
The problem is that my game has the camera zoomed in/out depending on how far the ships are apart from one another. So I can't just overlay a scrolling tile on top of the level. I've also tried fog sprites in the level itself, but it adds no depth and slows the game down.
I'm trying to figure out how I can have the fog overlay the 600x600 part of the screen that shows the ships/background (the side has a 200x600 wide hud) and make it so it doesn't zoom in/out with the camera. How do you think I could set about doing this?
About the author
Owner of Cascadia Games LLC
#2
10/05/2006 (9:01 am)
That's an interesting idea. I didn't think that you could have two scenegraphs at the same time. I'll see if I can try something like that soon.
#3
10/05/2006 (9:45 am)
Paul is right. You can definitely stack scene windows without any trouble. That way you can zoom/rotate etc on the game scene window and the "effects" scene window (in front of the game scene window) will not be affected.
#4
10/07/2006 (2:16 pm)
Ah, this worked perfectly. And so easy to implement. Thanks guys!
#5
10/08/2006 (4:55 pm)
The system was designed to enable you to accomplish effects like this with multiple scenegraphs and/or multiple scene windows. It really comes in handy when you are doing a TGB GUI system.
Torque Owner Paul /*Wedge*/ DElia