ta3d coding

Everything related to the code /
Tout ce qui touche au code
Post Reply
Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

ta3d coding

Post by Flashbang232 » Sun Sep 11, 2011 5:15 am

RAWRAWRAWR i bet this doesnt make sense! Would it crash ta3d if i added it as a 3d shader!!! :O

#version 120
#extension GL_EXT_geometry_shader4 : enable



void main() {
for(int a = 0; < gl_LightSourceParameters){
while(true)
{
gl_LightSource = 5; //angled ? :O
}
if(gl_LightSourceParameters < 5){
gl_Color = 7; //set to black? :O what the hell am i typing!?!??!
}
if(gl_LightSourceParameters = 5){
gl_Color = 0; //no color? just plain texture?
}
if(gl_LightSourceParameters > 5){
gl_Color = 12; //set it to opaqueness? :D
}
Last edited by Flashbang232 on Fri Oct 07, 2011 6:54 pm, edited 2 times in total.
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: What if i put this random glsl jibberish into ta3d? :O

Post by Flashbang232 » Sun Sep 11, 2011 10:19 pm

RAWRAWRAWR!!!!



uniform float scale;
void main(void)
{
vec4 a = gl_Vertex;
a.x = a.x *Scale * 0.015;
a.y = a.y * Scale * 0.015;
a.z = a.z * Scale;
gl_Position = gl_ModelViewProjectionMatrix * a;
}

}
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: What if i tried to physically shove this coded lemon in

Post by zuzuf » Sun Sep 18, 2011 8:13 pm

Only vertex and fragment shaders would be processed and non-conforming ones would produce error messages in the logs but it would not crash.
=>;-D Penguin Powered

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: What if i tried to physically shove this coded lemon in

Post by Flashbang232 » Fri Oct 07, 2011 6:36 pm

wow so my opengl stuff wouldnt crash? =o holy cows! hey man you know any stuff other than java development kit thats freeware? and you dont have to like compile opengl do you, it looks likE i can just mod it in notepad. as to my other stuff, i could probably create really low-cpu-hogging java applets for ta3d, adding new features and it would add another branch of coding that we could use. i know a little c++ and like im going to try to learn java thru minecraft modding. =) i could prolly make something for pathfinding. how does ta3d pathfinding work physically and whats the error with it and trees and other stuff.
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: What if i tried to physically shove this coded lemon in

Post by Flashbang232 » Fri Oct 07, 2011 6:46 pm

As for the engine using the data i have an outline. basicly what it comes down to is decompiling the .exe to load the .jar and natives from a directory, say ta3d\JRE\. the engine would treat the jars like it treats hpi files; basicly like a compressed zip. then the engine can use what minecraft does to read the compiled class files and maybe add a new filename for plugins, like ta3d_plugin so its only a plugin for ta3d and cant be used on others or whatever. i can probably make a container similar to safaris webkit2web.exe and run java thru that for ta3d as an addon to features. all the while making it as best i can for fps considering java takes a lotta mEmory and cpu space for ppl with a crappy intel 1.2 ghz or whatever.
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: What if i tried to physically shove this coded lemon in

Post by Flashbang232 » Fri Oct 07, 2011 6:50 pm

i saw on your list of todos that 1rst person ta is on it. we could use java to give a good addon to anisotropic (up to 16x msaa?) with good fps and then maybe antialiasing from 1x to 2xmsaa - 8x msaa. i could redo the ta models to add more faces and texture quality, as im OK in gimp. as to the flares i could probably add some java and glsl shaders to it.
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: ta3d coding

Post by Flashbang232 » Sat Oct 08, 2011 4:57 am

Probably make it happen with a virtual runtime environment of some sort or an addon. now that i think of it a java environment in an engine designed to run stuff like lua is a bit on the odd side of things. as for what i might be able to do is construct all the data, create a new set of folders and add some paths into the .exe. change and enhance/refine algorithm for pathfinding and maybe enhance the opengl to be SUPER HD! jesus christ i love number crunching and programming B). anyways yeah and then as to the addons i might need to add some sort of runtime environment to make use of all the features i have in mind. first person rts is a hard one. it would be like coding a new engine if i were to add it to ta3d.
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: ta3d coding

Post by Flashbang232 » Sat Oct 08, 2011 5:01 am

maybe have these features: hotswapping from battlefield 2 modern warfare. add certain types of shading when switching camera angle. i would also have to add angles and shit and then maybe have a rotation key similar to the thing in wings3d. as for the pathfinding zuzuf, how long is that algorithm. 3-4 days left until i can get back onto my rig so yeah anything right now helps man, i have that damned...installation...right....there...holy crap but i cant get to it. is java the answer? looks like simplified c++
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: ta3d coding

Post by zuzuf » Mon Oct 17, 2011 5:19 pm

I am against Java in a game engine if it is to be used as an extension mechanism (if you write a game in Java that's another story) because a Java VM is not something light.
Lua is just the perfect balance for what we need and there is a JIT for it which is quite fast.

Regarding pathfinding, this is a performance bottleneck so coding it in Java is not a good idea.
=>;-D Penguin Powered

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: ta3d coding

Post by Flashbang232 » Sat Nov 05, 2011 6:51 pm

Well put. The fact I can speak on an eye to eye level with you on this is something that tells me im doing good at learning coding. Also, what wld be cool is shading on units. :) Some simple OpenGL shaders would be cool =). also what about some Advanced OpenGL for some performance, ie similar to Minecraft's optifine where it only renders visible geometry and avoids visual artifacts. this would help with debug mode performance and allow for some nifty scripting. also, nice work zuzuf. my cpu is weak (1.5 ghz) and its not a quad, its dual. but i get like 16-30 fps which is great, and its like cavedog quality!!!!
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: ta3d coding

Post by Flashbang232 » Sat Nov 05, 2011 6:54 pm

also for model shading, we can set 'points' on a unit, say each corner on a model face. engine calculates the space between. shades according to an opengl shader. so smooth shading, and a face towards the upper right would get shaded more than one lower left face so it would all work out.
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: ta3d coding

Post by Flashbang232 » Sat Nov 05, 2011 6:55 pm

Also, lua shadows? It just seems like an odd idea, but would it work with high quality?
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: ta3d coding

Post by Flashbang232 » Sat Nov 05, 2011 6:58 pm

Also the TaK community wants TaK in 3d. kingdoms.heavenforum.com you want me to tell them that were too busy, it would have to be a while? i could probably work on a tak mod for ta3d. also, an answer to their question, a tak unit cld be scripted in ta3d to behave like a tak unit
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: ta3d coding

Post by Flashbang232 » Sat Nov 05, 2011 7:36 pm

Also sorry for the quadruple post but im on my phone and i dont have any edit button XD
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

MattyWS
Posts: 146
Joined: Sat Jan 23, 2010 12:46 pm

Re: ta3d coding

Post by MattyWS » Mon Nov 07, 2011 6:57 pm

You could tell to use Spring, where there is a larger team working on the engine rather than one person. Also, models do have shading and shadows, your computer probably just can't handle them

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: ta3d coding

Post by zuzuf » Sun Apr 01, 2012 8:28 pm

I think TAK file specs are available (at least most of it) so adding support for it in TA3D could be done with "minor" efforts but the new game mechanics may require some more work.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Re: ta3d coding

Post by Balthazar » Sat Apr 07, 2012 2:22 pm

Well - that`s something to remember! TAK was not so bad anyway...

Post Reply

Who is online

Users browsing this forum: Dymnjemi and 1 guest