|
-
Jan 17th, 2001, 09:25 AM
#1
Thread Starter
New Member
-
Jan 17th, 2001, 10:17 AM
#2
PowerPoster
Are you mean those games look like snooker?
-
Jan 17th, 2001, 10:26 AM
#3
Frenzied Member
If you ever manage to make that pool game, please send it to me: [email protected]
I love playing pool
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Jan 17th, 2001, 12:14 PM
#4
Retired VBF Adm1nistrator
Well, just have a big picture box.
Use a background of green.
Draw in borders + pockets.
Make a UDT for the balls
Something along the lines of
Code:
Private Type BallType
posX As Long 'X co-ordinate of centre of ball
posY As Long 'Y co-ordinate of centre of ball
'more stuff re. colours etc.
End Type
Then you'd make an array of Balls of type BallType
Then draw them onto the screen.
Then draw a stick.
If the mousepointer is on screen, have the stick 'pivoted' at some position at the mousepoint position, pointing towards the cue ball.
When user clicks (or whatever), have the stick move towards the ball.
When the stick hits the ball (the cords of the end of the stick intersect with the cords of the ball (cords of centre of ball + width of ball)), have the ball move in a direction.
Then use the formulae from physics for motion with friction, and also for inelastic oblique collisions.
There would be a lot of trig involved, but its all fairly easy.
Hope that helps/makes sense 
- jamie
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jan 17th, 2001, 01:16 PM
#5
transcendental analytic
In fact, you could avoid most and why not all trigs by using vectors instead Ball to ball collision is almost as easy as ball to wall. the collision is (distance is smaller than cumulative radius) Ball to wall collision is generally done by point to line formula, but for simplication you could just test a single dimension component, x component for vertical walls and y component for horizontal.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jan 17th, 2001, 04:16 PM
#6
Hyperactive Member
i don't know if you've heard of it before, but there is something sooooooo much better for making games that VB.
and the best part is.....you don't have to learn C++, or any other language for that matter, and this wonder language is called "Dark Basic", it's just for directX, but the things you can make with it are unbelievable!
it's DEFINITELY worth a look.
http://www.darkbasic.com
When I write my code, only God and I know what it means. But a week later, only God knows.
-
Jan 18th, 2001, 02:47 AM
#7
Retired VBF Adm1nistrator
Jesus i dont remember vectors at all from applied maths ... uhn.
Well, oblique ball to ball collision, are complicated, and I think you'd have to use trig.
Also, collisions will involve momentum, restitution and some other goodies. I don't think vector math would cover those.
- jamie
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jan 18th, 2001, 06:37 AM
#8
transcendental analytic
Vectors should cover all your needs, momentum can be split up and operated as vector components as well.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jan 18th, 2001, 06:46 AM
#9
Retired VBF Adm1nistrator
Why split it all up when oblique collisions equations can do it all ?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jan 19th, 2001, 04:20 AM
#10
Retired VBF Adm1nistrator
OK sorry, silly me.
I remember now. The oblique collisions equations do actually use vectors to solve them.
- jamie.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jan 19th, 2001, 05:42 AM
#11
Addicted Member
Dark Basic
Originally posted by BitBlt
i don't know if you've heard of it before, but there is something sooooooo much better for making games that VB.
and the best part is.....you don't have to learn C++, or any other language for that matter, and this wonder language is called "Dark Basic", it's just for directX, but the things you can make with it are unbelievable!
it's DEFINITELY worth a look.
http://www.darkbasic.com
The only trouble with DarkBasic is that it's bloody slow!
I'd recommend http://www.blitzbasic.com if you need fast code.
It can throw around 15,000 sprites per second - even on a P233. No 3D support as yet, but it's coming. Check the site for more details.
Visual Basic 6 Enterprise Edition + SP4
-
Jan 19th, 2001, 05:45 AM
#12
Retired VBF Adm1nistrator
Can I start advertising things now ? 
- jamie
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jan 19th, 2001, 06:06 AM
#13
Addicted Member
Originally posted by plenderj
Can I start advertising things now ?
Yeah it's a blatent advertisement! Can't really see anyone having a problem with that, since Visual Basic is no good for games programming, and Blitz Basic is no good for Windows apps. Because both languages are used for entirely different purposes, people can use and enjoy both!
Visual Basic 6 Enterprise Edition + SP4
-
Jan 19th, 2001, 07:02 AM
#14
Retired VBF Adm1nistrator
I was being sarcastic, not complaining ...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jan 19th, 2001, 07:16 AM
#15
DB
'The only trouble with DarkBasic is that it's bloody slow! '
and full of memory leaks acoording to the posts on the
forum there!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|