Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.
Moderator: Coders of Rage
M_D_K
Chaos Rift Demigod
Posts: 1087 Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK
Post
by M_D_K » Fri Dec 05, 2008 6:01 pm
avansc wrote: whe when do we get to see your code???
you seem shy to ask
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.
Gyro Sheen wrote: you pour their inventory onto my life
IRC wrote:
<sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
avansc
Respected Programmer
Posts: 1708 Joined: Sun Nov 02, 2008 6:29 pm
Post
by avansc » Fri Dec 05, 2008 6:55 pm
M_D_K wrote: avansc wrote: whe when do we get to see your code???
you seem shy to ask
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.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
M_D_K
Chaos Rift Demigod
Posts: 1087 Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK
Post
by M_D_K » Sat Dec 06, 2008 2:03 pm
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;
};
Gyro Sheen wrote: you pour their inventory onto my life
IRC wrote:
<sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
avansc
Respected Programmer
Posts: 1708 Joined: Sun Nov 02, 2008 6:29 pm
Post
by avansc » Sat Dec 06, 2008 2:16 pm
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.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
M_D_K
Chaos Rift Demigod
Posts: 1087 Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK
Post
by M_D_K » Sat Dec 06, 2008 2:19 pm
nm works code in a sec
Gyro Sheen wrote: you pour their inventory onto my life
IRC wrote:
<sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
avansc
Respected Programmer
Posts: 1708 Joined: Sun Nov 02, 2008 6:29 pm
Post
by avansc » Sat Dec 06, 2008 2:21 pm
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
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
avansc
Respected Programmer
Posts: 1708 Joined: Sun Nov 02, 2008 6:29 pm
Post
by avansc » Sat Dec 06, 2008 2:45 pm
you posting it?
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
M_D_K
Chaos Rift Demigod
Posts: 1087 Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK
Post
by M_D_K » Sat Dec 06, 2008 2:46 pm
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
Attachments
s4.zip
(75.75 KiB) Downloaded 167 times
Gyro Sheen wrote: you pour their inventory onto my life
IRC wrote:
<sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
avansc
Respected Programmer
Posts: 1708 Joined: Sun Nov 02, 2008 6:29 pm
Post
by avansc » Sat Dec 06, 2008 2:54 pm
not bad.
dont use any linked list. or atleast not in the traditional sence.
i saw your particles are [maxParticles]
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
M_D_K
Chaos Rift Demigod
Posts: 1087 Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK
Post
by M_D_K » Sat Dec 06, 2008 3:13 pm
yep just an array
I'm now working on fixing up...well everything
Gyro Sheen wrote: you pour their inventory onto my life
IRC wrote:
<sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
avansc
Respected Programmer
Posts: 1708 Joined: Sun Nov 02, 2008 6:29 pm
Post
by avansc » Sat Dec 06, 2008 4:25 pm
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.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
M_D_K
Chaos Rift Demigod
Posts: 1087 Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK
Post
by M_D_K » Sat Dec 06, 2008 4:44 pm
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
)
and could you try a windows build. It should compile without a problem
Attachments
s4.zip
version 0.2 ya right :) (76.64 KiB) Downloaded 174 times
Gyro Sheen wrote: you pour their inventory onto my life
IRC wrote:
<sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
avansc
Respected Programmer
Posts: 1708 Joined: Sun Nov 02, 2008 6:29 pm
Post
by avansc » Sat Dec 06, 2008 5:03 pm
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
)
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
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
M_D_K
Chaos Rift Demigod
Posts: 1087 Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK
Post
by M_D_K » Sat Dec 06, 2008 5:24 pm
I saw doing it over AIM. Thats cool that you don't only educate though the forum but IM too
Gyro Sheen wrote: you pour their inventory onto my life
IRC wrote:
<sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.