Page 1 of 2

Zone of the Enders Clone

Posted: Wed Oct 07, 2009 12:47 am
by Kysen
Following up on my entry to last months screen of the month is my project based on Zone of the Enders. Intended to support my CV, more of a technical demo than a fully fledged game. Not sure I can put in the effort to add sounds.

Currently runs at 40 fps+, trying to sort out the random slow downs (25fps) caused by collisions and or the mech animations. I could badly use an AA shader, as the moment I added post processing hardware AA went out the window.

3 months to develop.

Tools used:

XEffects
Bullet Physics
CBeamSceneNode class
IrrEdit

Random Screens:

Multi-Laser
Image

Missile Barrage
Image

Beam Cannon
Image

Shield Deflect
Image

Video:
http://www.youtube.com/watch?v=5zs5dBrOOgA

Posted: Wed Oct 07, 2009 12:58 am
by Nadro
Good work, this looks pretty nice :) Video for this project is great.

Posted: Wed Oct 07, 2009 1:38 am
by CuteAlien
Yay, Gundam :-) I don't know Zone of the Enders, but your demo looks really smooth - gui, models, effects - all good. Video a little bit long, but besides that great. Doing that in just 3 months - wow! And I suppose this was even your first project with Irrlicht, right?

I'm pretty sure this makes a very good CV.

Posted: Wed Oct 07, 2009 1:58 am
by Virion
very nice. i like the beams :D

Posted: Wed Oct 07, 2009 4:37 am
by GameDude
Very nice game. Reminds of the N64 days, lol. Awesome stuff.

Posted: Wed Oct 07, 2009 3:10 pm
by Firgof
I'd consider moving the key commands to the left side of the screen and the target/objectives to the right side of the screen.

If you're making this for another country that reads from right to left though, works just fine.

Posted: Wed Oct 07, 2009 3:54 pm
by BlindSide
Wow this is impressive for 3 month's work.

I see you are suffering from the dreaded "Thin line on the left side of the screen copies the right side". To save you the headache here is how to fix it (Should be fixed in the next release of XEffects also).

If you are using D3D, find the line in EffectHandler.cpp that looks like this (It's near line 558 but I modified this file for the next release so I'm not 100% what line number it is):

Code: Select all

"	OUT.TexCoords.x = 0.5 * (1.0 + Position.x - (1 / screenX)); \n" 
Change it to:

Code: Select all

"	OUT.TexCoords.x = 0.5 * (1.0 + Position.x + (1.0 / screenX)); \n"
And if you are using OpenGL change the lines that look like this (Near line 531):

Code: Select all

"	tCoords.x = 0.5 * (1.0 + gl_Vertex.x - (1.0 / float(screenX))); \n" 
"	tCoords.y = 0.5 * (1.0 + gl_Vertex.y - (1.0 / float(screenY))); \n" 
To:

Code: Select all

"	tCoords.x = 0.5 * (1.0 + gl_Vertex.x); \n" 
"	tCoords.y = 0.5 * (1.0 + gl_Vertex.y); \n" 
This should fix the lines on the edge of the screen.

For the Anti-Aliasing there are 2 solutions. You could use the "copyBackbufferTo" function provided in this thread to copy the backbuffer to an RTT so that you can render with MSAA on the backbuffer and then do post processing (In D3D9 it doesn't seem possible to do MSAA directly on the RTT). You would have to modify the update() function of XEffects to render to no render target first, and then use that function to copy the backbuffer to "ScreenRTT".

The second option is to supply large dimensions to the XEffect's constructor's "screenRTTSize" param and then take 4 neighbouring samples in the first post-processing effect of your post-processing list. This should be adequate enough but may perform and look worse than the first technique. Perhaps I should provide a sample for this in the next release of XEffects.

Cheers

Posted: Wed Oct 07, 2009 4:39 pm
by Nadro
Issues on screen quad edges You can also solve by set texture wrap to ETC_CLAMP eg:

Code: Select all

ScreenQuadEntity->getMaterial(0).TextureLayer[i].TextureWrap = ETC_CLAMP;
for D3D it's enough, but if You use OpenGL, in all types of blur passes You have to also clamp UV's eg:

Code: Select all

// Horizontal Gaussian Blur - Cg fragment shader part
float4 Color = 0;
float Factor = 1.0/TextureSize.x; // in Vertical: TextureSize.y instead of TextureSize.x

for (int i = 0; i < 11; i++)
{
    float2 nUV = UV + Kernel[i]*Factor;

    nUV.x = clamp(nUV.x, 0.0 + Factor, 1.0 - Factor); // in Vertical: nUV.y instead of nUV.x

    Color += tex2D(ScreenMap, nUV) * Weight[i];
}

oColor = Color;

Posted: Wed Oct 07, 2009 4:46 pm
by BlindSide
Yeah that's to prevent artifacts from the filtering. I already clamp most of the shaders when doing a texread. But the errors in XEffects were caused by some left over code that offset the screen quad in the vertex shader, which I just got around to cleaning up. You can see that D3D9 needs a half pixel offset but I was offsetting in the wrong direction, and OpenGL doesn't even need an offset but I left it in the shader when I converted it from HLSL. :oops:

Posted: Wed Oct 07, 2009 8:18 pm
by Kysen
Thank you for the fix to the line on the left side, works great and ill take Firgof's advice and move the controls to the other side. Will try the MSAA method tommorow.

Posted: Thu Oct 08, 2009 1:46 am
by wing64
Look greats job. It so fast production and very nice. :D

Posted: Thu Oct 08, 2009 9:09 am
by B@z
we......want..exe now! : <

Posted: Thu Oct 08, 2009 2:39 pm
by 3DModelerMan
Cool 8) . I like the graphics.

Posted: Thu Oct 08, 2009 7:26 pm
by hayate
Very Nice! :D

The only flaw I notice is about the robot turning: it instantly turns to face the direction of the movement instead of slowly rotate around the vertical axis. :wink:

I hope you understood what I meant to say because english isn't my first language (And I'm not really good at explaining things even in my own language XD)

Posted: Thu Oct 08, 2009 7:44 pm
by arras
That's pretty advanced piece of work ...we don't see such polished projects here often ...congratulation :)