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.

DarkBASIC Professional Discussion / I am new to Dark Basic and I have a quick (and simple) question.

Author
Message
medsouz
16
Years of Service
User Offline
Joined: 10th May 2010
Location:
Posted: 11th May 2010 01:46
I was wondering if anyone could tell me how to resize my "object" here is my code:

load mesh "F22.x",1
load image "F-22.bmp",1
make object 1,1,1




Is there anyway I can enlarge the object?
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 11th May 2010 02:30
Look up Scale Object objNo,xSize,ySize,zSize in the help files (Commands -> Basic 3D -> Object Commands)

Hope that helps

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 11th May 2010 14:28
Why load the object as a mesh, then convert it to an object? Why not simply load it as an object...


My signature is NOT a moderator plaything! Stop changing it!
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th May 2010 15:38
Yeah, the only benefit in loading the mesh would be if you wanted to create lots of F22's as single limbs, which you probably don't. If you wanted to have enemy planes, you could just load one in and instance or clone that object to make new ones. Meshes are usually used when making a model from memblocks (from scratch) or when adding meshes to an existing object.

I'm not sure if it's clear why loading as a mesh is an issue - but the main problem is that a mesh is just that, a single mesh. If your plane has moving parts, flaps, rudders, foldy wheels, cockpit, or if it uses more than one texture file, or if it's animated in any way, then you will have major issues - a mesh is a single object, no limbs, and can only have 1 base texture applied to it. You can of course have shaders etc, but you couldn't for instance, have a different texture for the cockpit than the rest of the plane.

Anyhoo, just making that clear, not trying to lecture you - best to use the right methods from the outset with this stuff, in this case it's actually less work and less hassle to just load the model right in.


Health, Ammo, and bacon and eggs!
medsouz
16
Years of Service
User Offline
Joined: 10th May 2010
Location:
Posted: 12th May 2010 00:31
Thanks for the help, I just downloaded DarkBASIC Pro when I posted this and after 2 and a half hours I succesfully made a game where you fly a plane over a field, I plan to make a good flight simulator once I learn more about DBPro.


Also, Van B you gave me an idea! I could animations as different parts instead of figuring out how to skeleton animate a plane body, thank you!

Login to post a reply

Server time is: 2026-07-26 04:28:05
Your offset time is: 2026-07-26 04:28:05