Quick Search for:  in language:    
WHOLE,WALK,REAL,TIME,264KB,NOTE,NEED,RUN,COME
   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: 115. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic.
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 see a screenshot of this code!Game of life clone (cool math)
By Johannes B on 6/30

(Screen Shot)

String to CHR()
By Nikhil Raj on 6/30


Encryption Decryption Demo
By Nikhil Raj on 6/30


Click here to see a screenshot of this code!Serial Registration
By Christian (eXonite Team) on 6/30

(Screen Shot)

AniViewer
By Jerrame Hertz 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



 
 
   

SI'S DIRECT 3D PARADISE

Print
Email
 
winzip icon
Submitted on: 8/13/2000 6:16:09 AM
By: Simon Price  
Level: Intermediate
User Rating: By 34 Users
Compatibility:VB 5.0, VB 6.0

Users have accessed this code 15823 times.
 

(About the author)
 
     A WHOLE 3D PARADISE TO WALK AROUND IN REAL TIME!!! This is my first Direct3D program (apart from a plain cube). It demonstates lots of the basic stuff you need to use to make a Direct 3D program, such as : Z-buffering, texture mapping, matrices, polygon sorting and scrolling backgrounds. The 3D world includes a plane and a boat, and some trees. All this packed into a 264KB download! I made the trees using a trick I saw on the game Tombraider - they are 2D sprites which turn to face the camera! Even if this don't teach you much, you can at least have a laugh at the ridiculously low polygon count and cheap effects. NOTE : YOU NEED DIRECTX 7 INSTALLED TO RUN THIS! For the best performance, close all other programs and run "Si's 3D Garden.exe" (included). See "readme.html" for more information. Please COME BACK AND VOTE FOR THIS because I don't think anyone else has given up the source code for a whole 3D world to Planet Source Code!
 
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 31 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
8/13/2000 6:19:42 AM:Simon Price
Hello people
Sorry I couldn't 
include a screenshot, it made the 
upload too big and it wouldn't work. 
But once you see it in action, I hope 
you come back and vote 'cos this took a 
week of learning to make.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/13/2000 11:26:29 AM:WILKSEY
I havent seen it in action yet, but as 
it sounds so cool, i'll vote it 
excellent anyway, i'm sure it is as 
good as u say it is anyway.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/13/2000 5:01:34 PM:Habeeb
all i get is an automation error
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/13/2000 5:06:24 PM:Simon Price
Automation errors are to do with 
DirectX - either you haven't got the 
right version installed another program 
is stopping my program from using it, 
or you don't have enough memory. Or you 
don't have 16 bit memory (unlikely). 
Tell me more and I can help you fix it.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/13/2000 5:09:03 PM:Simon Price
By the way if someone does get this 
working please tell me so. It may help 
me fix the bugs. And I'd like some 
positive feedback for a change!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/13/2000 5:30:31 PM:Habeeb
I've got plenty of system power & 
memory and I *believe* I have dx7...but 
how do I check my version of direct x?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/13/2000 8:54:29 PM:xXx_VipeI2_xXx
Automation Error here too =/
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2000 3:25:11 AM:Nathan Chere
Wilksey- are you mental voting before 
you download it?
Otherwise, nice code 
Simon.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2000 3:38:04 AM:Simon Price
Thanks Nathan, I'm glad my code worked 
for someone. At least this proves that 
it is a compatabilty problem. I just 
found out that I have DirectX 7a? Maybe 
I am using a feature new to version 7a?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2000 4:16:35 AM:Da_Mental_One
That is way Kewl!  I like it!!!  Got a 
full 5 globes from me!!! :)  I kept on 
crashing into to house tho...  Made me 
feel like I had x-ray specs on... LOL  
Keep up the gr8 work Budski!!! :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2000 5:03:04 AM:Rik
The problem may well be Windows 2000 
related - for the most part, anything 
written in DirectX 7.0a with VB doesn't 
run properly on Windows 2000 (according 
to Microsoft's web site - 
http://msdn.microsoft.com/msdn-online/sh
ared/comments/threadedcomments.asp?cID=1
2219&aID;=2063)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2000 6:33:35 AM:Simon Price
Well done Rik, thanks alot!!! So there 
you have it people, THIS DOESN'T WORK 
WITH WINDOWS 2000 (before I get anymore 
complaints). Sorry, there's nothing I 
can do about that, if you have Win2K 
then tough.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2000 6:34:21 AM:Rik
Sorry, just to add - the error I get 
refers to DDERR_NOTEXTUREHW - this 
means that no texture-mapping hardware 
is available or present. Any ideas Si ??
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2000 8:23:43 AM:Richard Hayden
I get automation errors ONLY when 
running it from the exe. NOT when 
interpreting it in the IDE. I'm using 
Win98SE DX7.0a.
My problem is that, 
yesterday I ran your prog and it worked 
fine, but today when I run it says, 
Invalid procedure call or argument, 
highlighting the line of code, 
"DX3DDEV.SetTexture 0, Tex(TEX_WALL)". 
I expect I'd get the same error on your 
other DX3DDEV.SetTexture() calls. I've 
NOT edited your prog in anyway, and it 
worked fine, until today.
*** I did 
install the DirectX7.0 SDK yesterday 
evening, but I don't think that should 
cause any problems. ***
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2000 10:02:35 AM:jparks
You can check your DirectX version by 
typing dxdiag at the Start/run prompt.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2000 10:52:19 AM:Rik
Ok - last thing !! It does work on 
Windows 2000 - but it seems to depend 
on your graphics card !! Some graphics 
cards will not support the DirectX 
texture calls - hence the Automation 
errors. Therefore, it will work with a 
Matrox G200 - but not with a NeoMagic 
256AV. And that's that !!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2000 11:46:49 AM:PhoenixX_2@yahoo.com
Hey i get an automation error too.  But 
it's the :  DDERR_NOTEXTUREHW  wich is, 
I DON'T KNOW.  I have no 3d acc card 
btw...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2000 1:19:56 PM:Simon Price
Thanks for all the feedbakc people, 
Planet Source Code is a good testing 
ground. Next time I make a Direct3D 
prog, I'll include LOADS of error 
handlers, especially the one for if 
you've got no texture mapping hardware! 
I'll try to make a new program using 
all the feedback you've given me. 
Thanks for the excellent votes but 
please note that while the program 
works excellent for some, it' don't 
work at all for others. The moral of 
the story is don't go learning all that 
fun texture mapping stuff without first 
learning the basic error handling stuff!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/21/2000 6:31:45 AM:Marc Burgess
Sounded good, but dosn't work for me... 
Does this NEED hard ware to work then, 
because I did a program like this abit 
ago, that didn't have textures, and 
that worked fine.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/22/2000 11:00:24 AM:Kenneth Gilbert Jr.
The code worked flawlessly.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/4/2000 2:22:33 AM:Daniel Davies
Worked excellent for me :o) Great 
Work...Again!!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/5/2000 9:44:29 PM:Rich
It worked excellent for me after I 
updated to DX7a.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/7/2000 1:47:13 AM:NLS - Nonlinear Solutions
Nice job. I gave you four globes. And 
... a low polygon count is considered a 
*good* thing. On the other hand: "I 
don't think anyone else has given up 
the source code for a whole 3D world to 
Planet Source Code"? Check out Eye3D 
source just to make sure. ;-)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/7/2000 9:11:31 AM:Digital Vampire
I get Automation error too
I'll be 
back later with the details
of the 
code part it errors out on !
I am 
Using DirectX 7.0a since I 
Downloaded 
it just so I can try this
Code. 
However I have a distinct feeling 
this
may be caused by the lack of 
HardWare
Acceleration .. not sure tho .
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/8/2000 8:54:01 AM:Jason Foral
I get Run Timer Error, '5'
I have 
DirectX7.
What can be wrong?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/9/2000 1:45:44 PM:lord_illogical
i added an error trap to sub 
RenderScene and found i get an 
automation error on this line 
:
DX3DDEV.DrawPrimitive 
D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX, 
vEwall(0), 5, D3DDP_DEFAULT
drawing 
side walls, any ideas ?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/9/2000 2:03:14 PM:Simon Price
TO ALL PEOPLE WHO HAVE HAD PROBLEMS 
RUNNING THIS : TRY EDITING THE PICTURE 
FILE "sidewall.jpeg" TO MAKE IT A SIZE 
OF 256 X 256 PIXELS. THIS WILL FIX THE 
GAME IF YOUR MACHINE HAD PROBLEMS WITH 
NON-SQUARE OR LARGE TEXTURE MAPS. IF 
THIS WORKS FOR YOU, PLEASE TELL ME SO 
THAT I AND OTHERS KNOW FOR NEXT TIME 
SOMEONE MAKES A DIRECT3D PROGRAM. 
THANKS FOR ALL THE VOTES TOO.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/9/2000 2:05:02 PM:Simon Price
ALSO EDIT "SKY.JPEG" TO MAKE THAT 
SQUARE TOO. MAKE EVERYTHING SQUARE AND 
256 X 256 AND IT SHOULD WORK. I MIGHT 
RELEASE A BETTER PROGRAM SOON THAT IS 
COMPATABLE WITH MORE PC'S, AND HAS MORE 
ERROR HANDLING CODE.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/11/2000 12:31:08 PM:Richard Hayden
I'm using a 950Mhz, 256Mb RAM, GeForce 
II, 64MB GTS graphics and I get 
automation errors from a compiled exe 
and an interpreter error when 
interpreting which looks like 
this:
"Invalid procedure call or 
argument" and it 
highlights:
"DX3DDEV.SetTexture 0, 
Tex(TEX_WALL)"
It seems like it 
could be good, if it worked, though!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/11/2000 2:31:35 PM:Richard Hayden
RE previous e-mail:
Yeah, I will try 
and sort 'SetTexture' etc. myself, but 
when it does work, it must be the best 
bit of Direct3D I've seen on PSC 
VB!(I've tried it on my 200MHz and it 
works, albeit slowly, but it works!). I 
haven't seen anything as good as it in 
any open source VB site I've been to, 
not that I've been to many! I'm sure 
with work you could make a dámn good VB 
based game (shoot 'em up), probably one 
of, if not the best VB game ever made. 
I'd like to try and get it to work so I 
can make use of this excellent Direct3D 
example.
Thanks again for sharing 
this excellent piece of code and your 
interest in user feedback and problems.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/12/2000 6:41:07 AM:Neil Ramsbottom
Has anyone had any trouble running this 
on W2K Advanced Server?
Does it work 
with a Voodoo3 for anyone else?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/15/2000 2:59:21 AM:ecko
works on my win2k
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/19/2000 1:32:26 AM:josh
for those interested in vb games should 
take a look at vbgaming.com
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/21/2000 10:14:13 PM:CoryUlui
I'll vote for you not because you said, 
(which was a silly thing to do)... but 
because ur code rocks..... tell the 
truth now where'd u get it from... LOL
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/26/2000 2:29:21 PM:Richard Hayden
Just back to say that over a month 
after I downloaded this, I am still 
amazed at what can be done with VB in 
Direct3D! I never this type of 3D 
program was possible in VB, but I was 
proved wrong!
Thanks, Again.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/28/2000 5:56:24 AM:Sauron
This code is cool and it worked on my 
system as soon as I tried it.
This is 
the best code I have downloaded of 
PlanetSourceCode.com yet :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/28/2000 11:11:45 PM:Jason Brimblecombe
Excellent! I am really interested in 
this sort of stuff, so could you tell 
me how you learnt to do it? E-Mail me 
sometime! jbrimble@vbcity.net
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/15/2001 3:52:14 PM:Michael Barnathan
I must say, well done. 5 Globes from 
me. And it does work with WinXP, 
although it might not work with 2k.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/20/2001 5:40:25 PM:Bill Gates
Kinda slow... Great *Cough*
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/1/2002 11:02:59 AM:Skitzo Monk
I got it working briliantly, the only 2 
things that wudda made it better was, 
better artwork and  the option to turn 
while moving forward
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/31/2002 4:05:17 PM:Jacob Roman
AWESOME!!! But there where some 
collision detection problems. I had to 
practically shake myself pass the 
trees. Besides that, it ruled!!! 5 
globs of goop from me dood!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/3/2003 10:20:09 PM:
I havent downloaded this yet, but i've 
noticed many people say that they are 
having automations erros and not 
specifying that they have win2k. 
You can sometimes get an automation 
error in dx if your bit depth and 
resolution is not correct, try 
adjusting that!
Peace!
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.