Game authors and players, please read this thread!

Author Topic: Layered backgrounds?  (Read 412 times)  Share 

Aėrendyll (formerly Yurina)

  • Back from the dead.
Layered backgrounds?
« on: 02 Jul 2006, 16:50 »
Hi all,

I'm having this really diffivult problem here.

I'm making a game which uses tiles. So far, no problems. But I'm having this issue: Is it possible to make a background in two layers, in a way that one of those layers will dissappear or become transperant.

Myself, I thought of using objects, but I have reasons to find alternatives:
- Large objects take up a lot of memory to use.
- There is a limit of objects you can use in a game.

If I leave these layers out, it looks like the main character is indoors, but I want to prevent that illusion. If this problem can only be solved using objects, can I get some advice for making the backgrounds look less like indoor backgrounds?

Thanks in advance,
~Yurina
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
<i>~Final Fantasy X-2</i>

I've been

Re: Layered backgrounds?
« Reply #1 on: 02 Jul 2006, 17:04 »
I am not sure if I understand correctly, but how are you drawing your tiles at the moment? In the tile engine I wrote, I used dynamics sprites, which you can draw with a transparency value. I wouldn't recommend to use anything else to be honest, objects are limited and slow as are characters in that amount.

Aėrendyll (formerly Yurina)

  • Back from the dead.
Re: Layered backgrounds?
« Reply #2 on: 02 Jul 2006, 19:25 »
I am not sure if I understand correctly, but how are you drawing your tiles at the moment? In the tile engine I wrote, I used dynamics sprites, which you can draw with a transparency value. I wouldn't recommend to use anything else to be honest, objects are limited and slow as are characters in that amount.

I'm making tiles in MSPaint. This is the way I make my backgrounds:
- I make a grid which can be filled with tiles (No gridlines visible after placing all tiles. Mostly I use 20x20)
- I make some basic tiles which I'm going to use (walls, floors, standart objects.)
- I save the grid as another file and colourize it in a code that indicates wether I want wall, floor or special tiles there.
- I place the basic tiles.
- I copy this picture and add the grid on it again.
- I add detail to the grid-containging copy.
- I paste the copy on the original background, making the gridlines invisible using MSPaints selection transperany (so they'll dissappear.)
- Finished!

In short, I don't use an engine for my tiles, but simply a paint program.

The problem is that I wanted to create regions on places where the player walks beneath a roof/wall (seen from the players view). I want the roof/walls to dissappear or become transperant when the player stands on that region.
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
<i>~Final Fantasy X-2</i>

I've been

Khris

  • Evil Dark Emperor Death-Kill
    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Layered backgrounds?
« Reply #3 on: 02 Jul 2006, 21:20 »
You could use the 4 other background frames, but only if a) the sections dissappear completely and instantly, and b) there aren't more than 4 of those sections.
You'd switch to one of the other background frames as soon as the player enters one of the regions.

If you want the wall or roof parts to become semi-transparent, or if there are more than 4 in one of the rooms, you'll have to use objects, I'm afraid (or charactersm, too, if there are going to be a real lot of those sections).
http://whathaveyoutried.com/

The other day on yahoo answers:
"Can you print colored images with black ink? If so tell me how please Thanx Kimberly"

Ali

  • What will become of the baron?
  • Ali worked on a game that was nominated for an AGS Award!Ali worked on a game that won an AGS Award!
Re: Layered backgrounds?
« Reply #4 on: 04 Jul 2006, 17:39 »
Couldn't you create 2 identical rooms, one with roofs and one without? Then when the player walks through a door, send all the visible characters from one room to the other and set the transition mode to dissolve.

I don't know if that would be game-size-efficient, but I guess it could work.

Aėrendyll (formerly Yurina)

  • Back from the dead.
Re: Layered backgrounds?
« Reply #5 on: 05 Jul 2006, 17:43 »
I'll be going for the background frames idea from KhrisMUC. That sounds best to me. Having to switch rooms is a bit tricky, because I make an RPG of my game. This means I have to use a lot of rooms for battles. So I can't use this trick.

Besides, in the areas where my characters are under a roof, I can use Character.Transparency if needed (how stupid I didn't think of that earlier...).

Thanks for helping me out, guys!
~Yurina
 
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
<i>~Final Fantasy X-2</i>

I've been