Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 29 Nov 2007
Offline Last Active Jun 25 2013 02:54 AM

Posts I've Made

In Topic: Best way to draw cylinder

27 February 2013 - 07:47 AM

In D3d9, you can try using D3DXCreateCylinder. There are tons of working examples you can find on the web to use this method.

In Topic: need help with a city builder story...

20 February 2013 - 12:00 AM

I'll start an idea.  I'm picturing that starting off, you are not alone.  You create this city with a [brother/cousin/friend] and you two are working hard.  Once you get to the point of adding a squad, naturally, your [brother/cousin/friend] takes the lead on it, and dies on the first battle.  now your family (or friends) are unhappy with you.  a couple avenues that were open to you for support (I.e. bonuses to help you early on) have closed their doors.  Part of the story can be about re-opening those doors.


I like this idea itself very much. It might not be as novel but is good nonetheless from a city builder game's perspective.

Even though my own idea for this might also not be something unique but anyhow, lets see.


There is a military raid going on, and you're one of the soldiers (maybe the best killing machine as well) in this raid. The reasons for the raid are unclear but you being the ideal soldier just believe in carrying out your mission. Once you've killed them all and razed the city to the ground, you stand on one of the ruins of a building and look around admiring your yet another feat. Then you catch sight of a few disturbing scenes that instantly spark something inside you. Few ideas for those scenes can be :

1) A small girl, without a limb, sitting beside the dead body of her brother, and there are no human emotions coming out of her.

2) An old man trying to pick up pieces off the ground, looking for the remains of his home where it once used to be.

3) Fire rising out of a temple with a priest sitting outside praying for, maybe dead people or peace?


This should trigger a change in the soldier's outlook on things and he swears to do a full cycle from destroying cities to building them.

And that's when he walks off into the darkness, pledging that no more destruction. Rather amend for this by building a new city.

In Topic: How does one recreate the backbuffer in d3d 9?

16 February 2013 - 06:30 AM

Whenever window gets resized, I usually take the following approach. This should work for you as well.
GetClientRect(winh, &winRect);
//Use winRect to calculate winHeight and winWidth.
d3dpp.Windowed = TRUE;
d3dpp.BackBufferHeight = winHeight;
d3dpp.BackBufferWidth = winWidth;
d3dpp.Windowed = FALSE;
d3dpp.BackBufferWidth = (LONG) ::GetSystemMetrics(SM_CXSCREEN);
d3dpp.BackBufferHeight = (LONG) ::GetSystemMetrics(SM_CYSCREEN);
d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;



pD3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm);
pd3dpp->BackBufferFormat = d3ddm.Format;
// Call CreateDevice

In Topic: D3DXCreateEffectFromFile major bug?

13 February 2013 - 03:07 AM

Delay loading this dll should solve the problem.

Basically, use the effects if the dll loads successfully, otherwise use the D3D pipeline itself.

Above is applicable only when it isn't absolutely necessary to use effects.

This particular dll isn't necessarily present on all the machines.

It's generally present under system32 folder.

It's true that most distributables are shipping this dll to strictly use effects.

In Topic: Volumetric texture arrows axes

12 February 2013 - 10:05 AM

In addition to what Jason mentioned in his posts, you should not try to achieve any kind of 3D modelling using sprites, unless you want to make things really hard and inefficient for yourself. Some challenges are worth not taking. wink.png

FYI, it's generally the other way round i.e. sprites are created out of 3D models.

For your particular requirement, it's better you go with polygonal mesh.