Layered backgrounds?

Started by A�rendyll (formerly Yurina), Sun 02/07/2006 16:50:41

Previous topic - Next topic

A�rendyll (formerly Yurina)

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...
~Final Fantasy X-2

I've been

DoorKnobHandle

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)

Quote from: dkh on Sun 02/07/2006 17:04:40
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...
~Final Fantasy X-2

I've been

Khris

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).

Ali

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)

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...
~Final Fantasy X-2

I've been

SMF spam blocked by CleanTalk