Sign in to follow this  
LevyDee

Making RPG Baldurs gate style game, looking for advice

Recommended Posts

LevyDee    376
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

Share this post


Link to post
Share on other sites
Endurion    5408
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?

Share this post


Link to post
Share on other sites
Saruman    4339
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.

Share this post


Link to post
Share on other sites
LevyDee    376
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.

Share this post


Link to post
Share on other sites
Daaark    3553
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.

Share this post


Link to post
Share on other sites
LevyDee    376
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.

Share this post


Link to post
Share on other sites
Daaark    3553
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this