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 / CUBE SPINNING!!!!!!!!!!!!!!!!!!!!!!!

Author
Message
DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 6th Oct 2004 10:52
ok im trying to make a simple cube spin but the code isnt working here is the code i typed in

MAKE OBJECT CUBE 1,77

SET OBJECT ROTATION XYZ 1


i click execute and it dosent rotate whats up!

BITCH SAY WHAT?
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 6th Oct 2004 10:57 Edited at: 6th Oct 2004 10:58


Sync on
Make object cube 1,77
do
Yrotate object 1,object angle y(1)+1
sync
loop

Here's how it works:

`Make it so that you control when the screen updates, using the sync command
Sync on
`Make the cube
Make object cube 1,77
`Start a loop(ingnore this)
do
`Object 1's y angle is equal to it's y angle plus one.
Yrotate object 1,object angle y(1)+1
`Update the screen
sync
`Go back to do
loop

P.S. Don't make your title all caps with many exclamation marks and you'll get more replies.

DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 6th Oct 2004 10:59
ooooooo thank you!

BITCH SAY WHAT?
Mizipzor
20
Years of Service
User Offline
Joined: 24th May 2004
Location: Sweden
Posted: 6th Oct 2004 20:53
And please please pleeeeeease dont use that kind of topic names...

Dreaming of creating a highly advanced AI mind
DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 7th Oct 2004 09:04
OK new question im trying to color the cube but the color object command isnt working the RGB() isnt working nothing is working any codes for this

BITCH SAY WHAT?
PoHa!84
20
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 7th Oct 2004 15:20
color object 1, rgb(50,50,50)

does that work?

something
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 8th Oct 2004 04:35
make a texture and texture the cube, like this:



however, if you still want to use color object, then you need to make sure that you light it from all angles, or your color won't show properly.

Part of solving the problem is actually noticing that the problem is there in the first place

DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 8th Oct 2004 10:35
ok i got the colors right and now i can make any color of cube i eant so thats cool! i think ill mess aroubd with this code somemore possibly make a really cool 3D program

BITCH SAY WHAT?
Rennekon
20
Years of Service
User Offline
Joined: 7th Oct 2003
Location:
Posted: 9th Oct 2004 09:35
And could you change your sig.

John "Dark Lord of Angel Destroying Destiny" Pringlebee, maybe?
DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 9th Oct 2004 13:01
ok now i need to learn how to make the cube change colors any codes?

BITCH SAY WHAT?
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 9th Oct 2004 13:23
Sync on
Make object cube 1,77
do
color object 1,rnd(16000000)
Yrotate object 1,object angle y(1)+1
sync
loop
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 9th Oct 2004 15:29
Here's one that changes every once in a while



AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 10th Oct 2004 00:04
ok thanks im using them for my new program anyway i need a code to color the backround ive tried the color backdrop command but its not working i need some codes

BITCH SAY WHAT?
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 10th Oct 2004 00:09
Sync on
Make object cube 1,77
do
color backdrop rnd(16000000)
Yrotate object 1,object angle y(1)+1
sync
loop
DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 10th Oct 2004 02:07
ilya your chaging clor thing are a big flashing cube with hints of blue and green i mean actual changing colors from red to green to yellow to black to blue and so on

what do we burn apart from witches. MORE WITCHES!
DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 10th Oct 2004 02:17 Edited at: 10th Oct 2004 02:23
ok heres the code for my spinning cube program i like it its one of my first actual 3D pro grams i programed my self (with some help with the coding from you guys) hope you like it

what do we burn apart from witches. MORE WITCHES!
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 10th Oct 2004 02:41 Edited at: 10th Oct 2004 02:56
Quote: "i mean actual changing colors "

That's a little harder...

Chris K
20
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 10th Oct 2004 02:46
Do the "My First Pong Game" tutorial. It's at the top of this board. I don't think you really understand what you are doing at the moment, but you have lots of enthusiasm so the future looks bright.

Have fun.

DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 10th Oct 2004 02:47
whats that supossed to mean

what do we burn apart from witches. MORE WITCHES!
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 10th Oct 2004 03:43 Edited at: 18th Oct 2004 11:53
it m33ns yur a n00b n u n33d 2 b sk0013d

The default editor is fine.
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 10th Oct 2004 13:53
Dont worry about it man, you're learning, just keep at it. Your program looks good.

What else do you want ur program to do? I can help you, but you're not being very specific...

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 11th Oct 2004 11:26
well i want it to change into more colors such as red lighter green blue and the such any codes

http://www.freewebs.com/warhammered/image2.jpg
DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 11th Oct 2004 11:31
i quit programming with darkBASIC for awhile started using C and C++ alot then it just got to hard and i moved back to DB and i forgot like everything i knew about so im asking it here now

http://www.freewebs.com/warhammered/image2.jpg
DarKLE
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 18th Oct 2004 02:41
hello you wee going to help me with the code

http://www.freewebs.com/warhammered/image2.jpg
Final Epsilon
20
Years of Service
User Offline
Joined: 26th Jan 2004
Location: CA, USA
Posted: 18th Oct 2004 03:54
to change colors, just slowly increment the RGB values to what you want. Ie: Every increment in the loop add 1 to the red value, and set the color.
RalphY
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: 404 (UK)
Posted: 18th Oct 2004 04:00 Edited at: 18th Oct 2004 04:09
Hi,
This code will use if statements to change the color of the cube so that it will shift from red to green to blue etc.



Of course this could easily be applied to the backdrop by adding the line color backdrop rgb(red,green,blue). If you need any help with the code just ask.

Hope it helps.

Note: This is just a quick rough and ready way, I'm sure someone else here would be able to post a much better solution.

Login to post a reply

Server time is: 2024-09-23 02:32:07
Your offset time is: 2024-09-23 02:32:07