This site is no longer active and is available for archival purposes only. Registration and login is disabled.

shooting in 3d


shooting in 3d

Postby brendan » Oct 25, 2002 @ 12:32am

Hi all, I'm working on a new game, with some 3D elements, example here

http://www.ozcreations.com.au/screenshot.jpg
(comments welcome)

Anyhows, the landscape in this pic is built on x,y co-ords that are created using info like texture, height, solid. So to reference an xyz point on the map it would be somthing like map[x][z].hieght or (y) etc...

anyhow I'm now starting to fire bullets around, and what I "think" is the best way to do this is via vectors x,y and z, these are set by the player in the bottom right of the window (red dots)... so the bullet starts with these vectors, then to calc its next position I just add the vectors etc, take into account the gravity and wind etc!

for checking that it has hit the ground or player I could do a simple check like is the height at x,z higher than the bullets y co-ord etc, but if the bullet it fired along the ground it could detect a hit a fair distance after "penetrating" land

has anyone played around in simillar situation before?

should I calculate all pixels in the bullets path? or each sub section (frame)?

I was hoping to calculate each sub movment because I'm going to have "live" wind, so it will effect the bullet in real time!

-anyhows comments, suggestions, code whatever are welcome!
p.s the sheep probably wont feature in the final ;-)
User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby brendan » Oct 25, 2002 @ 4:35am

User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby jont » Oct 25, 2002 @ 10:24am

User avatar
jont
pm Member
 
Posts: 122
Joined: Jul 16, 2002 @ 5:12pm
Location: Leeds, England


Postby brendan » Oct 25, 2002 @ 11:25am

User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby refractor » Oct 25, 2002 @ 12:09pm

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby Malmer » Oct 29, 2002 @ 2:53pm

Interesting shot. Do I sence a little bit of Argentum in there. I mean how the maps are rendered... ;)

Good luck with the development!
All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Postby brendan » Oct 30, 2002 @ 12:42am

User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby Malmer » Oct 30, 2002 @ 2:19pm

All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Postby brendan » Oct 31, 2002 @ 7:15am

User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby refractor » Oct 31, 2002 @ 9:21am

(Thinking out loud here 'cos I've only just got up).

Brendan:

If your map doesn't scroll:
you could calculate a static screen-sized z-buffer from the viewpoint to the terrain and use that when plotting objects.

If your map scrolls:
then you could compute a mini z-buffer for your plot area at run-time... it would be costly, but you're probably not plotting all that many objects. If you cut the screen into "sectors" you could cache the mini-z-buffers.
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby brendan » Nov 25, 2002 @ 5:22am

User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby refractor » Nov 25, 2002 @ 11:01am

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


More on Z-Buffers

Postby Conan » Nov 26, 2002 @ 2:27pm

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron