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 / No ambient light ??

Author
Message
RonsWare
10
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 6th Jul 2013 20:15
Hello friends.
Can someone please test this code for me
This code is from the book \\\\\\\" DarkBASIC Pro Game Programming. 2nd Edition \\\\\\\"
I get no ambient light.
You have to create your own texture for the cube



I copied the code from the book.

Thanks for your time.

Cheers Ron.

Programming is learning
TheComet
13
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jul 2013 22:19
I'm seriously starting to question the quality of these DBP books...

ANYWAY, your problem is that you haven't defined the variable direction, so it defaults to the value 0. I've restructured your code a little, and you'll see just before the REPEAT command that I've defined the variable to start with the value 1.



Please make sure you indent your code correctly in the future (use the TAB key on your keyboard), it helps not only us but also you.

TheComet

RonsWare
10
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 7th Jul 2013 09:16
Thanks TheComet, I will

Cheers Ron.

Programming is learning

Login to post a reply

Server time is: 2020-12-02 19:07:30
Your offset time is: 2020-12-02 19:07:30