Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / SniperZoom Sample

Author
Message
Dark Intruder
19
Years of Service
User Offline
Joined: 6th Jan 2005
Location:
Posted: 7th Jan 2005 23:22
Hi All,
this is a port of Ben's SniperZoom code snippet for DarkBAsic redone and enhanced in DarkSDK.

the attached rar file has the code and some screenshots

NO ZOOM


ZOOM (on the same scene)


The code can also be downloaded from

http://www.geocities.com/standard_template/darkSDK/SniperZoom.rar

the original DB code is from http://www.binarymoon.co.uk/index.php?page=games/code.htm

In Order To Understand Recursion One Must First Understand Recursion

Attachments

Login to view attachments
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 8th Jan 2005 20:33
I presume you just move the camera further on from its current position.

Visit http://homepages.nildram.co.uk/~nickk/
I have no signature.
Dark Intruder
19
Years of Service
User Offline
Joined: 6th Jan 2005
Location:
Posted: 8th Jan 2005 23:32
no zooming is not moving the camera, rather changing the FOV... Field of View... it is the oldest zooming trick in the book...

now to enhance this you can add an overlay with the sniper scope marks..

In Order To Understand Recursion One Must First Understand Recursion
DeHonCha
19
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 28th Jan 2005 21:08
can you make it in .zip file format PLEASE

For when they said I couldn't, I did...
Dark Intruder
19
Years of Service
User Offline
Joined: 6th Jan 2005
Location:
Posted: 29th Jan 2005 06:50
download winrar from www.rarlabs.com

In Order To Understand Recursion One Must First Understand Recursion
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 29th Jan 2005 06:56
Its free for 30 days.

Visit http://homepages.nildram.co.uk/~nickk/
Questions are a burden to others, answers a prison for oneself.
billy the kid
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 29th Jan 2005 07:03
Actually its free all the time, at least for me. It just pops up with this "please buy winrar". I just ignore it. I dont know maybe I have reduced functionality but I dont notice it. And no I dont have warez version or anything.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 29th Jan 2005 07:06
Yes, I forgot to mention the nagging message.

Visit http://homepages.nildram.co.uk/~nickk/
Questions are a burden to others, answers a prison for oneself.
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 29th Jan 2005 07:40
Quote: "I presume you just move the camera further on from its current position."


Yeah, if you did that then the zoom may go through objects, which you don't want.

Isn't it? Wasn't it? Marvellous!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 29th Jan 2005 19:52
In which case you would look to see if there is anything in the way...

Visit http://homepages.nildram.co.uk/~nickk/
Questions are a burden to others, answers a prison for oneself.
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 29th Jan 2005 22:46
Lol, and do what? Stop the zoom ?

Isn't it? Wasn't it? Marvellous!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 30th Jan 2005 02:27
Originally I though it worked by seeing if there are any objects between the current position and the current position + maximum zoom distance. If there isn't then move the camera to the maximum position. If there is, move it to the nearest object - a bit so its fully visible.

Visit http://homepages.nildram.co.uk/~nickk/
Questions are a burden to others, answers a prison for oneself.
billy the kid
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 30th Jan 2005 03:06
That probably could work. But I think if all you have to do is change FOV, then its a lot easier and far more efficient.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 30th Jan 2005 03:54
Indeed

Visit http://homepages.nildram.co.uk/~nickk/
Questions are a burden to others, answers a prison for oneself.
DeHonCha
19
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 31st Jan 2005 02:40
so is winrar 30 trial or not?

and wot's wrong with winzip? how's is winrar better?

also - anybody know why dgame sdk has to have such high specs?

For when they said I couldn't, I did...
billy the kid
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 31st Jan 2005 04:02 Edited at: 31st Jan 2005 04:03
DirectX 9 has high specs, DGSDK is basically just a DirectX wrapper.

And winrar is less buggy, handles more file formats than winzip, and can compress more than winzip.
Dark Intruder
19
Years of Service
User Offline
Joined: 6th Jan 2005
Location:
Posted: 1st Feb 2005 06:56
since every one is interested let me detail how zooming is done...
a) do NOT move the camera ... ever.
b) A nice and simple zooming effect is achieved by changing the FOV... since DGSDK automatically adjusts the aspect it is fine and dandy however..if you were implementing zoom in your own engine... remeber to adjust the aspect ratio accordingly...

In Order To Understand Recursion One Must First Understand Recursion
CHECK
19
Years of Service
User Offline
Joined: 15th Dec 2004
Location:
Posted: 9th Feb 2005 02:34
i agree the FOV is the better way to do zooms

CHECK

Login to post a reply

Server time is: 2024-03-28 19:46:11
Your offset time is: 2024-03-28 19:46:11