Page 5 of 5

Re: phyzills update

Posted: Fri Dec 05, 2008 6:01 pm
by M_D_K
avansc wrote:whe when do we get to see your code???
you seem shy to ask :lol:

Soon enough I'm doing mad clean up at the expense of writing the level/editor stuff so the first release won't have it.

Re: phyzills update

Posted: Fri Dec 05, 2008 6:55 pm
by avansc
M_D_K wrote:
avansc wrote:whe when do we get to see your code???
you seem shy to ask :lol:

Soon enough I'm doing mad clean up at the expense of writing the level/editor stuff so the first release won't have it.
i have level saving/loading done. just finishing up the level editor. and main menu

then i'll post the final release.

Re: phyzills update

Posted: Sat Dec 06, 2008 2:03 pm
by M_D_K
remember that AngleToVector thing when its used in my engine it works weird but when i tried it in speed crunch(scientific calculator) the results are correct :/

Soon as thats fixed I'm releasing it. so alittle help please.

Code: Select all

Vector AngleToVector(int angle, int radius, int num)
{
	Vector ret;
	float x, y, x1, y1;
	x = (float)(sin((double)angle) * (double)radius);
	y = (float)(cos((double)angle) * (double)radius);

	if(x < 0)
		x1 = -x;
	else if(x >= 0)
		x1 = x;

	if(y < 0)
		y1 = -y;
	else if(y >= 0)
		y1 = y;

	double div = (double)(num / (x1 + y1));
	ret.x = (float)(div * (double)x);
	ret.y = (float)(div * (double)y);
	ret.z = 0;
	return ret;
};

Re: phyzills update

Posted: Sat Dec 06, 2008 2:16 pm
by avansc
tell me exactly what you want to have as inputs, and what you want the function to return and i'll make the function.

i cant read a function that does not work and somehow try and figuer what you want it to do that its not.

Re: phyzills update

Posted: Sat Dec 06, 2008 2:19 pm
by M_D_K
nm works code in a sec

Re: phyzills update

Posted: Sat Dec 06, 2008 2:21 pm
by avansc
M_D_K wrote:nm works code in a sec
sin and cosine take radians as parameters, are you gicing it degrees?

the conversion from degrees to radians is
radians = degrees/180*PI

Re: phyzills update

Posted: Sat Dec 06, 2008 2:45 pm
by avansc
you posting it?

Re: phyzills update

Posted: Sat Dec 06, 2008 2:46 pm
by M_D_K
Here it is :)

And yes I know it is buggy in places for instance managers don't talk to each other so watch out for moving multiple types. And it is hacked together mostly so don't bitch at me about it :)

This is STRICTLY proof of concept type stuff

Oh and read the README kthxbai :)

Re: phyzills update

Posted: Sat Dec 06, 2008 2:54 pm
by avansc
not bad.

dont use any linked list. or atleast not in the traditional sence.

i saw your particles are [maxParticles]

Re: phyzills update

Posted: Sat Dec 06, 2008 3:13 pm
by M_D_K
yep just an array
I'm now working on fixing up...well everything :)

Re: phyzills update

Posted: Sat Dec 06, 2008 4:25 pm
by avansc
M_D_K wrote:yep just an array
I'm now working on fixing up...well everything :)

yeah its a nice program. needs to optimized though.

id stay aways form arrays as they are not dynamic in the sense of linked lists.
also, you seem to use alot of other libraries. which is fine. but i try and use as little as possible.

but its nice i like it.
havent tried to compile it thogh.

Re: phyzills update

Posted: Sat Dec 06, 2008 4:44 pm
by M_D_K
Here is a new one.

managers don't fight over input anymore :)

also there is a reason for using those libs like GLEW (checks opengl extensions for me - lazy :lol: )

and could you try a windows build. It should compile without a problem :)

Re: phyzills update

Posted: Sat Dec 06, 2008 5:03 pm
by avansc
M_D_K wrote:Here is a new one.

managers don't fight over input anymore :)

also there is a reason for using those libs like GLEW (checks opengl extensions for me - lazy :lol: )

and could you try a windows build. It should compile without a problem :)
i'll try later. im working on a project with PixelP for tonight

Re: phyzills update

Posted: Sat Dec 06, 2008 5:24 pm
by M_D_K
I saw doing it over AIM. Thats cool that you don't only educate though the forum but IM too 8-)