Quick Guide to Alleg Graphics

Discussion area for user-created Allegiance models, textures, voicechats, music, and other ingame content.
fuzzylunkin1

Post by fuzzylunkin1 »

Depends on the license of the engine we chose . . . .
KGJV
Posts: 1474
Joined: Tue Jul 01, 2003 7:00 am
Location: Transilvania

Post 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.
Last edited by KGJV on Tue Apr 20, 2010 12:11 am, edited 1 time in total.
Image
beeman
Posts: 630
Joined: Sat Nov 18, 2006 3:01 am
Location: Huntsville, AL

Post 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.
Image
"What if, star sailor, I were to come over your house and punch you in the $#@!ing face?!
Will that finally get you to shut the hell up?!?" -- neotoxin
Orion
Posts: 1733
Joined: Tue Jul 01, 2003 7:00 am
Location: Planet Min·ne·so·ta
Contact:

Post 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.
Image
SpaceJunk
Posts: 759
Joined: Wed Apr 06, 2005 7:00 am
Location: Collision orbit

Post 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?
Last edited by SpaceJunk on Mon Jan 03, 2011 2:07 am, edited 1 time in total.
Image
Adept
Posts: 8660
Joined: Thu Sep 27, 2007 12:53 pm
Location: Turku, Finland

Post 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.
ImageImageImageImageImage
<bp|> Maybe when I grow up I can be a troll like PsycH
<bp|> or an obsessive compulsive paladin of law like Adept
Adaven
Posts: 1959
Joined: Sat Oct 25, 2003 7:00 am
Location: Greater Ozarks

Post by Adaven »

...
Last edited by Adaven on Tue Jan 04, 2011 4:51 am, edited 1 time in total.
SpaceJunk
Posts: 759
Joined: Wed Apr 06, 2005 7:00 am
Location: Collision orbit

Post by SpaceJunk »

Last edited by SpaceJunk on Tue Jan 04, 2011 8:22 am, edited 1 time in total.
Image
Adept
Posts: 8660
Joined: Thu Sep 27, 2007 12:53 pm
Location: Turku, Finland

Post by Adept »

That would be very, very nice SpaceJunk.
ImageImageImageImageImage
<bp|> Maybe when I grow up I can be a troll like PsycH
<bp|> or an obsessive compulsive paladin of law like Adept
Orion
Posts: 1733
Joined: Tue Jul 01, 2003 7:00 am
Location: Planet Min·ne·so·ta
Contact:

Post 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 :\)
Image
Post Reply