Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (PeWi, AndrewAMD, Quad, VoroneTZ), 463 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 4
Page 2 of 15 1 2 3 4 14 15
Re: Slightly improved Zelda code [Re: Orange Brat] #38027
12/20/04 12:07
12/20/04 12:07
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline OP
User
DavidLancaster  Offline OP
User

Joined: Nov 2004
Posts: 862
Australia
I am a horrible animator/modeller and will not be animating the guard model for climbing, moving between stand, walk and run positions etc, but it is a good idea.

The camera collision idea looks good, but I am not planning to work on the camera further in this script.

I don't plan to do very much with combat, just the basics, as follows:

1. Allow the player to lock on to stationary objects (which you would
need to program as enemies and give them ai)
2. Have the only attack as the Guard's default attack animation, with
weapon and allow the weapon to interact with objects (ie it rebounds
off of walls). I'm not planning to put in combos and rolls and jumps
because I am a bad animator and I don't plan to go that far with this
script.

Thanks for ideas.

Re: Slightly improved Zelda code [Re: DavidLancaster] #38028
12/20/04 18:27
12/20/04 18:27
Joined: Jan 2003
Posts: 246
The Hole, Australia
Josh666 Offline
Member
Josh666  Offline
Member

Joined: Jan 2003
Posts: 246
The Hole, Australia
cool beans!


~J666
Re: Slightly improved Zelda code [Re: Orange Brat] #38029
12/21/04 19:07
12/21/04 19:07
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline OP
User
DavidLancaster  Offline OP
User

Joined: Nov 2004
Posts: 862
Australia
I took another look at that idea for improved camera movement and I understand it now. I implemented it and it's worked so far, i'm gonna continue working on it. So the camera will actually move to the position it needs to be in (to avoid walls) instead of just appearing there and clipping into walls.

Re: Slightly improved Zelda code [Re: DavidLancaster] #38030
12/21/04 19:29
12/21/04 19:29
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
Do you mean from the Gamasutra article? From my understanding of it, you'd have to code an "arc" of traces from the player to the camera. One trace would go right at the camera and the others on either side of it and starting at the initial trace and spreading out from there and stopping at about the 45 degree mark(give or take 5 or 10 degrees). Each of the traces has a "weight" associated with it and the farther away the trace is from the player, the less influence it will have on the camera's forward movement. The way Doug's new template 3rd person camera handles wall collision is somewhat similar(minus the weighting), but he still hasn't been able to completely eliminate the clipping. He's come the closest, though.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Slightly improved Zelda code [Re: Orange Brat] #38031
12/22/04 11:53
12/22/04 11:53
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline OP
User
DavidLancaster  Offline OP
User

Joined: Nov 2004
Posts: 862
Australia
That's exactly what I did!! It doesn't eliminate clipping but reduces it and makes the camera look and work so much better. It really only clips if you turn too fast and move the camera into a wall, though if you change the speed at which the camera moves back and forth along the raduis line, you can make it fast enough so clipping stops but the camera looks dodgy because it moves too fast.

I used six traces, two at +-10 degrees, two at +-25 and two at +-50. I haven't used a central trace and it seems to work ok as long as you give the 10 degree trace 100% weight control. If you've done this type of camera before orange bat can you recommend how many traces I need, the degrees they are apart and the weight they should have (if you've done it before). Otherwise I'll try trial and error of various traces to see which layout works best. Thanks for the idea!! It makes this script rock!!

Last edited by AccessPhenomenon; 12/22/04 12:01.
Re: Slightly improved Zelda code [Re: DavidLancaster] #38032
12/22/04 14:45
12/22/04 14:45
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
I've never successfully implemented it, but I understand the theory behind it. The elimination of the wall clipping is my Holy Grail and it looks like you may have finally licked it or are on the verge of it. You'll have to play with the weights until you get the right magic numbers. Also make sure that the clipping is eliminated when the camera is tilted up or down as well. The ultimate test would be successfully ridding the clipping with a more traditional 3rd person chase cam like a Max Payne or new template 3rd person style. Good luck.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Slightly improved Zelda code [Re: Orange Brat] #38033
12/22/04 17:57
12/22/04 17:57
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline OP
User
DavidLancaster  Offline OP
User

Joined: Nov 2004
Posts: 862
Australia
I've tried with the magic numbers but can't get rid of clipping. It seems that when I play with the numbers I am faced with two options, have no clipping but have the camera move too fast and too close to the player when it approaches the wall. Have some clipping but have the camera move at a nice speed and stays at a nice distance from the player. It's keeping a balance. I've tried making the camera move out from a wall when it is next to it but it is hard to do with this sciprt and type of movement.

What do you mean by that I should try and eliminate clipping when the camera tilts? Do you mean that if the camera height changes during gameplay to stop the camera passing through a roof etc?

Here's the code I used to calculate the radius at which it needs to move to from the player, in case you ever plan to implement it

"cam_xyangle" is the camera's pan
"dist_total" is the maximum distance the camera can move from the player
"dist_traced" is a temporary variable used to calculate
"camera_move_to" is the radius at which the camera needs to move to from it's current distance from the player

The code will give you the variable "camera_move_to", which is the distance/radius the camera needs to be from the player in order to avoid collision.

[see first post above]

Last edited by AccessPhenomenon; 12/24/04 20:09.
Re: Slightly improved Zelda code [Re: DavidLancaster] #38034
12/22/04 20:41
12/22/04 20:41
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
I'll try to crack this code today or over the next couple. I'm in the middle of learning Wintermute Engine and reorganizing my own game, so my time has been stolen from me at knife point.

Quote:

What do you mean by that I should try and eliminate clipping when the camera tilts? Do you mean that if the camera height changes during gameplay to stop the camera passing through a roof etc?





Well, whenever I was playing around with Doug's new template chase cam, it would work out pretty well, but then when I tilted the camera up or down(looking up/down...mouse_force.y != 0) the thing would always clip like crazy. It's esp. bad when you're looking up into the sky. If you hit the wall when the camera is around eye level it's pretty darn good, however that only occurs when the "smoothing" variable is set to default or right around there. You can still break it but it's good most of the time(which of course is unacceptable ). If you set the smoothing to 0(which I prefer) it'll kind of snap to the trace target(or perhaps this is the vec_normalize part) and then clip(but just barely and at eye level..also clips bad when looking up).

Here's my new template test level. If your "template_6" folder is in the default folder(C:\\Program Files\\GStudio6\\template_6), it shouldn't give you any trouble. I think the ones provided are the newest, but I'm not 100% sure.

http://www.geocities.com/hainesrs/tester.zip

Stand next to a wall and try different camera heights. You'll notice tilting up is worse than eye level or looking down.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Slightly improved Zelda code [Re: DavidLancaster] #38035
12/24/04 11:35
12/24/04 11:35
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline OP
User
DavidLancaster  Offline OP
User

Joined: Nov 2004
Posts: 862
Australia
Got ledge climbing and ladder climbing working quite good (not animated though). If you jump or fall and you are near a ledge you will grab onto it. You can move side to side, climb up or fall down. You can also program the scipt to only grab onto ledges with certain textures. The ladder climbing is only up and down (not side to side). Once I've finished combat I will post code.

Re: Slightly improved Zelda code [Re: DavidLancaster] #38036
12/24/04 13:36
12/24/04 13:36
Joined: Aug 2003
Posts: 575
Venezuela
Firestorm Offline
Developer
Firestorm  Offline
Developer

Joined: Aug 2003
Posts: 575
Venezuela
"Did you ever know that you're my hero?"

Page 2 of 15 1 2 3 4 14 15

Moderated by  adoado, checkbutton, mk_1, 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