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.

Newcomers DBPro Corner / Difficulty in creating an .x file.

Author
Message
Geoff
16
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Sheffield (U.K.)
Posted: 31st May 2013 00:32
My version of DarkBasic Pro is 1.055.

Using spheres, meshes and limbs, I have written a program that produces 20 cannonballs in the shape of a pyramid.

But, when I call the function to create an .x file, the program creates the following "crash" file:-

[COMMON]
PathToEXE=C:\Users\Geoff\Documents\My Dark Progs\Three D\Cannon Balls - Copy\CrashOn_05_30_13.txt
[CEXE]
m_dwRuntimeErrorDWORD=0
m_dwRuntimeErrorLineDWORD=12

By trial and error, I have discovered that if I limit the number of balls to 10, an .x file IS created. But any more than that creates the "crash" file.

I attach my code below:-



Can anyone suggest how I can get the program to create an .x file for the total number of 20 cannonballs?

Regards, Geoff.
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 31st May 2013 15:39
Hi Geoff

The problem is the number of columns and rows that you are using in the make object sphere command. If you reduce this to then you can add more spheres into your canon ball pyrammid.

I don't know whether this is a polygon count problem or not, maybe someone else knows.

Personally, I wouldn't bother changing the row and columns from the default (and actually didn't know you could until i read this thread) as I don't really know why you'd want such a high poly count for an object like this.

Also, as an aside, you don't have to actually create 20 sphere objects and then 20 meshes and then delete them all. You could just create 1 sphere object and 1 mesh and then use the same mesh to create all the limbs you need.




Hope this helps

one of these days I'll come up with a better signature
Geoff
16
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Sheffield (U.K.)
Posted: 31st May 2013 17:42
Thank you, "29 games", for your help.
Your code solves my problem beautifully; and also greatly reduces the number of lines in my failed version.
I am now inspired to create a cannon, and maybe a castle.
I may be back.
Thanks again, Geoff.

Login to post a reply

Server time is: 2024-04-20 06:50:26
Your offset time is: 2024-04-20 06:50:26