Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Akow, AndrewAMD, Quad), 733 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Ultimate Zelda lock on camera! #99763
11/24/06 22:43
11/24/06 22:43
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline OP
User
DavidLancaster  Offline OP
User

Joined: Nov 2004
Posts: 862
Australia
Got this nice lock on camera working with the Kingdom Hearts code and wanted to share. As far as I can tell it's the same camera as in Zelda: Ocarina of Time. The goal was to keep the lock on target and the player in view at all times but also have the camera avoid clipping walls and have a nice angle on the scene. Lock onto a target high up in the air or below you and the camera will move accordingly Here is the download:

http://www.churness.com/axys/ZeldaLockOn.zip (link should work, if it doesn't read posts below incase url has changed)

All resources in this project are free for you to use in any commercial project. Things are unpolished and the code, even though built upon the Kingdom Hearts code, will have some additions that may be difficult to understand, so use and attempt to understand at your own risk There are plenty of things that could be added to this, I just wanted to show you the lock on code I used 6.5, may be compatible with 6.4, not compatible with 6.3 (due to using time_step etc). Good news is that the models are using ellipoid c_move and c_trace The collision model is separate to the animated model, this is because I run into collision issues when two models collide if they are complexly designed like characters with ellipoid collision, a simple box doesn't run into such issues (ie getting stuck when you touch another entity) so this added a new complexity to the code having to have two functions, one which handles the movement but also needs to control the animation of another entity.

When you are locked onto a target (right click), you can switch to another target in view (and with an arrow on it's head), by right clicking again, this only locks on to the nearest target which is in view and is not the one you are currently locked onto, it wont scroll through all the targets on screen. If more than one target is in view hold S and right click to break the lock on. The jumping is automated from walking off a ledge. And if you hold right click and move you can kind of see the beginnings of what happens when you hold Z when playing Ocarina (although needs to be refined more as the camera doesn't swing around).

Enjoy



Re: Ultimate Zelda lock on camera! [Re: DavidLancaster] #99764
11/24/06 23:54
11/24/06 23:54
Joined: Jun 2005
Posts: 734
Under your couch
Silent_Assassin Offline
Developer
Silent_Assassin  Offline
Developer

Joined: Jun 2005
Posts: 734
Under your couch
amazing work

thx for this David


Visit us at www.m-tec-development.com WIP - Urban Conflict
Re: Ultimate Zelda lock on camera! [Re: Silent_Assassin] #99765
11/24/06 23:56
11/24/06 23:56
Joined: Feb 2005
Posts: 3,687
Hessen, Germany
T
Tempelbauer Offline
Expert
Tempelbauer  Offline
Expert
T

Joined: Feb 2005
Posts: 3,687
Hessen, Germany
yeah, looks really cool
i love the zelda games

Re: Ultimate Zelda lock on camera! [Re: Tempelbauer] #99766
11/25/06 02:39
11/25/06 02:39
Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
sPlKe Offline
Expert
sPlKe  Offline
Expert

Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
a very usefull contribution. i think if we work aroudn it a little,w e coudl implement it to any type of game. very usefull...

thanx^^

Re: Ultimate Zelda lock on camera! [Re: sPlKe] #99767
11/25/06 07:32
11/25/06 07:32
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline OP
User
DavidLancaster  Offline OP
User

Joined: Nov 2004
Posts: 862
Australia
Thanks for your comments, I appreciate them

If you want the camera to swing behind the player when you right click and no targets are around, make the following changes to line 83 of player.wdl:

Code:

IF (target_enemy == null) {
IF (temp.y > 0) {
IF (mouse_right == 1) {
camera_pan = move_variable(ang(camera_pan),ang(my.pan),20);
} ELSE {
rotate_entity(temp.x,200);
}
} ELSE {
IF (mouse_right == 1) { camera_pan = move_variable(ang(camera_pan),ang(my.pan),20); }
}
} ELSE {



Re: Ultimate Zelda lock on camera! [Re: DavidLancaster] #99768
11/25/06 07:38
11/25/06 07:38
Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
Drew Offline
Serious User
Drew  Offline
Serious User

Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
killer contribution!!!
Are the enemies supposed to animate or fight back? they are just standing in place...I would KILL for enemy AI in this...

again THANKS!


Drew Medina
Game Developer (Artist)
Personal & professional website
Deviant Art
My Blogspot
Re: Ultimate Zelda lock on camera! [Re: Drew] #99769
11/25/06 08:38
11/25/06 08:38
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline OP
User
DavidLancaster  Offline OP
User

Joined: Nov 2004
Posts: 862
Australia
Nope they are meant to be stationary. My concept is, that if you go through the Kingdom Hearts tutorial and understand it, you should be able to use the same programming path/concepts to create AI, it's just a matter of animating and moving an entity...

Re: Ultimate Zelda lock on camera! [Re: DavidLancaster] #99770
11/25/06 15:25
11/25/06 15:25
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline
User
Iglarion  Offline
User

Joined: Jul 2004
Posts: 785
Serbia
Great work David!!!

Thanks!!!

Re: Ultimate Zelda lock on camera! [Re: Iglarion] #99771
11/25/06 15:44
11/25/06 15:44
Joined: Aug 2003
Posts: 842
alabama
Drittz_Dourden Offline
User
Drittz_Dourden  Offline
User

Joined: Aug 2003
Posts: 842
alabama
Wow david! awsome contributation!!!!

Daniel

Re: Ultimate Zelda lock on camera! [Re: Drittz_Dourden] #99772
11/25/06 17:43
11/25/06 17:43
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Same here David !!
This is an exellent contribution

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Page 1 of 3 1 2 3

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