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 / Much help needed (mutliple questions)

Author
Message
cyangamer
16
Years of Service
User Offline
Joined: 2nd Jun 2008
Location: Houston, TX, USA
Posted: 11th Jun 2008 00:18
Well, I have to be honest. I've looked through tutorials and searched Google for help. Even with through all of Xenocythe's tutorial (which helped quite a bit anyway), but I'm still lost. And reading up on what every command does didn't help me either.

I'm trying to make a simple adventure game, but this is what I need the most help with:

1) I want to have the character face the direction he's going in. Right now he only faces the camera. Here's my code:


2) I'm confused on how to implement lighting, ambients and stuff like that.

3) I also want to know how to add a sky cube, and what the procedure is for that. I know in another engine you used a hollow cube, but I don't think DBPro has hollow cube primitives

Thanks in advance, you've been very help as far as helping me lay the foundation.

a total noob.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 11th Jun 2008 03:12 Edited at: 11th Jun 2008 03:17
Well, I can help with issue #1.

1) The reason why your character isn't rotating is because after you rotate him using the left/right arrow keys, you just return him to his old angle! Note that when you write "yrotate object 1,a#", you haven't told "a#" to equal anything yet. When you don't tell a variable to equal anything, its default value is 0. So, when you say "yrotate object 1,a#", you are telling object 1 to be rotated at 0 degrees. Then, when you tell a# to become equal to object 1's rotation, it just tells it to equal 0 again because object 1 is rotated at 0 degrees. As a result, object 1 is ALWAYS rotated at zero degrees. Be careful what order you write commands in .

Also, as a side note, if your character is still facing the wrong way all of the time, try the FIX OBJECT PIVOT command in combination with roating the object. If you rotate the object right after you load it and then use FIX OBJECT PIVOT, the object will make the current way it is rotated the way it is normally rotated. If that makes no sense, check the help file on that command. If you want to try it, try putting this right after you load/create the player object:


yrotate object 1,180
fix object pivot 1


Zergei
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 11th Jun 2008 03:17 Edited at: 11th Jun 2008 03:18
Just as Sixty Squares remarks...

1) You're setting the angle of the object at 90 or -90, but right after that you're setting it to the value "a#" has. Since "a#" at the beggining is 0 then it'll be set to 0, later you store in "a#" the value of the angle (which by this time is 0), and so it goes on.

Try removing that "yrotate object 1,a#" and see what happens. Can't really tell since im not sure of what you want of the rest of the game to do.

Further on my stuff at...
TurboSquid.com
The3dStudio.com
cyangamer
16
Years of Service
User Offline
Joined: 2nd Jun 2008
Location: Houston, TX, USA
Posted: 11th Jun 2008 03:56
Alright, the problem in #1 is fixed. Thanks for the help. What about skyboxes though? I'm real curious about those.

a total noob.

Login to post a reply

Server time is: 2024-09-27 16:22:35
Your offset time is: 2024-09-27 16:22:35