Man, we have to start VB... boring! Did that in year 10, so I kinda know what I'm doing... and she's telling us like, all the rules.. ahh man! I guess it's her job! lol! So, our assignment is to make a VB app which draws something when you click the "DRAW" button you put onto the form... omg... haha! I'm gonna make my Form Title as "Clancy's Assignment" haha, hopefully she's like - Omg... he knows his stuff, extra marks!!!
Still don't know what I'm gonna draw though!
I'm just sitting here in the library (shutting like, now haha!) playing in the arcade (sooo coollll!!! DBF Arcade Rocks :clap:) and chatting haha! yay, this is the life lol...
I might post the final app if any one wants to see it maybe haha... but, I dunno... Happy Arcading Shockwave, rain_storm and CoDeMaN haha... hopefully no one gets my titles off me again :( haha
Cheers :cheers:
Port a 3D starfield into it, or maybe load a picture of the Hoff or something mad like that. I think that Codeman uses VB. Maybe he'd help you out if you got stuck. Make something that will make her sit up and take notice... Or scare her :)
As for the arcade, I may be jumping the gun here but I intend to own it this month. I was cruelly robbed last month by Rainstorm and Codeman, each trophie I lost was like a physical blow.
In fact, Mel (my better half and chief lurker on this forum) was so happy with herself that she had beaten my Mahjong score that I had to offer 20 Karma to get her knocked off the top of the high score table. You could call it a professional hit and you'd be right :)
Oh and yes, please do post your app when it's done!
Its definately got to be a picture of the hoff.... Good call shocky.... good luck with your app, and you should post it....
Another coder in school :)
I decided not to take VB, thought it would be a waste of time.
Bit I did take web design, and trust me, it's worth it when you prove to the teacher you're better than he/she is :D
Go all-out, make her cry :diablo:
Quote from: MrP on March 01, 2007
Its definately got to be a picture of the hoff.... Good call shocky.... good luck with your app, and you should post it....
And Bono, don't forget Bono! Make her weep!
Quote from: Shockwave on March 01, 2007
As for the arcade, I may be jumping the gun here but I intend to own it this month. I was cruelly robbed last month by Rainstorm and Codeman, each trophie I lost was like a physical blow.
Oh how I wish I could give out masses of karma to bribe Rainstorm and Codeman to stop winning trophies. Nick is so unbearable to live with when he sees he lost a trophy..he makes Victor Meldrew seem like a saint :D
Quote from: Shockwave on March 01, 2007
In fact, Mel (my better half and chief lurker on this forum) was so happy with herself that she had beaten my Mahjong score that I had to offer 20 Karma to get her knocked off the top of the high score table. You could call it a professional hit and you'd be right :)
Nice to see you realise who the better half is ;) Chief Lurker aay....well at least I'm top of something then ;D
Love the Hoff and Bono idea!
Mel, you are just jealous. The only games you can play are the ones you use the mouse for because your bump puts the keyboard out of range... It's no wonder it took you about 20 mins to write that message... :P
Better half? I understand politics love.
Btw, sorry Clanky I won some of your trophies by mistake.
haha! I was actually thinking last night about a scrolling starfield... mayby just the same as the one on my Yah Spaced Invaders (can that be done?)... and maybe a scrolling text (again, if it's possible?)... like a yabasic demo haha! I also thought about a rotating vector cube - but I've never done 3D in yabasic, let alone any other language haha.
All this appears after you click the DRAW button haha. yay
"Hoff and Bono?" ummmmmmmmm ??? [shame]
ps... thanks for taking my trophies :( aww man... another 4 hours tries to get them beack haha!
---------------------
Ok, my project doesn't seem to work because I'm not to sure how to dim the values... and I've forgotten the work we did on wednesday - so I can't make the pen colour and stuff....
man its wierd! yabasic lets you state values as
star=100
dim star_x(star), star_y(star)
and then it's alright...
VB you have to say
Dim star As blah blah blah blah!
so I don't know how to do the scrolling star field... DAmN!!! >:(
1st - Shockwave - 21 wins
2nd - Rain_Storm - 5 wins
3rd - Clanky - 5 wins
Oh no.....I can't stand the chanting. I'm off to buy some ear plugs!!! I can't bare to hear "I'm King of the arcade, I'm King of the arcade" anymore :stirrer:
All the best with your assignment Clanky.
Quote from: Inc0gnit0 on March 02, 2007
1st - Shockwave - 21 wins
2nd - Rain_Storm - 5 wins
3rd - Clanky - 5 wins
Oh no.....I can't stand the chanting. I'm off to buy some ear plugs!!! I can't bare to hear "I'm King of the arcade, I'm King of the arcade" anymore :stirrer:
All the best with your assignment Clanky.
Early days yet .... He can win for now ..... But just keep an eye on his trophie's ;)
they will soon be dropping :2funny:
Gonna make you eat those words Codeman! :goodpost:
I used to learn VB for 3 yrs and it is good language.
3D starfields for VB 6 is pretty easy to do without having anythings to worry about WINDOW!
How did we get on the subject from VB to talk of the arcade.
Back On Track: Am I right in presuming that Visual Basic is the successor to Quick Basic \ QBasic?
Visual Basic uses an editor like visual C++, but the programs are set up based on objects, not just code.
I like to think of it as Flash Actionscript for Windows :)
How would I be able to start a 3D starfield without importing it, becaue the idea of this assignment is to make graphics using the in-library commands, eg. DrawRectangle, DrawLine, FillRectangle, FillEllipse... etc. If I was to be able to do one like in yabasic, I could just use FillRectangle yea? And scroll it like yabasic?
Clanky in Yabasic you have to do the hard math I dont know about VB but I do know that many languages allow you to use library calls (ex. 'rotate entity ...' in Blitz 3d) if VB allows for this too you could save yourself alot of hassle but making the appropriate call and if not then you will have to resort to the maths.
'Early days yet .... He can win for now ..... But just keep an eye on his trophie's
they will soon be dropping ' - Couldn't agree with you more CoDeMaN
'Gonna make you eat those words Codeman! ' Shocky you should be more careful of making bold statements lets not have another arcade war what with work bein so busy my beauty sleep will surely suffer though my winninfg streak will not lol
Umm yea, not too sure. My friend is pretty good at VB, so I'll pass it through with him next class... and hopefully he can help me with at least a scrolling star field... starfields in yabasic are pretty easy to run througth - I kinda like the way you have to make the field in yabasic, makes it fell more technical! lol.
I not too sure about a vector cube, I wouldn't be able to make it solid (as in yabasic with fill triangle) because you cant call triangles in VB! man!
So, it will have to be a rotating skeleton vector cube! lol... hopefully that can be made - and not imported!
I absolutely hate it when a compiler says 'Triangle ? What are you on about? Theres no such thing as a triangle'
what the fuck?
heres a good start for you (you will have to port this to VB though)
set up 3 angles with values (ranging between 0 and pi*2 if VB expects angles in radians) or (between 0 and 360 if VB expects degrees) now get the values of cosine and sine of those angles and put them in variables like this
cx = cos(rotatex)
sx = sin(rotatex)
cy = cos(rotatey)
sy = sin(rotatey)
cz = cos(rotatez)
sz = sin(rotatez)
now for each pixel in a loop do this (If you need to rotate the scene) -
rem rotate z axis
newx = cz*x(p) + sz*y(p) ; rem rotating Z axis effects both X and Y but not Z values
newy = cz*y(p) - sz*x(p) ; rem above was for X axis this is Y axis
rem rotate y axis
newz = cy*z(p) + sy*newx ; rem note that we are using the rotated value of x when we rotate the Y axius
rotated_x = cy*newx - sy*z(p) ; rem this is the fully rotated value for the X axis
rem rotate x axis
rotated_y = cx*newy + sx*newz ; rem finished with Y axis now
rotated_z = cx*newz - sx*newy ; rem and the Z axis is done too
or this (If you only need to move the scene)
rotated_x = x(p) + dirx
rotated_y = y(p) + diry
rotated_z = z(p) + dirz
they are now rotated but you will have to apply perspective to make it look right it is best to multiply both X and Y by a value (scaler) and divide by the value of Z but you will also have to add a value to Z to move it some distance in front of the the point it is beeing viewed from. it might look something like this.
x = rotated_x*scaler / (rotated_z + 100)
y = rotated_y*scaler / (rotated_z + 100)
this is an extension to the familiar Yabasic demo that came with the demo disk (3D bouncing ball & 3D cube) but it is actually basic trigonametry which should exist within VB code without any hassle.
Thanks, I'll see what I can come up with... I just hope that I can get it so that VB doesn't say "Not Verified" or something like it did when I tried to say - stars = 100
Then.. I had to DIM it, and even then, it said "something Expected
Thanks for you help with the cube rain :updance:
btw, hows the pool collisions comming?
A 3D starfield in VB would be about the same as in any language. Since this is an assignment, I won't code an example, but here are some things you need to check out:
1) You can use a timer to control the interval of updates.
2) You can draw right on the form using either Form1.Pset or Form1.Circle. You clear he form with Form1.Cls.
3) You'll need to redraw the screen with the OnPaint event so the screen will show when covered or minimized.
You don't need to use any triangles for a 3D starfield. I think the circle method works best, by scaling the size of the circle based on the Z distance.
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. :)
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.
Visual basic is really crap for demo effects.
Try www.planet-source-code.comwww.planet-source-code.com (http://www.planet-source-code.com)
Theres a lot of star fields ect on there that would help you out
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!
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
Post what ya got so far and somone will be able to help ya ... ill try but im not really that good on vb
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.