"A FPS Game" Online Game
Moderator: PC Supremacists
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: "A FPS Game" Online Game
Thanks,
I'm not so good with physics... lol
But everything else is easy stuff...
I'm not so good with physics... lol
But everything else is easy stuff...
There's no place like ~/
Re: "A FPS Game" Online Game
There a admin has seemed to clean this thread, lol so please stay on topic about your game and no more racism.
Thanks Superadmindude.
Thanks Superadmindude.
Hyde from That 70's Show wrote:Woman are like muffins... Once you have a muffin you will do anything to have another muffin... And they know that.
- Ginto8
- ES Beta Backer
- Posts: 1064
- Joined: Tue Jan 06, 2009 4:12 pm
- Programming Language of Choice: C/C++, Java
Re: "A FPS Game" Online Game
Did you notice that you are straying off topic by saying that?Aeolus wrote:There a admin has seemed to clean this thread, lol so please stay on topic about your game and no more racism.
Thanks Superadmindude.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: "A FPS Game" Online Game
Yes... this was already explained on the other page, lets try and not give yourself more power than you have
There's no place like ~/
Re: "A FPS Game" Online Game
Yeah i always tend to go off topic, especially when im typing on my phone while driving.
You can tell in my posts when im on my phone (short messages and they go offtopic sometimes) and when im on my desktop where they are long line this and us correct grammar.
You can tell in my posts when im on my phone (short messages and they go offtopic sometimes) and when im on my desktop where they are long line this and us correct grammar.
Hyde from That 70's Show wrote:Woman are like muffins... Once you have a muffin you will do anything to have another muffin... And they know that.
Re: "A FPS Game" Online Game
^Phone post?Aeolus wrote:Yeah i always tend to go off topic, especially when im typing on my phone while driving.
You can tell in my posts when im on my phone (short messages and they go offtopic sometimes) and when im on my desktop where they are long line this and us correct grammar.
- Ginto8
- ES Beta Backer
- Posts: 1064
- Joined: Tue Jan 06, 2009 4:12 pm
- Programming Language of Choice: C/C++, Java
Re: "A FPS Game" Online Game
well... (most of) his grammar is correct; he just needs to work on spelling.eatcomics wrote:^Phone post?Aeolus wrote:Yeah i always tend to go off topic, especially when im typing on my phone while driving.
You can tell in my posts when im on my phone (short messages and they go offtopic sometimes) and when im on my desktop where they are long line this and us correct grammar.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
Re: "A FPS Game" Online Game
Haha don't make me start a thread where you need to guess if i have made a phone post or a desktop post. Lol it could be fun though. Oh and what spelling do i need to work on? I spell almost everything correctly. Unless its on my phone hahaha.
Anyways back on topic, Any update on the game?
Anyways back on topic, Any update on the game?
Hyde from That 70's Show wrote:Woman are like muffins... Once you have a muffin you will do anything to have another muffin... And they know that.
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: "A FPS Game" Online Game
Ahh... the game...
Well, there is "some" progress... but until I get collision working, there will be no progress at all!
However, luckily for you, I got the source code for you all to download and you can try your hand at my game...
I have some sort of collision detection going on...
Note: The code is VERY unorganized and not OO (lol)
Just look for the CheckCollisions() method on you should see what I'm trying to do...
You may download this here
Well, there is "some" progress... but until I get collision working, there will be no progress at all!
However, luckily for you, I got the source code for you all to download and you can try your hand at my game...
I have some sort of collision detection going on...
Note: The code is VERY unorganized and not OO (lol)
Just look for the CheckCollisions() method on you should see what I'm trying to do...
You may download this here
There's no place like ~/
- Ginto8
- ES Beta Backer
- Posts: 1064
- Joined: Tue Jan 06, 2009 4:12 pm
- Programming Language of Choice: C/C++, Java
Re: "A FPS Game" Online Game
The binary isn't working... and I'm too lazy to compile it myself.LeonBlade wrote:Ahh... the game...
Well, there is "some" progress... but until I get collision working, there will be no progress at all!
However, luckily for you, I got the source code for you all to download and you can try your hand at my game...
I have some sort of collision detection going on...
Note: The code is VERY unorganized and not OO (lol)
Just look for the CheckCollisions() method on you should see what I'm trying to do...
You may download this here
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
- 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
Re: "A FPS Game" Online Game
Code: Select all
private void CheckCollisions()
{
for (int i = 0; i < 6; i++)
{
if (player.Center.X < objects[i].Center.X + 200)
{
player.VelocityX = 0f;
player.PositionX += 1f;
}
if (player.Center.Z < objects[i].Center.Z + 200)
{
player.VelocityZ = 0f;
player.PositionZ += 1f;
}
}
}
Code: Select all
//put this somewhere
enum
{
axisX = 1,
axisY = 2,
axisZ = 4,
}
private void CheckCollisions()
{
for(int i = 0; i < 6; i++)
{
//I'm guessing the 200 is the radius
//playerRadius and objRadius are 200
if(SphereCollision(player.Center, objects[i].Center, playerRadius, objRadius) == true)
{
if(SphereCollisionOnAxis(player.Center, objects[i].Center, playerRadius, objRadius, axisX) == true)
player.Velocity.X = 0.0f;
if(SphereCollisionOnAxis(player.Center, objects[i].Center, playerRadius, objRadius, axisY) == true)
player.Velcoity.Y = 0.0f;
if(SphereCollisionOnAxis(player.Center, objects[i].Center, playerRadius, objRadius, axisZ) == true)
player.Velocity.Z = 0.0f;
}
//And why the hell were you adding 1f to player position when you wanted to stop movement
}
}
Code: Select all
private bool SphereCollision(Vector3 objA, Vector3 objB, float radiusA, float radiusB)
{
//I'm almost certain this whole thing is wrong since it used to check if a point was in a circle not a Sphere, and not Sphere to Sphere
//checking
float x_delta = objA.X - objB.X;
float y_delta = objA.Y - objB.Y;
float z_delta = objA.Z - objB.Z;
float r_delta = sqrt((x_delta * x_delta + y_delta * y_delta + z_delta * z_delta));
return r_delta<=(radiusA + radiusB);
};
private bool SphereCollisionOnAxis(Vector3 objA, Vector3 objB, float radiusA, float radiusB, long axis)
{
if(axis == axisX)
{
float x_delta = objA.X - objB.X;
float r_delta = sqrt((x_delta * x_delta));
return r_delta<=(radiusA + radiusB);
}
if(axis == axisY)
{
float y_delta = objA.Y - objB.Y;
float r_delta = sqrt((y_delta * y_delta));
return r_delta<=(radiusA + radiusB);
}
if(axis == axisZ)
{
float z_delta = objA.Z - objB.Z;
float r_delta = sqrt((z_delta * z_delta));
return r_delta<=(radiusA + radiusB);
}
};
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.
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: "A FPS Game" Online Game
What is "delta" and "<=" (not an operator I assume)
Also, I was using the 1f to the player position because when I stop all velocity to the player, it doesn't work...
Also, I was using the 1f to the player position because when I stop all velocity to the player, it doesn't work...
There's no place like ~/