Quick Search for:  in language:    
Version,Richard,Haydens,D3DWorld,great,improv
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,011,557. lines
 Jobs: 117. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic.
Click here to see a screenshot of this code!A Simple Database WIth XP Design ( Without XP )
By Osen Kusnadi on 7/1

(Screen Shot)

Fractional Addition
By SAEED HASSAN on 7/1


Defrag at certain time
By Michael Nipper on 7/1


Click here to see a screenshot of this code!Extended Find Ver 2
By Roger Gilchrist on 7/1

(Screen Shot)

Y! Module
By NightCrawler on 7/1


Files Comperator (the right way)
By Jarry Claessen on 6/30


Simple UDP example
By Mick Walton on 6/30


CAPS Trigger
By Trevor Burley on 6/30


Auto clip picture
By Kenneth. Jakobsen on 6/30


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

D3DWorld Version 2.0 (Direct3D 8)

Print
Email
 
winzip icon
Submitted on: 12/17/2000 5:52:19 AM
By: Rich Hayden  
Level: Intermediate
User Rating: By 45 Users
Compatibility:VB 6.0

Users have accessed this code 13460 times.
 
(About the author)
 
     Version 2.0.0 of Richard Hayden's D3DWorld is a great improvement on version 1 (D3DScene) of my Direct3D 8-based 3D world. Lighting is now used in many shapes and forms to enhance this scene. I have also improved the program, making it more efficient and it runs slightly faster. I have added a church-style building to the world (complete with stained-glass windows), which looks pretty effective. Six times of day are now simulated realistically using lighting. The screenshot below was taken when the time of day was set to evening. Next I hope to add collision detection and transparency and billboarding, to simulate objects like trees etc. If anyone can help with the collision detection and transparency areas, then please do. (r_hayden@breathemail.net). I also hope to make a more realistic sky. So look out for any proceeding versions! Please vote and/or provide feedback in return for me making this code available to you! On my last submission I was quite dissapointed that out of about 400 visits, there were only 4 votes and about 2 feedbacks, apart from my own 2 comments. Really, the least people can do for developers who put up their code here for free, is to rate it!

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzipto decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 6 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
12/17/2000 9:02:36 AM:Krishna Rath
wow! another teen from England doing 
great work. 
Nice game, though my 
P-166 could not play it well.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/17/2000 9:05:21 AM:Krishna Rath
why do you want useless comments like 
this?? I mean you said only 4 feedbacks 
were posted on your last submission. 
Most of us download and then forget 
to vote, and the feedback is only if 
you have understood the code/ or the 
code has blown off the comp.
keep 
coding...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/17/2000 10:31:29 AM:Jeremy Hope
how come some of the project libraries 
are missing, like Direct3DVertexBuffer8?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/17/2000 11:35:48 AM:Kurt Maine
Hey, Love your idea of making an 3d 
world! ive actually been in one of 
those for a year or so now, if you need 
any more ideas goto activeworlds.com, 
its a 3d universe with many diffrent 
worlds, i would love to make a 3d world 
but just dont understand the whole 
direct3d8 stuff :( anyway Excellent Job!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/17/2000 4:10:53 PM:Simon Price
Yes, a great improvement, 5/5 from me 
again. I'm going to start learning DX8 
now and you've given me a great example 
to learn from. So when I make 
something, I'll remember to credit you. 
One problem, I couldn't see the house 
light, the search light or the green 
glow. Are those features you've yet to 
add? I hope you get more votes, I seem 
to remember my 3D world getting loads 
of votes and it wasn't anywhere near as 
good as this.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/18/2000 7:47:57 AM:Krishna Rath
Nice feedbacks..Richard leanred from 
Simon and Simon learns from Richard and 
I donot understand a word of DX!!
Why 
not you both make a VB NFS?? 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/18/2000 11:24:01 AM:Chris
Hey Rich,
Looks really good. I can't 
see any of the lights either, must be 
this piece of junk I work with. I'll 
send you a collision detection scheme 
shortly.
A 5 from me...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/18/2000 12:39:04 PM:Richard Hayden
Thanks everyone for all of your 
comments & votes! I should have 
responded to everyone up to this 
point 
with thanks for votes etc. If I 
haven't 
then do please remind 
me!
If you are confused about the 
lighting or it doesn't seem to work, 
make sure you have changed to evening, 
dawn, dusk, or night mode (the best to 
see it) and then turn on the house 
light, church glow (only on one side!) 
or search light. You can't see it in 
midday 
mode! (It's too 
bright!).
If they still don't work 
for anyone, please contact me (feedback 
here will do). It could, although I 
doubt it, be something to do with your 
graphics card etc...... If the time of 
day settings work, ie. you have the sun 
and the moon (yellow and white light 
emissions) in one of the top corners 
then the other lights should work, you 
just need to be in a dark enough time 
of day.
Once again thanks & 
regards,
Richard 
Hayden.
(r_hayden@breathemail.net)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/18/2000 1:37:06 PM:Simon Price
Krishna, what an NFS? OK idea about me 
& Richard teaming up but I think he's 
happy making his world as it 
is.
Chris, I'm interested in collision 
detection too, if you or Richard could 
send it on that'll be great.
Richard, 
as I said in my email but I'll say it 
to everyone else who can't see lights : 
I changed the vertex processing to 
software since I don't have the 
hardware, this probably effected the 
lighting. Is there going to be a 
version 3?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/18/2000 1:49:57 PM:Richard Hayden
Simon you're right. Lighting doesn't 
work on software vertex processing. If 
anyone has anyway around this, ie. 
getting lights to work with software 
processing, please say! Sorry all of 
you out there who can't see my lighting 
effects. I think it may be to do with 
texture and lighting engines on 
graphics cards, which are obviously not 
used in software mode. I currently have 
plans to release a version 3 and 4 
maybe......... Hopefully I can 
implement col. detection in one of 
those.......
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/18/2000 3:02:06 PM:Richard Hayden
Hi everyone, me again. If you are 
having trouble with lighting, try 
using
D3DCREATE_MIXED_VERTEXPROCESSING 
in place of 
D3DCREATE_SOFTWARE_VERTEXPROCESSING. 
I'm not sure what this flag exactly 
does to the vertex processing, but I 
guess it mixes between hard and 
software processing (don't know how or 
why). See if you can use lighting then. 
I'm not saying it will let you, I don't 
know yet.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/19/2000 12:56:11 AM:Jacob Allred
reminds me of the good ol' days when 
AlphaWorld was free (more commonly 
known as ActiveWorlds now) and VRML 
based activities were the big thing... 
anyways program looks great. good job.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/19/2000 10:58:33 AM:Rik
great.  But your textures look 
'oribble.
You need bigger ones or 
something, the all mulsh together and 
patternise.  Look at the house, on that 
pic, the walls all look messed up and 
bulgy.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/19/2000 6:33:51 PM:Utopian Monarch
Wow, cool. More people who know about 
ActiveWorlds. Is there a tutorial or 
anything where i can learn directx (and 
direct3d) at? I've always wanted to 
learn how to do that. Screenshot looks 
great.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/21/2000 4:25:05 AM:Nathan Chere
Nice code. I myself downloaded the 
DX8SDK and have been working flat out 
on designing a flashy intro for my RPG 
Catalyst but I have had tonnes of 
trouble with various things and looking 
at your code has helped heaps. 5 
globes!
Oh yeah Simon, I think in 
NFS he was talking about Need For Speed 
but that game su©ks balls anyway so 
don't bother :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/21/2000 1:04:05 PM:Amo
Hi, im a newbie to Direct X based vb 
programming so I was wondering if you 
could help me make a program like the 
one you have submitted? e-mail me at 
amarjit_chohan@hotmail.com
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/21/2000 4:18:22 PM:Ace315
I get "Unable to CreateDevice (see 
InitD3D() source for comments)" when I 
run it, I have a bad video card... 
would that be why?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/22/2000 5:26:21 AM:Richard Hayden
Hi all, if you are having problems 
creating devices, please wait for the 
next version. This has device 
enumeration and the option at the 
beginning of the program to select 
between HAL and REF modes and also 
software/hardware vertex 
processing.
Then, you can modify my 
program to work with your system setup 
without changing the source.
For the 
moment, try reading thesource and 
following the various guidelines, ie. 
changing HAL to REF and hardware to 
software vertex 
processing.
Thanks,
Richard 
Hayden.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/29/2000 3:58:55 PM:Mark Withers
The res sqrews up!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/8/2001 12:03:50 PM:Richard Hayden
Wow, I never thought I would get code 
of the month!!! Well, thanks to all who 
voted and provided feedback, look out 
for version 3!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/12/2001 10:02:29 PM:jdchristo
Very nice!  I have been looking for 
something like this to help show me the 
differences in dx7 and 8.  i am 
currently writing a flight sim.  
Anyhow, thanks for the source!  also, 
try inserting these two lines to 
improve the quality of the textures.  
what they do is some blending of pixels 
or some such thing.  all i know is they 
work...  :-)
g_D3DDevice.SetTextureStageState 0, 
D3DTSS_MAGFILTER, D3DTEXF_LINEAR
g_D3DDevice.SetTextureStageState 0, 
D3DTSS_MINFILTER, D3DTEXF_LINEAR
Jon 
christopher
PS: can't wait for 
version 3 and collision detection! :-)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/13/2001 6:39:25 AM:Mike Canejo
Those two lines did the trick, this 
looks much better!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/16/2001 4:12:11 PM:Tim
Also cannot create a device for me too. 
I first started running on a customized 
card and thinking that was the problem 
tried on an nVidia TNT2 M64 and a plain 
TNT model......? They're kind a popular 
graphics sets your missing!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/19/2001 10:26:42 AM:kirk
great example.. well 
documented!
thanks for sharing!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/25/2001 1:54:59 AM:Beuno
good work, keep it up  ;)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/25/2001 9:53:49 AM:Richard Hayden
Thanks everyone for the votes and 
feedback. I am currently well on the 
way to completing version 3, but have 
unfortunately been slowed slightly by 
school work. Version 3 should be a lot 
more reliable and work on a LOT more 
machines, without those 'cannot create 
device' problems and problems with 
lighting.
Once again, thanks!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/25/2001 1:41:03 PM:Tim Roop
Very Impressive work. I'm just getting 
into DirectX and this gives me the 
opportunity to experiment. 5 from me!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/6/2001 2:58:45 PM:Soul
Hey great game, I wish to know where to 
learn , I want to make 3D games with VB 
and Im like not good at it, where can i 
learn more on DirectX please help  me, 
email me at e_man_dan@hotmail.com please
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/19/2001 1:08:52 PM:Codin Genius
Very cool but the search light, errie 
glow, houselights and sun/Moon dont 
work 4 me. Still, I like it, Im just 
kearning DX 8 though so...Phew...Ill 
wait a bit before I even attempt to 
understanfd the code. 1 Globe I 
think.
SYKE, Only j/k 5 Globes/
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/21/2001 4:54:33 PM:Brad Harper
I feel that this code is well commented 
and easy to learn from. I especially 
like the picture of the gorilla inside 
the building. Nice work. This type of 
submission provided me with an idea of 
the real "power" of VB and DirectX8...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/10/2001 7:28:36 PM:Serberus
NICE CODE  this has helped me a lot on 
my DX game.I am having problems running 
this in the VB Design Environment, I 
had to changed the D3DDevice to 
software and D3DDev to REF so it starts 
up but I cant move and VB6 stops 
responding. Can u send me an EXE at 
Dephi10000@aol.com Thanks.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/10/2001 1:03:28 AM:Andres Zacarias
Nice code, isnt there around any 
terrain code?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/12/2002 7:58:21 PM:Michael Manning
Why do I keep getting "Unable to 
CreateDevice (see InitD3D() source for 
comments)". 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/20/2002 3:50:16 PM:alaina
Great code, it was very helpful. I am 
working on my own 3D game so any 
feedback from anyone would be helpful, 
also if someone would like to send me 
collision detection that would be great 
thanks a lot!! email @ 
alaina_g_@hotmail.com
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/14/2002 8:19:38 PM:VPUCEO
Awesome code man! Definitely a 5/5 from 
me
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/17/2002 2:54:33 PM:
Very nice piece of code, a great help 
for me learning the basics of the Dx8 
system. Now lets see... how to drive 
Young Shamus and E N Z O nuts by making 
something better than Active 
Worlds...
Oh, 5 stars by the way 
:)
- Mark
- Strike Rapier in Active 
Worlds
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/14/2003 1:03:28 AM:
I Didn't see the code yet
but i seen 
the first sample i like this both
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.