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 / Spheres Land Mass- Help See Rotation

Author
Message
John Avon
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Avon Indiana USA
Posted: 26th Apr 2005 10:25
I am a bit a head of my self, but does anyone have a snippet of code - short and easy - that could help me draw, contouer, or color a rotating sphere to show the rotation better.
I have been working with DIM today, and I am able to use the command to shoot and maitain my gun turret-on screen, while shooting. I do not understand why I need to use the DIM command with GoSub to maintain My "GUN TURRET" while shooting. I tried everything I could remember from "GW Basic" and it just don't work. I must use the DIM command. I do not understand (DIM) that well.
Could anyone explain DIM to me? I understand DIM = Demention. I understand Arrays a little, But I can not understand Why I must go to the trouble of using the Array Command to maintain a simple "Gun Turret" on screen while shooting. I tried every combination of Cls, and Sleep, but my "Turret" vanished while shooting I tried other stuff I will ask about later. Thanks Folks. I drank beer and can't spell at the present. JG

JohnGillespie
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 26th Apr 2005 20:08
the old question DBC or DBPro, can't realy help if your are DBC, if your DBPro and you are using sprites or object's then try using the turn command

eg turn sprite left spritenumber, angle
turn object left objectnumber, angle

in code would look like so:
TURN OBJECT left 1, wrapvalue(360)+0.1
turn sprite right 1, wrapvalue(360)+0.4

this take object 1 and will turn it around untill it hit 360 the reset ready to go round again, the +0.1 is the amount it moves around by whole number very fast, small slow.

see how you get on, if not clear post again and we'll see what can be done.

In Space No One can Hear You Scream! (When your comm Line is cut?)
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 26th Apr 2005 20:12
Quote: "DIM = Demention"

DIM=dimension
Demention is probably linked to dementure and I don't think that is what you are looking for!

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.tk
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 26th Apr 2005 20:18
DIM is used to create a memory block which is refared to by the name you give it. in darkbasic it isnt needed for this as the compiler will make them for you which means you can do this:

whilst in other programming languages you must tell the compiler what it is by using DIM number as integer or whatever.

in darkbasic its use is mainly for arrays so i would think your code is dependent on an array. if you post your code im sure someone could tell you why it is needed in your code.

Any spelling mistakes are totally In tensional.
Lame Brain
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Portland, OR
Posted: 29th Apr 2005 12:13
If you make something an array, dos't it automatically become global? Maybe its a global/local varible problem.

(Formerly Posting as Social Disease)

Login to post a reply

Server time is: 2024-09-23 19:36:46
Your offset time is: 2024-09-23 19:36:46