Making RPG Baldurs gate style game, looking for advice

Started by
5 comments, last by Daaark 13 years, 5 months ago
Ive already got my project started, using win32 and d3d9. So far my layout is similar to baldurs gate, a panel on the bottom half of the screen, and the game area on the top half. Im using 2 different d3d devices for each window, in its own class with its own render function. I guess im just looking for some general advice, or guidance to help get me going in the right direction.

Does my current set up sound good? Thanks
Advertisement
Using two devices doesn't sound like such a good idea. You'll have to load everything twice if it needs to be displayed on both devices. Not even thinking about objects displayed on the border between both (mouse cursor, etc.)

Have you tried viewports?

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

You could also check out GemRB which is an open source engine that can emulate games built with the Infinity Engine (Baldurs Gate, Icewind Dale, Planescape, etc) and of course be used to create custom games. If you were more interested in building the game rather than the tech from scratch you could be up and running relatively quickly.
Quote:Original post by Saruman
You could also check out GemRB which is an open source engine that can emulate games built with the Infinity Engine (Baldurs Gate, Icewind Dale, Planescape, etc) and of course be used to create custom games. If you were more interested in building the game rather than the tech from scratch you could be up and running relatively quickly.


Im starting it from scratch, because I think that is more fun, plus it is a good way to learn direct3d much more in depth then by using an engine that is already developed.

As regarding using two devices, I guess my logic behind that is, my two windows will use seperate windows procedure functions(my game area window, and my panel window that will contain skills bars, inventor ect...). So I wont be rendering the same thing twice on two different windows because they have to seperate purposes. And using two different classes will make it easier to handle just the game area, and to handle just the info panel area.

Plus it just seems easier this way, instead of using one window and always rendering the bottom half differently and passing all these different coordinates etc...

Any more thoughts, or arguments against my current setup? Thanks!

Edit: I havent looked into viewports, but when I get a chance i will explore that option.
You are making a complicated mess out of it. Draw your scene, then draw your GUI on top of it. It's easy. You don't need separate windows, or window procedures, or anything like that. You get a blank area of video memory to draw on, and you can draw whatever youi like on it.

You could also just use a texture as your GUI and keep rendering to it. Then just render the texture to the screen. Using the RTT mehtod, you could even have the GUI objects as drag-able windows without changing the coordinates you render to.
Quote:Original post by Daaark
You are making a complicated mess out of it. Draw your scene, then draw your GUI on top of it. It's easy. You don't need separate windows, or window procedures, or anything like that. You get a blank area of video memory to draw on, and you can draw whatever youi like on it.

You could also just use a texture as your GUI and keep rendering to it. Then just render the texture to the screen. Using the RTT mehtod, you could even have the GUI objects as drag-able windows without changing the coordinates you render to.


that does sound actually much more reasonable. I didnt even think of doing it like that. Thanks for the input!

Edit: So would my layers be dictated by my draw order, or by my z value.(keep in mind the game will be entirely made of sprites.
Draw your background tiles (if needed, in layers). These will be offset by the current camera position.

Draw your character objects. Sort them by screen height so that they overlap properly.

Draw any particle or visual effects.

--You might possibly draw the LAST layer of your map here, depending on if you have a layer that would be seen on top of player characters.

Draw your GUI last.

It's that simple. It will be the simplest thing in your whole project. There are other methods to micro-optimize this, and avoid overdraw, but they aren't really needed for something this simple.

This topic is closed to new replies.

Advertisement