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 / im very new so im gonna ask very simple question

Author
Message
RisTar
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location:
Posted: 6th Mar 2003 00:34
im very very new at darkbasic !
i have some questions

i write this stupid code

rem display
SET DISPLAY MODE 800, 600, 0
rem load kiko
LOAD OBJECT "modelfile$/akiko.3ds", 1
rem show object
SHOW OBJECT 1
do
loop

but i cant see the model on the screen ! some one can tell me how to do that ? just load the object and actually see him , thats all !
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 6th Mar 2003 00:46


I am not sure what u mean byt that modelfile$, if the above doesn't work, just put the model into same directory and put

LOAD OBJECT "akiko.3ds", 1

cheers.


Toughest line of codecol$=asc(left(Pcol$)),1+str$(rev)+chr(80)+left(right(mid(name$),1),1)
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 6th Mar 2003 00:48
Here's my model viewing code:



Assuming you are loading the model from the right place, and that the model is scaled properly (remove the ` on the scale line to scale the object, and also change the values to see the effect) this should load a model and allow you to rotate round it using the mouse. Also the matrix provides a handy scale guide as well.

You don't need show object, when objects are first loaded they should be visible by default. Maybe you need some sync commands, to update the screen and see the model. Maybe you need to position the object and camera so you can see the object. Maybe you need to scale the object so it is big enough to be seen.

Once I was but the learner,
now, I am the Master.
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 6th Mar 2003 01:16
lol, cmon Darthster, You make everything seem so complicated


Toughest line of codecol$=asc(left(Pcol$)),1+str$(rev)+chr(80)+left(right(mid(name$),1),1)
TogaMario
21
Years of Service
User Offline
Joined: 30th Jan 2003
Location:
Posted: 6th Mar 2003 04:22
In other words, if you're just loading the object, chances are, your camera is inside the model, and therefore, you won't be able to see it. Try putting



in your code, and you should be able to see it ... i think ...

P.S. This is what the alphabet would look like if Q and R were eliminated.
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 6th Mar 2003 05:01
um, that's why we have autocam on...

It automatically positions your camera to see the object, unless it's huge, or wasn't modelled at 0,0,0 position.


Toughest line of codecol$=asc(left(Pcol$)),1+str$(rev)+chr(80)+left(right(mid(name$),1),1)
TogaMario
21
Years of Service
User Offline
Joined: 30th Jan 2003
Location:
Posted: 6th Mar 2003 07:15
Autocam ... hmmm, i'll have to look into that, lol. I believe my code since Hello World has had Autocam Off, and now I know why

P.S. This is what the alphabet would look like if Q and R were eliminated.
RisTar
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location:
Posted: 6th Mar 2003 08:49
k this is the story
ive used TheDarthster code and i was able to see it
but the model was so small and i barely saw it
so i need a code that explain how to see it larger
and i need another thing ! i got TGA skins files
how can i see it with skins ????

John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Mar 2003 14:03
For your small model, try scaling it. If you have UV mapped the model, bring the bmp's into your project folder and just load them into your game and texture object.

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy! Oh ya, and Tat has a plugin for that!
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 6th Mar 2003 19:09
In my code there is a line:

`scale object 1,1000,1000,1000

remove the ` from the line to activate the command, which will make your object 10 times bigger. You can also change the values from 1000 to anything you want, so long as you bear in mind 100 is the default size that it loads at. Putting 10 in each bit will make it 10 times smaller, and putting different values in each will scale it differently in different dimensions, try it to see.

PirateSS, tell me what in my post was complicated?

Once I was but the learner,
now, I am the Master.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Mar 2003 19:41
I suspect that was a joke

Just an explanation of the numbers in Darths last post - the 1000 is specifying a percentage, so 100 is normal size, 1000 is 10 times bigger, 50 would be half the size etc.
RisTar
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location:
Posted: 6th Mar 2003 19:46
k i did that and i put the skin tga file too !
but the model is so darkk that u can barely see something !

so now i need to know 2 things !
how to make the model look better , and the hard part !
how to make it move !!!!!
plz keep helping me ppls ! im very thankfull for ur help

John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 7th Mar 2003 00:18
Cant really do much about making it look better- did you model it- if not, where did you DL it from?

To make it move, look into the MOVEMENT tuts in the tutorials that came with DB.

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy! Oh ya, and Tat has a plugin for that!
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 7th Mar 2003 00:21
My models always load dark in DBPro (hence 'dark', lol). I find a way that works is to load the texture separately as a bitmap and then texture the object at run-time.

Making the object move is the easy part! Or, the hard part depending on what you want to do with it. Have a quick look in the help for the following commands: MOVE OBJECT, POSITION OBJECT, ROTATE OBJECT, YROTATE OBJECT, PLAY OBJECT, LOOP OBJECT. Start by rotating the object with YROTATE OBJECT, and moving it with MOVE OBJECT. Then you might try putting NEWXVALUE and NEWZVALUE (look in the help) into variables, and using these variables to position the object, using POSITION OBJECT.

The caps aren't meant to be loud, it's just so you can tell which bits I typed are actual valid commands.

Once I was but the learner,
now, I am the Master.
Mike Inel
21
Years of Service
User Offline
Joined: 14th Feb 2003
Location: Sa upuan ko po...
Posted: 7th Mar 2003 09:11
Jus' wonderin' why the "Set Display Mode" is on 800,600,0? Isn't suppose to be something like 800,600,16? or 800,600,8? And why do you have to write there "Show object 1" while you didn't hid it?

.....
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 7th Mar 2003 16:58
Complicated: Writing a lot of lines for a simple exercise... Espesially in the newcommers corner.(No offence)


Toughest line of codecol$=asc(left(Pcol$)),1+str$(rev)+chr(80)+left(right(mid(name$),1),1)
The admiral
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 8th Mar 2003 05:14
SET DISPLAY MODE 800, 600, 0<<<<<<whats the zero for dude u cant do that it needs to be 16,24 or 32 that might help.
o0o0The Code Keeper0o0o
21
Years of Service
User Offline
Joined: 3rd Mar 2003
Location:
Posted: 8th Mar 2003 21:01
Hey,
RisTar, you need to go and jess read the tutorials man, no offence, but to be a good programmer you're going to have to work at it, i know i'm not concidered a good programmer, but i'm a moderate one, and you jess have to practice practice practice...that's the only way...

Login to post a reply

Server time is: 2024-09-19 22:26:52
Your offset time is: 2024-09-19 22:26:52