Quake3World.com Forums
     Programming Discussion
        Physics Playermodel q3geoball-MOD[solved]


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Physics Playermodel q3geoball-MOD[solved]

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 02-28-2007 09:59 AM           Profile Send private message  E-mail  Edit post Reply with quote


Hi,

i try to make that the Player on an inclined plane automatical
move down to the end. I do not will use the "slick_function"
The Animation from the Playerlegs should do this to.

Is this possible for Someone to make this in the code?

I have change some code for my MOD but i can not do this on an
inclined plane.

Also i am looking for a coder that can me help to make the physics of the BALL more better hotter :)

the alpha 00.01 version of the mode is here:
http://www.q3geoball.quakeit.de/loads/

if you can help me plz contact me.

thx for reading an sorry for my bad english




Last edited by Landix on 03-10-2007 12:32 AM, edited 2 times in total.

Top
                 

Insane Quaker
Insane Quaker
Joined: 06 Sep 2002
Posts: 399
PostPosted: 02-28-2007 11:18 AM           Profile Send private message  E-mail  Edit post Reply with quote


really landix learn programming first.. you have started this mod a few days back with no coding experience at all.. start learning programming for 2-3 weeks and then ask for help to create this code instead of asking for the code itself.
no offense, but mod making needs time, especially if you have no experience.
or look for a programmer who is willing to help you programming the mod.

btw if slick does everything you want, just with no animation, you could just adapt the code to do the animation based on the movement direction/speed.




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 02-28-2007 11:26 AM           Profile Send private message  E-mail  Edit post Reply with quote


TTK-Bandit wrote:
or look for a programmer who is willing to help you programming the mod.


Thats what i am looking for, but i will do also something on my own.

I have 2 kids and a wife + much work @ the company, so i have not enough time to learn much c++ code to do that.

I will but i have not enough spare time for that.

So i am looking for a coder and will do something self.

but thx for your answer




Top
                 

Insane Quaker
Insane Quaker
Joined: 06 Sep 2002
Posts: 399
PostPosted: 02-28-2007 12:17 PM           Profile Send private message  E-mail  Edit post Reply with quote


you dont need to learn C++, you just need C, thats much less.
just check out the book I told you on pq forums, its not that big.




Top
                 

Mentor
Mentor
Joined: 12 Mar 2005
Posts: 3958
PostPosted: 02-28-2007 12:27 PM           Profile Send private message  E-mail  Edit post Reply with quote


To get things straight: you have no experience with C and therefore require someone else to write the actual code.

You do however intend to do "something" yourself.

Pray, what be this thing?




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 02-28-2007 12:28 PM           Profile Send private message  E-mail  Edit post Reply with quote


I have no info for a book post, can you give me the title again plz.


thx
Landix




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 02-28-2007 12:31 PM           Profile Send private message  E-mail  Edit post Reply with quote


^misantropia^ wrote:
To get things straight:
You do however intend to do "something" yourself.

Pray, what be this thing?



I can a little model, making a website for the mod and will do something for the art. Menue and Skyboxes.

I do a lot of things to make the MOD ready.

I hope i could it make easier to understand




Top
                 

Insane Quaker
Insane Quaker
Joined: 06 Sep 2002
Posts: 399
PostPosted: 02-28-2007 04:45 PM           Profile Send private message  E-mail  Edit post Reply with quote


argl, I'm sorry, hit me in the face, I got confused and thought you where someone else :\
I did you wrong, and I hope you'll accept my apologies

the book title is "Programmieren in C " by Kernighan/Ritchie




Top
                 

4days Joined: 15 Apr 2002
Posts: 8193
PostPosted: 02-28-2007 05:36 PM           Profile Send private message  E-mail  Edit post Reply with quote


TTK-Bandit wrote:
argl, I'm sorry, hit me in the face, I got confused and thought you where someone else :\
I did you wrong, and I hope you'll accept my apologies


:olo:

google's not being very cooperative, and this might be what's happening in the mod already - but i remember seeing a tutorial a long time ago that showed how to dynamically rotate a shader/texture on a model - i think it was for a 'radar' effect or something like that.

if the mod is about a ball getting bounced about, then that might be an easy way to handle its looks. a shader that changed its scrolling direction and speed depending (like bandit said) on the movement direction/speed of the 'ball'.




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 02-28-2007 11:06 PM           Profile Send private message  E-mail  Edit post Reply with quote


TTK-Bandit wrote:
argl, I'm sorry, hit me in the face, I got confused and thought you where someone else :\
I did you wrong, and I hope you'll accept my apologies

the book title is "Programmieren in C " by Kernighan/Ritchie


No prob, i will accept :)




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 02-28-2007 11:09 PM           Profile Send private message  E-mail  Edit post Reply with quote


The shader thing hears interesting. i will try this out.

But i have the Ball animated in the model, so the rotation is in the direction the player move in. forward backward left right.

Accerlation is the problem and the movement on an inclined plane.

i will try




Top
                 

Insane Quaker
Insane Quaker
Joined: 06 Sep 2002
Posts: 399
PostPosted: 03-01-2007 05:10 AM           Profile Send private message  E-mail  Edit post Reply with quote


a shader would imho be more complex to do..
if you just use a static ball model and rotate it from the sdk, it would probably look better than an animated shader.
check out the CG_PlayerAngles function in cg_players.c




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 03-01-2007 08:15 AM           Profile Send private message  E-mail  Edit post Reply with quote


i will check this in the sdk

what do you think
change the ANIMATION or change THE
CG_PlayerAngles function in cg_players.c ?




Top
                 

Insane Quaker
Insane Quaker
Joined: 06 Sep 2002
Posts: 399
PostPosted: 03-01-2007 08:40 AM           Profile Send private message  E-mail  Edit post Reply with quote


I think you dont need any animations for a ball, except maybe squeezing the ball a little when you jump :D
changing the CG_PlayerAngles function should look perfect.




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 03-01-2007 11:43 AM           Profile Send private message  E-mail  Edit post Reply with quote


Ok then i try this out at the weekend.

The jumping i will turn completly off, but when the ball falls down i can build in a little "kickback" an the squeezing... i hope.

k thx for the suggestion

i let hear from me later




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 03-03-2007 12:24 PM           Profile Send private message  E-mail  Edit post Reply with quote


http://www.q3geoball.quakeit.de/loads/

there is the current Version, with a test map and some sounds.

Someone will make the Ball smoother? :)

When i make the Ball smoother in max the Animation goes away :(

I can not change the code so how i will, but this looks like a start :)

If anybody interest to help me, i will get happy then.

And yes i will turn off the jumping.

and i have buy the book.... wait for delivery.

thx for reading my bad english




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 03-06-2007 10:40 PM           Profile Send private message  E-mail  Edit post Reply with quote


Status....

I can make 1 full Roll Move without animation, i have a new smoother Model and you can not longer jump!

So after the Roll he turn all back and i can make only make 1 full Rollmove it is not looping.

Can i post some code here for help?

thx
Landix hard @ work




Top
                 

Mentor
Mentor
Joined: 12 Mar 2005
Posts: 3958
PostPosted: 03-07-2007 10:00 AM           Profile Send private message  E-mail  Edit post Reply with quote


Landix wrote:
Can i post some code here for help?

Sure, go ahead.




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 03-07-2007 10:27 AM           Profile Send private message  E-mail  Edit post Reply with quote


This make the ROLL, but only one time, when i hold forward, it is not looping.
The Pitch code before i turned off, i think i do not need this.

Code:
[color=red]   VectorCopy( cent->currentState.pos.trDelta, velocity );
   speed = VectorNormalize( velocity );
   if ( speed ) {
      vec3_t   axis[3];
      float   side;

      speed *= 1.00f; //0.05f  speed of the ROLL

      AnglesToAxis( legsAngles, axis );
      side = speed * DotProduct( velocity, axis[1] );
      legsAngles[ROLL] -= side;

      side = speed * DotProduct( velocity, axis[0] ); //[0]
      legsAngles[PITCH] += side;
   }[/color]


I do not understand where i can do this so, that the LEGS do the ROLL for ever to the directions i want.

I try to explain what i have do yet.
Turn off Head and torso, only LEGS are needed, so i make a Model, the BALL for the Legs, all directions works, i have screwed on the friction, speed, gravity etc...
Before i use the Animationfile from the model to make the ROLL, but Bandit means it could solve in the code over the player angles.

I will do this that way. thx for reading




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 03-07-2007 10:29 PM           Profile Send private message  E-mail  Edit post Reply with quote


I hope i am right!

Axis [3] is Legs axis! right?

I have change the [1] and the [0] to [1] and [3]

and a Roll is running, but absolute not under control.
The Speed i set higher, so when the ball has only a uni Textur nobody see that. :))

I can not do this better yet.

The Ball looks first good and he is rolling.
So i will go on with some mapping.

I am open for any help.
I will release the New Website and a little alpha next Weekend.




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 03-08-2007 02:07 AM           Profile Send private message  E-mail  Edit post Reply with quote


It seems to be that i was not not in school at this time::

* Pitch is rotation around the lateral or transverse axis—an axis running from the pilot's left to right in piloted aircraft, and parallel to the wings of a winged aircraft; thus the nose pitches up and the tail down, or vice-versa.

* Roll is rotation around the longitudinal axis—an axis drawn through the body of the vehicle from tail to nose in the normal direction of flight, or the direction the pilot faces.
o The roll angle is also known as bank angle on a fixed wing aircraft, which "banks" to change the horizontal direction of flight.

* Yaw is rotation about the vertical axis—an axis drawn from top to bottom, and perpendicular to the other two axes.

I go on and repeat later when i have finished




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 03-08-2007 04:52 PM           Profile Send private message  E-mail  Edit post Reply with quote


I do not know how this work, can everybody help me plz?

i want only the ball rolling.

All what the ball do is make a 360° and stop when i press forward
after release the button i goes -360°

So i will always a roll when i go forward left right back.

maybe someone? :icon27:




Top
                 

Insane Quaker
Insane Quaker
Joined: 06 Sep 2002
Posts: 399
PostPosted: 03-09-2007 04:58 AM           Profile Send private message  E-mail  Edit post Reply with quote


replace the content of the CG_PlayerAngles function with this:
Code:
   vec3_t      legsAngles;
   vec3_t      velocity;
   float         speed;
   
   // lean towards the direction of travel
   VectorCopy( cent->currentState.pos.trDelta, velocity );
   speed = VectorNormalize( velocity );
   
   if ( speed ) {
      speed *= 0.05f;
      cent->pe.legs.pitchAngle += speed;
   }
   vectoangles(velocity, legsAngles);
   legsAngles[ROLL] = 0;
   legsAngles[PITCH] = cent->pe.legs.pitchAngle;
   
   AnglesToAxis( legsAngles, legs );


oh btw, you should try my little ide for q3 programming:
http://q3devel.6x.to/




Top
                 

Commander
Commander
Joined: 28 Feb 2007
Posts: 123
PostPosted: 03-09-2007 08:19 AM           Profile Send private message  E-mail  Edit post Reply with quote


Absolute Great!

Very Thx Bandit.

So i will more tune some things and can release the alpha next WE :)

stay tuned!


And very thx again for your help.




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.