• Welcome to Dark Bit Factory & Gravity.
 

Visual Basic

Started by Clanky, March 01, 2007

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Shockwave

As you'd be dividing the X+Y by thier Z, if your screen is 640 X 480, you'd be advised to use a range between -7000 and +7000 for the x and y points, z a floating point number betwen 0.0001 and 32
To convert the z into a usable number you'd need to do;

N=(int(-z+32)) You can use that to colour and scale your circles. :)
Shockwave ^ Codigos
Challenge Trophies Won:

Clanky

So it is a different method to that of yabasic - not like my starfield code for Yah Spaced Invaders?
Man, that's a drag... I think that the way I did it in yabasic was the easiest way! No I have to figure out another way to do it, in a confusing and unspecified way haha! DAmN

By the way - the class I'm in uses Microsoft Visual Basic 2005 Express Edition, and I tried Form1.Cls and the command wasn't recognised? I think it might not be in this version... but I might have done it wrong?

*NB// I'm trying my best to remember the routines lol... it might be wrong, so I'll get the work sheet tomorrow and write it up for use!*

Also, my problem is... the way we have been taught to draw graphics is:
  --> Get a drawing pane using a picture box, by declaring 'paper' as a graphic and linking it to the PictureBox1;
  --> Then we declare a pen to draw with, also indicating the colour - this is myPen;
  --> Then we can say, DrawRectangle(myPen, 10, 10, 100, 100)


hmm... well, I'll try and try and try to figure out my way through the messes of VB, so that the teacher is amazed by my fabulous scrolling starfield and skeleton vector cube haha!

Thanks for all your help guys, if I need any more, I know where to come.
He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..

CoDeMaN

Visual basic is really crap for demo effects.

Try www.planet-source-code.comwww.planet-source-code.com

Theres a lot of star fields ect on there that would help you out

Clanky

Thanks for the link Codeman!
I thought making demos would be a hassel! lol, my mate just made the logo off a movie - can't remember which one lol!

If I can't do the starfield and/or the cube, then my best bet would be to just draw a still image... aww!
He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..

Clanky

aww man! i tried to make the cube rotate, but you need to keep pressing DRAW for it to move... which means it isnt refreshing lol... so do i need a timer? i read that in one of the codes from the site, but wasnt to sure how to make it work.

nb/ im using Visual Basic 2005 Express Edition, so when i tried some of the methods in VB6, it woudlnt work
He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..

CoDeMaN

Post what ya got so far and somone will be able to help ya ... ill try but im not really that good on vb

Clanky

Ok, I wont want to 'rotate' the cube... it is now just drawn, rather than calculated via vector calcs... so it just moves in a circular path on the picture box.
But, my problem is that it doesn't clear the screen - meaning that it leaves behind the trail it's taken. I don't know how to use timer()... so I guess if anyone could help me, if not - I'll ask the teacher.
She was impressed by my mistake of multiplying pos_x by 0 which meant that the right side of the cube went to 0,0 and rotated around the other points - creating a nice depth circular pipe effect.
He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..