Skip to main content
gamedev.net
🔒 Locked

Pre-rendered backgrounds

Started by CutterSlade Apr 7, 2002 at 5:32 PM 6 replies 1.9k views
Original Post
CutterSlade
CutterSlade
I''m planning on doing a RPG with pre-rendered backgrounds, like Final Fantasy 7-9, Resident Evil, etc, using only DirectDraw (the characters will be 2D too). Which would be the best way to do that? How should I handle parts of the scenery that are over the character? Are there any tutorials on the web regarding this subject? Thanks a bunch
--------------------------------------------------------- There are 10 kinds of people: those who know binary and those who don't
Cybertron
Cybertron
This is probably how FF does it, using layers

Render the ''floor'' area, then the character, then the top image.

Splitting the larger image up into smaller sections is a good idea to be efficient too

You also need to have some way of determining if you can walk on areas or if it is a ladder

It is pretty complicated to explain, just take it one step at a time to learn how to do different things. Also read the ''Game development genesis'' series of atricles on GameDev, they talk about tiles and things like that. I would stick with tiles rather than trying to make a ''3d'' level like FF
MOooOM
MOooOM
The way squaresoft does their collision detection for a game with prerendered backgrounds is, on the floor level they use invisible polygons that state where the character can walk. You can either do it this way or use invisible tiles, with polygons it will be more precise though.
blahpers
blahpers
I was thinking of using a single image for the prerendered background and a same-size monochrome bitmap as a mask--white for "can walk on it", black otherwise. It''s a limited approach; I can''t have arches where I can walk over or under an area, but that could be fixed with multiple images and multiple masks.

Just an idea.

---
blahpers
---blahpers
antistuff
antistuff
quote:
I was thinking of using a single image for the prerendered background and a same-size monochrome bitmap as a mask--white for "can walk on it", black otherwise. It''s a limited approach; I can''t have arches where I can walk over or under an area, but that could be fixed with multiple images and multiple masks.


how about have a background, then a mask which has he area they cant walk over, then have another image with transparancy. you render the background, then the character, then the transparant image. stuff like arches would be in the transparant image.
CutterSlade
CutterSlade
That''s what I was thinking about doing: having a monochrome mask for places where the character will collide, where it will go under, etc. But does that sound doable? I don''t know how I could blit a bitmap to a surface according to a mask, Can someone help?

--------------------------------------------------------- There are 10 kinds of people: those who know binary and those who don't
gumby
gumby
How about drawing back the prerendered Z-buffer?
Simagery
Simagery
This is how Final Fantasy 7-9 does it:

The pre-rendered backgrounds are rendered with a depth buffer which is loaded as the z-buffer when the image is displayed. This z-buffer then handles characters being behind pre-rendered objects. Then to handle movement/collision in the world, they use a low-resolution collision geometry that the player is being moved in, which determines where the player can move and defines the relationship (camera angle, location, etc.) relative to the player.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.