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.

Dark GDK / Need help with a lot of questions

Author
Message
mamaboy
15
Years of Service
User Offline
Joined: 24th Jan 2009
Location:
Posted: 26th Jan 2009 06:49
1.how can i use wasd key to control? dbWkey? syntax error

2.why my brick and garvel will shows like this?i converted them to PNG texture


3.how to ajust the view distance?lol what is that
CheatCat
17
Years of Service
User Offline
Joined: 7th Mar 2007
Location: Sweden
Posted: 26th Jan 2009 12:05 Edited at: 26th Jan 2009 12:06
1.


2. && 3. Post your source code, please.
mamaboy
15
Years of Service
User Offline
Joined: 24th Jan 2009
Location:
Posted: 26th Jan 2009 13:45
hi cheatcat,thanks alot

my source code nothing special,these are designed using 3D world studio

codes ->
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Jan 2009 21:03
Why is it that people continue to insist on using meaningless numbers for their getstate values, when DirectX provides a much more readable and self-documenting format?




Make it easy on yourselves - make it so your code is readable, not only today, but in six months time. Don't use 'magic numbers' - use constants or defines:



... sorry, one of my pet peeves

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 27th Jan 2009 04:12
@mamaboy:

Perhaps your model is very large? You could try increase the camera clipping range to see if it makes a difference on your clipping issue.


@IanM:

Wouldn't your for loop start at 1 if you use "++i"? I always use "i++" so that the variable isn't incremented until the end of the for loop. (Correct me if I'm wrong here, please.)


The one and only,


mamaboy
15
Years of Service
User Offline
Joined: 24th Jan 2009
Location:
Posted: 27th Jan 2009 11:45
@iamM
thats directinput?thanks alot.whats the 2nd code?

@plystire
yeah,thats my school
umm...how to increase?

i will trying to search for solution before you reply me,thanks alot!
Nicoust
19
Years of Service
User Offline
Joined: 3rd Jul 2005
Location: Manchester, England
Posted: 27th Jan 2009 12:43
@User

No the < in the forloop lets it count from 0 to 99, would have needed to be <= if doing 1 to 100. and as zero tends to be the start point for lots of 'things' it saves one key press too.

Although it does depend on what the items you are itterating through start at.

Don't use c++ if i can possibly avoid it, prefer c# which provides foreach - a very nice way of itterating through arrays and lists.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jan 2009 14:06 Edited at: 27th Jan 2009 14:09
@Plystire,
This code:


is exactly the same as:


As you can see, whether the ++ is before or after the variable makes no difference to the loop.

The reason for doing a preincrement rather than a postincrement is generally a performance enhancement - in this case it makes no difference, but if it was an object, using postincrement requires a new copy of the variable to be created under some circumstances.

Quote: "whats the 2nd code?"

Just an example to back up my point ... which is easier to read?

mamaboy
15
Years of Service
User Offline
Joined: 24th Jan 2009
Location:
Posted: 29th Jan 2009 07:59
hmm...i cant find the solution in google...
are there any solution for 2&3?

Login to post a reply

Server time is: 2024-09-30 17:35:29
Your offset time is: 2024-09-30 17:35:29