Page 2 of 3

Posted: Mon Apr 19, 2010 11:21 pm
by fuzzylunkin1
Depends on the license of the engine we chose . . . .

Posted: Tue Apr 20, 2010 12:10 am
by KGJV
KGJV wrote:QUOTE (KGJV @ Apr 19 2010, 01:07 PM) preferably a free, multi-platform open source one.
MOGRE is a candidate but means C# / managed world...

OGRE, Irrlicht , Cristal Space are also candidates.

also pratically, it's often more easy to completely rewrite the game on top a new engine than actually try to adapt existing game code to a new engine... :lol:

Meanwhile D3DX is the way to go with current engine.

Posted: Tue Apr 20, 2010 12:17 am
by beeman
KGJV wrote:QUOTE (KGJV @ Apr 19 2010, 12:01 AM) Hardware Transform and Lighting is a DirectX 7 feature and has always been supported by Alleg engine.

R5 introduced a shift to Direct3D 9 API instead of Direct3D 7 previously used. But it's just a 'shift' of API.

it's not , like said, a major change in the engine. The same functionalities & code was adapted to call the Direct3D 9 functions instead of Direct3D 7 ones. It's mainly a removal of the old DirectDraw code.

So the engine still does "Hardware T&L" only and uses only the "fixed function pipeline" but by calling the Direct3D 9 layer this time.

All the new and fancy modern GPU stuff like vertex and pixel shaders, HLSL, bump and texture mapping which where introduced by Direct3D 8 and 9 are still not used by the Allegiance engine.

But the engine is now ready for them... :P

Oh wait but Direct3D 11 is out now, and it's using the new Direct3D 10 architecture.

so yeah we're screwed because Allegiance engine is 2 generations late actually. R5 was an upgrade to be able to use new 8&9 features but today games are using 10&11 features.

Also programming with the 8&9 architecture is complex and tricky. While programming with 10&11 is much more simple and efficient... so we're even more screwed actually.

It would be much worthy to completely switch to a new engine actually than trying to add features to the R5 engine.
I admire you in a lot of ways KGJV :iluv: When I was young, I wanted to write my own games from scratch and space sims were my favorite genre. Alleg is, for me, as good as it's gonna get...and you can understand the code to this amazing game.

Anyway, and again, my interest is 100% academic newbie who cannot code to save his life, so If I understand correct, now if one wanted to write a new lighting or shading engine or utilize some of the features of DirectX9, one could do so...but your recommendation (and I certainly recognize your expertise) would be to sorta "transfer" the game onto a newer engine. Would you mind breaking that down a bit so a simpleton could understand? My first impression was a game "engine" would basically be the graphics engine...but then I started to wonder if modern game engines also include places to put the game physics, communication protocols for online play (sending info up and back from the server), chat capabilities, etc... Theoretically, one would still want the game to play like it does today....just look and sound better.

Thanks for the patience with my questions.

Posted: Tue Apr 20, 2010 1:42 am
by Orion
KGJV wrote:QUOTE (KGJV @ Apr 19 2010, 07:10 PM) MOGRE is a candidate but means C# / managed world...
dealing with C# / managed world is a Good Thing ™, given the skill set of this community, and the fact that it would just be a lot quicker to write better code.

Posted: Sun Jan 02, 2011 11:24 pm
by SpaceJunk
Bump.

I've been looking around in the source. According to D3DDevice9.cpp, Allegiance uses Gouraud shading.

Code: Select all

    RESET_STATE_CACHE_VALUE( D3DRS_SHADEMODE, D3DSHADE_GOURAUD );
RasterD3D9.cpp has the SetShaderMode function, which only includes Flat, GlobalColor and Gouraud.

Code: Select all

            case ShadeModeGouraud:
                D3DCall(CD3DDevice9::Get()->SetRenderState(D3DRS_SHADEMODE, D3DSHADE_GOURAUD));
                break;
What else would be necessary to change the shader model besides changing D3DSHADE_GOURAUD to D3DSHADE_PHONG and whatever calls to ShadeModeGouraud function?

Posted: Mon Jan 03, 2011 4:27 pm
by Adept
What an interesting topic. :)

Wheter to upgrade the current code or to port to another engine. That really is the big question isn't it.

Posted: Tue Jan 04, 2011 4:40 am
by Adaven
...

Posted: Tue Jan 04, 2011 8:21 am
by SpaceJunk

Posted: Tue Jan 04, 2011 11:09 am
by Adept
That would be very, very nice SpaceJunk.

Posted: Wed Jan 05, 2011 4:30 am
by Orion
I don't think much else than that change would be necessary.. it's still the same fixed function pipeline, but it might be called in several places; have you checked?

Anyone with the source building care to experiment & report back? (If nobody checks within a week or so hell, I'll fuggin do it :\)