Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (dr_panther), 1,255 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: Will do free coding - if contented donations are welcome [Re: Scorpion] #281518
07/27/09 15:53
07/27/09 15:53
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Don't worry! Thanks for your efforts!
Now, it is my part to place this in the wiki, I guess. smile

EDIT: Done! Formatting in the wiki is a nightmare - maybe, I didn't understand it properly.

Hope, it is okay this way:

http://www.opserver.de/wiki/index.php/Terrain_Shadowmapping

Last edited by Pappenheimer; 07/27/09 16:21.
Re: Will do free coding - if contented donations are welcome [Re: Pappenheimer] #281630
07/27/09 21:30
07/27/09 21:30
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
I think it's good that way and hope everyone else agrees^^

If somebody else needs something to be done that can be accomplished in lite-c, just tell me.

Re: Will do free coding - if contented donations are welcome [Re: Scorpion] #281634
07/27/09 21:50
07/27/09 21:50
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Hello laugh!

Okay, I use the System from Grimbers FPS Tutorial, for the stairs and things like this. If I want to go a little bevel(sorry i don´t know what "schräge" is in english) my player moves soooo slow, and if i want to go in 90° angle to the "bevel" my player doesn´t move at all -.- .

Here is the part from my code which do this things smile :
Code:
fall_distance = c_trace(player.x, vector(my.x, my.y, my.z - 500), IGNORE_ME | IGNORE_YOU | IGNORE_SPRITES | IGNORE_MODELS | USE_BOX);
		if(fall_distance > 64 && sign(fall_distance) != -1 && jumping == 0)
		{
			falling = 1; 													//falle
		}
		else
		{
			if(fall_distance < 64 && falling == 0 && jumping == 0)	
			{
				player_move.z = -fall_distance * time_step;
			}
		}
		if(fall_distance > 32 && jumping == 0)
		{
			falling = 1;
			if(player_move.z > -20 * time_step)
			{
				player_move.z -= 0.5 * time_step;
			}
		}
		else falling = 0;
		c_move(me, player_move, nullvector, GLIDE | IGNORE_PASSABLE);			//bewegt den Spieler, relativ zu seinem Pan, Tilt und Roll winkel und lässt in an Wänden etx gleiten und ignoriert objekte die Passabel sind



Please tell me what is wrong smile

Re: Will do free coding - if contented donations are welcome [Re: Scorpion] #281649
07/28/09 00:02
07/28/09 00:02
Joined: Feb 2005
Posts: 197
Indiana
darkraven1 Offline
Member
darkraven1  Offline
Member

Joined: Feb 2005
Posts: 197
Indiana
Hey saw your post and wanted to say hey
We are looking to get a team together and sounds like we could use someone like you for our Project.
We are looking to be picked up by Ubi so this a serious project.
I would like to talk to you more about it But I am unable to PM you.

Last edited by darkraven1; 07/28/09 00:07.
Re: Will do free coding - if contented donations are welcome [Re: darkraven1] #281746
07/28/09 13:11
07/28/09 13:11
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
@darkraven1

Sorry my inbox was full...

I really like to hear that you want me in your team, but I am working on a free title with a good friend of mine and I don't think that I can manage it to seriously work on 2 projects at the same time and put so much effort in it as needed. Out of curiosity: what is that project about?

@rey_ayanami
Ich seh mal, was ich tun kann =)

Re: Will do free coding - if contented donations are welcome [Re: Scorpion] #281755
07/28/09 13:49
07/28/09 13:49
Joined: Jul 2009
Posts: 11
S
Saruniks Offline
Newbie
Saruniks  Offline
Newbie
S

Joined: Jul 2009
Posts: 11
oh sorry

Last edited by Saruniks; 07/28/09 13:59.
Re: Will do free coding - if contented donations are welcome [Re: Saruniks] #281762
07/28/09 14:05
07/28/09 14:05
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
danke smile

Re: Will do free coding - if contented donations are welcome [Re: Rei_Ayanami] #281819
07/28/09 20:31
07/28/09 20:31
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
okay, here is a pretty solid player function, that let you walk stairs fluidly, jump and well...walk. I put the defaults so that they more or less fit the standard scale of 1 quant = 1 inch. Maybe he jumps a little too high or falls too slow, or I don't know. Just play with the default settings.
The only problem that occurs with it is a little jitter, when moving slopes down. You won't probably notice it. IF you need it fixed, just use a variation of how I fixed the stair climbing issue and make, that gravity has no influence in that case (= put it on the ground). I'm talking too much. Here's the code:

Code:
action controller(){
	
	//parameters to change
	int moveSpeed = 30;//inch in one ticks...thats how fast world recordlers run
	float stopFactor = 0.7;//the velocity of the player gets multiplied with that every frame
	int maxStepHeight = 16;//name says all. 16 inches should be even too high
	int groundDist = 1;//don't make it hard for the collision system
	float gravity = 2;//in a vacuum it would be ca. 24 inch/tick^2 (9.81 m/s^2)
	float heighCorrectionFactor = 0.9;//for climbing stairs and slopes
	int jumpForce = 10;//how good can you jump?
	move_min_z = 0.707;//stairclimping by c_move not over 45° of the elipsiod
	
	//used by player function
	VECTOR moveDir;
	VECTOR movement;
	float fallDist;
	int onGround = 0;
	VECTOR vel;
	vec_zero(moveDir);
	vec_zero(movement);
	vec_zero(vel);

	player=me;
	wait(1);
	c_setminmax(me);

	while(1){
		moveDir.x = (key_w-key_s); //get direction
		moveDir.y = (key_a-key_d);
		my.pan -= 2*mouse_force.x;
		camera.tilt = clamp(camera.tilt + 2*mouse_force.y,-90,90);
		
		fallDist = c_trace(player.x, vector(my.x, my.y, my.z - 500), IGNORE_ME | IGNORE_YOU | IGNORE_SPRITES | IGNORE_MODELS | USE_BOX);
		
		//check for ground contact
		if(fallDist <= groundDist)
			onGround = 1;
		else
			onGround = 0;
		
		//help me with stairs
		if(moveDir.x || moveDir.y){//moving?
			//trace down where you're moving to
			VECTOR stairTracePos;
			vec_set(stairTracePos, moveDir);
			vec_normalize(stairTracePos, my.max_x);
			vec_rotate(stairTracePos, my.pan);
			vec_add(stairTracePos, vector(my.x, my.y, my.z+my.min_z));
			
			result = c_trace(vector(stairTracePos.x, stairTracePos.y, stairTracePos.z+maxStepHeight), stairTracePos, IGNORE_ME|IGNORE_PASSABLE|IGNORE_SPRITES|IGNORE_MODELS);
			
			if(trace_hit){
				my.z += (maxStepHeight-result+groundDist)*heighCorrectionFactor*time_step;
				onGround = 1;
			}
		}
		
		//gravitation
		if(!onGround){
			vel.z -= gravity*time_step;
		}
		else
			vel.z = 0;
		
		//jumping
		if(onGround && key_space){
			vel.z = jumpForce;
		}
		
		//xy-movement
		if(moveDir.x)
			vel.x = 15*moveDir.x;
		else
			vel.x *= 1.0-(1.0-stopFactor)*time_step;//anti propotional relation
		
		if(moveDir.y)
			vel.y = 15*moveDir.y;
		else
			vel.y *= 1.0-(1.0-stopFactor)*time_step;//anti propotional relation
			
		movement.x = vel.x*time_step;
		movement.y = vel.y*time_step;
		
		c_move(me, nullvector, vector(0,0, vel.z), GLIDE|IGNORE_PASSABLE);//if we jump, we might crash against the ceiling
		c_move(me, movement, nullvector, GLIDE|IGNORE_PASSABLE);//now move on xy

		vec_set(camera.x, my.x);
		camera.z += 32.5;
		camera.pan = my.pan;
		
		wait(1);
	}
}



Re: Will do free coding - if contented donations are welcome [Re: Scorpion] #281828
07/28/09 21:07
07/28/09 21:07
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
thanks you soooooo much smile laugh

Re: Will do free coding - if contented donations are welcome [Re: Rei_Ayanami] #283068
08/05/09 14:25
08/05/09 14:25
Joined: Dec 2007
Posts: 706
Schortens Germany
Landixus Offline
User
Landixus  Offline
User

Joined: Dec 2007
Posts: 706
Schortens Germany
@Scorpion
Wenn du MP coden kannst, dann zahl ich dir gerne was.
Weisst ja, das Airfix Spiel, sag was du an Geld haben willst und
wir werden uns vielleicht einig.

Über wie und wann bezahlt wird können wir dann ja sprechen.


My Blog German: http://blog.quakeit.de/
www.quakeit.de ||
Airfix Game in Cooperation with:
www.3drt.com
Models Levels and Textures
Page 3 of 4 1 2 3 4

Moderated by  checkbutton, Inestical, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1