Tank Universal 2

Community Forums/Showcase/Tank Universal 2

MadJack(Posted 2011) [#1]
Le pimpage. Blitzmax + Xors3d.



http://www.tankuniversal.com/forum/viewtopic.php?f=10&t=262

Last edited 2011


grindalf(Posted 2011) [#2]
wow that looks awesome :D


Blitzplotter(Posted 2011) [#3]
Oh yes, very sweet - nice eye candy.


Dabhand(Posted 2011) [#4]

Oh yes, very sweet - nice eye candy.



Totally agree... My eyes have put on a stone looking at that... Great work! :D

Dabz


Steve Elliott(Posted 2011) [#5]
Impressive as always, keep up the good work.


nrasool(Posted 2011) [#6]
Nice!!!!

Any chance of a teaser trailer soon, or gameplay video?!!

Well done Madjack, I know how much time you invested in this!. Good luck dude!


Sung(Posted 2011) [#7]
Wow!
I like the first Tank Universal.
Keep up the good work.

Btw - Tank Universal is the better TRON ;)

Last edited 2011


MadJack(Posted 2011) [#8]
Thanks for the comments. Certainly another long road to go down. But having gotten the first one out, I'm optimistic I can sort the sequel too. As long as RealLife(tm) doesn't nobble me.

Regards a video, I'm hoping to start posting test builds in the relatively near future. Ultimate aim is to have everything solidly user tested by the time I'm ready to approach Steam again.


_33(Posted 2011) [#9]
Excellent, I am open to betatesting ;) Oh and does TU2 use Xors3D AND Bmax or is the base language still Blitz3D? Cheers, great work done!


MadJack(Posted 2011) [#10]
BMax is the base language.

Need the extra speed over Blitz3d.


Kryzon(Posted 2011) [#11]
Cool atmosphere you got going on there!

Do you plan on writing a guide or tutorial on your experience working with the SteamWorks SDK?
I'm sure there'll be a lot of people interested in that.


MadJack(Posted 2011) [#12]
Do you plan on writing a guide or tutorial on your experience working with the SteamWorks SDK?

Err - no?

I managed to avoid having to deal too much with the guts of the SDK by using Simon's Steam wrapper and only worrying about achievements. Beyond that, it was a matter of learning how to compile to a 'depot' using the supplied apps and testing and uploading to Valve.


RifRaf(Posted 2011) [#13]
Madjack,

how would you describe Xors3D current state? Would you recommend it at this point.. I know you have been there a long time helping find bugs in the engine.. would you say the engine is pretty much complete now ?


MadJack(Posted 2011) [#14]
RR

My impression is that the core engine is pretty stable at this point. The major bugs - at least involving the commands that pretty much equal Blitz3d's command set - have been squashed. The proviso here is that I have yet to release much 'into the wild' to see how Xors holds up on a lot of different configs. My suspicion though is that without getting into complex shaders, compatibility will be high - but I've yet to confirm that.

On the other hand, there's a few things I'm waiting to see;

The shadow system is functional but needs reorganisation. Squid has mentioned looking at that.

Point particles are implemented and are very fast, but documentation is poor/incomplete and there's probably bugs lurking. Nobody seems to be doing much with particles at the moment. I'm still relying on ParticleCandy but will need to move to point sprites for the speed. Xors is slow at creating meshes on the fly so PC's single surface system suffers speedwise.

The big hang out for me (and others I think) is better integration of Bullet Physics - in particular, collision groups and filtering (note that there is a Blitz like collision system available as well). If the Xors team can pull that off then it'll be very nice.

So to sum up. Xors + Bmax is a good solution for people like me (and I'm not that slick as a programmer frankly) who want to move on from Blitz3d to a DX9 solution using BlitzMax, but want to retain the Blitz3d syntax. I suspect it's a bit rougher around the edges than Leadwerks but it is very usable at present. With the fixes mentioned above, it'll be a complete engine.


Stu_ovine(Posted 2011) [#15]
Id agree, the Xors3D engine is very stable. There are areas of work as MadJack has pointed out , also the re-inclusion of deferred lighting which was in but was taken out grrrrrr.

Its nice having a blitz3D style engine that supports shaders .....


Tab(Posted 2011) [#16]
how would you describe Xors3D current state?

Xors3D at the moment is 100% useable on a full project. The B3D command set is working 99% ( I leave the 1% if i am missing something )... and with the future implementation of Bullet Physics, the engine will be one of the best choices if you want to develop indie games and maybe something bigger.

And a big point is that .Squid always take in consideration our requests.

I made a lot of investigation on Xors3D, and I have 2 full games working on the engine and 1 tech demo that is in development.


MadJack(Posted 2011) [#17]
Tab

Are you working with the Xors particle commands?

if so, how are you finding them? Are they complete enough?


Tab(Posted 2011) [#18]
I use my own particle code to be 100% free.

Last edited 2011


MadJack(Posted 2011) [#19]
You mean a custom single mesh/quad system?

You're not using Xors' built-in point sprite commands?


Grey Alien(Posted 2011) [#20]
Very nice. Has Tank Universal been really successful for you?


MadJack(Posted 2011) [#21]
GA

Well, Steam takes 40% of the sale price and then the publisher takes 50% of that, so it has made a reasonable whack of money but realistically, I've not seen most of that. It certainly hasn't made enough for me to go give up the day job and realistically, has not returned on the intial time investment. On the other hand, a good whack of the first game's dev time was spent going down blind alleys because I had no set design to follow, dealing with tech problems that have been solved due to better tools becoming available to the indie and just generally learning the ropes.

However it has set up a 'brand' that I may yet be able to fully capitalise on.

And to be fair to the publishers, the game would never have gotten onto Steam initially (at least, not back in 2008) without their backing and they've pushed it in other channels that I'd have no access to normally - but still, it's food for thought. Also, my impression is that Steam has become more open to 'private' indie game publishing in the meantime.

We'll see.

Last edited 2011

Last edited 2011


Tab(Posted 2011) [#22]
You mean a custom single mesh/quad system?

A simple instanced quad system is ultra fast to do anything.

You're not using Xors' built-in point sprite commands?

Nop, i always try to leave alone any type of "build-in" system.


MadJack(Posted 2011) [#23]
A simple instanced quad system is ultra fast to do anything.
Well you know what the next question is don't you?

Would you be ok with making your system available to other Xors users at some point and form? ;-)


Grey Alien(Posted 2011) [#24]
@Madjack: Thanks for the info! Sorry to hear it's not made you a ton of money, but it's good that you have the brand and the tech now to reuse and capitalise on. Yep agree that Steam is kinda more open to indies now, but you still have to have something pretty special that strikes a chord with their demographic.


Tab(Posted 2011) [#25]
Would you be ok with making your system available to other Xors users at some point and form? ;-)

Sure, I only need some free time to polish the particle system to make it more friendly user.

Last edited 2011


ervin(Posted 2011) [#26]
Madjack - this is looking absolutely fantastic.

I loved the first one (bought it twice - both before and after the steam release), and I've played through it a few times.

Do you need any beta testers?


MadJack(Posted 2011) [#27]
Do you need any beta testers?

Yes - I'm hoping to get builds out soon.

Trouble is work is starting to get in the way. One of the designers at work is leaving for 6 months to look after his new baby.

Management are going to bring in an intern-bot as a stop gap but it's going to be a sh*tstorm.
I swear, if I hear another person say 'and we need it ASAP please' I'm going to defenestrate them.

Bloody kids! It's not even mine and its affecting my game dev time! And it's not like there aren't enough of the little ankle-biters in the world. Very unhappy.

<rant mode off>

Last edited 2011


RifRaf(Posted 2011) [#28]
MJ,

sorry to use your thread to ask this but I cannot post on xors page as im just trying the demo out..

is there a way to get xentityalpha to work on instanced objects? so far I cannot get it to work. I had to use the tex0.png from the instancing2 example to get xentitycolor to work on them... any thoughts on xentityalpha ?

Thanks


MadJack(Posted 2011) [#29]
RR

It's one of those areas in Xors I've put to one side frankly.

I was finding xentityautofade was 'resetting' any specific fade value applied to an entity or its children.

Regards instances, I gave them a go last night for the first time when tweaking my distant scenery and the command failed to work. not sure what the story with instance and alpha is.

I'll post your query on the Xors site myself.


Kryzon(Posted 2011) [#30]
AFAIK registration on the forums is free for anyone. I myself posted there without being a customer.


RifRaf(Posted 2011) [#31]
Kryzon, didnt realise that, thanks.


MadJack(Posted 2011) [#32]
RR
Would be better then if you made your own post - talk directly to Squid etc..


RifRaf(Posted 2011) [#33]
thanks.. we got it sorted. MJ, wasnt there a B3D -> XORS code converter at one point. I want to convert SpriteCandy and SpriteCandy GUI but am not looking forward to a long manual edit.

I also have diffused color+alpha working in the shader, heres the shader im using now (faster than xcopyenttiy) but I have to use entityblend 3 or 4 for the alpha to fade as smoothly as expected.

// view * projection matrix
float4x4 viewProjMatrix : MATRIX_VIEWPROJ;

// texture matrix
float4x4 textureMatrix : MATRIX_TEXTURE0;

// entity diffuse texture
texture diffuseTexture : TEXTURE_0;

//NEW Pixel shader options
bool no_light_influence;

// texture filtering
int filtering       : TEXTURE_FILTERING;
int anisotropyLevel : ANISOTROPY_LEVEL;

// light data
float4 lightColor     : LIGHT0_COLOR;
float3 lightDirection : LIGHT0_DIRECTION;
float4 ambientColor   : COLOR_AMBIENT;

// entity diffuse sampler
sampler samplerDiffuse = sampler_state
{
    Texture       = <diffuseTexture>;
    ADDRESSU      = WRAP;
    ADDRESSV      = WRAP;
    ADDRESSW      = WRAP;
    MAGFILTER     = filtering;
    MINFILTER     = filtering;
    MIPFILTER     = filtering;
    MAXANISOTROPY = anisotropyLevel;
};

// Input VS structure
struct VSInput
{
   float4 position  : POSITION0;
   float2 texCoords : TEXCOORD0;
   float3 normal    : NORMAL;
   float4 matrixC1  : TEXCOORD2;
   float4 matrixC2  : TEXCOORD3;
   float4 matrixC3  : TEXCOORD4;
   float4 diffColor   : TEXCOORD5;
};

// Output VS structure
struct VSOutput
{
   float4 position  : POSITION0;
   float2 texCoords : TEXCOORD0;
   float3 normal    : TEXCOORD1;
   float4 diffColor : TEXCOORD5;
};

// Vertex shader for hardware instancing
void VSMain(in VSInput IN, out VSOutput OUT)
{
   // restore world matrix for instance
   float4x4 worldMatrix;
   worldMatrix[0] = float4(IN.matrixC1.x, IN.matrixC2.x, IN.matrixC3.x, 0.0f);
   worldMatrix[1] = float4(IN.matrixC1.y, IN.matrixC2.y, IN.matrixC3.y, 0.0f);
   worldMatrix[2] = float4(IN.matrixC1.z, IN.matrixC2.z, IN.matrixC3.z, 0.0f);
   worldMatrix[3] = float4(IN.matrixC1.w, IN.matrixC2.w, IN.matrixC3.w, 1.0f);
   // transform position
   OUT.position  = mul(IN.position,  worldMatrix);
   OUT.position  = mul(OUT.position, viewProjMatrix);
   OUT.normal    = normalize(mul(IN.normal, worldMatrix));
   OUT.texCoords = mul(IN.texCoords, textureMatrix);
   // diffuse color NEW
   OUT.diffColor = IN.diffColor;
}

// Pixel shaders
float4 PSMain(in VSOutput IN) : COLOR
{
   float4 diffuse = tex2D(samplerDiffuse, IN.texCoords) * IN.diffColor;
   float4 result  = ambientColor * diffuse + (diffuse * saturate(dot(IN.normal, -lightDirection)) * lightColor);
   return float4(result.xyz, diffuse.w);
}

// Unlit pixel shader
float4 PSMain_Unlit(in VSOutput IN) : COLOR
{
   return tex2D(samplerDiffuse, IN.texCoords) * IN.diffColor;
}

//  Technique
technique Instancing
{
   pass p0
   {
      AlphaBlendEnable = 0;
      CullMode         = CCW;
      VertexShader     = compile vs_2_0 VSMain();
      PixelShader      = compile ps_2_0 PSMain();
   }
}

//  Technique with alpha
technique Instancing_alpha
{
   pass p0
   {
      SrcBlend = SrcAlpha;
     	DestBlend = InvSrcAlpha;
      AlphaBlendEnable = 1;
      CullMode         = NONE;
      VertexShader     = compile vs_2_0 VSMain();
      PixelShader      = compile ps_2_0 PSMain();
   }
}

//  Technique for unlit rendering
technique Instancing_Unlit
{
   pass p0
   {
      AlphaBlendEnable = 1;
      CullMode         = CCW;
      VertexShader     = compile vs_2_0 VSMain();
      PixelShader      = compile ps_2_0 PSMain_Unlit();
   }
}


Last edited 2011

Last edited 2011


MadJack(Posted 2011) [#34]
RR

Converter at;
http://area.xors3d.com/forums/viewtopic.php?f=30&t=346

Regards converting SC to Xors, one thing to know is that Xors default camera FOV is less than Blitz's 90 degrees, possibly 65 degrees for Xor? - so you'll need to tweak that.


RifRaf(Posted 2011) [#35]
I think squid said that if you do a
XCameraZoom 0 , it will mimick b3d camerazoom

BTW, you screenshots look nice. I cant wait to see the next demo or video. I always thought what you did in B3D looked great as well.