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.

AppGameKit Classic Chat / fun 3d collision example (tier 1 code no media required)

Author
Message
29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 17th Dec 2014 21:59
Hi

I've been working my through the 3D commands and adding examples to the help files and came up with collision demo which I thought was quite fun.



It was written in V2 but should work in V1 but V1 uses might need to set the screen up to see it properly.

Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 17th Dec 2014 23:14
Works perfectly in V1

This is a very good example for the 3d collision commands.
Thank you for the contribution


[/url]
Yodaman Jer
User Banned
Posted: 18th Dec 2014 04:07
Great example! I love how easy it is to get great collision in AGK.

This would make a great screensaver as well, if you added a couple more spheres and maybe even another odd shape.

RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 18th Dec 2014 09:19
I like that demo! Lots of fun just tweaking the gravity value. It's a great demo for beginners. Thanks for making it and adding it to the help system.

Have you added a lot of help demos so far?

Rick

Development Director
TGC Team
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 18th Dec 2014 09:22
I've given you a Valued Member badge because of your great contributions to the AppGameKit help.

Rick

Development Director
TGC Team
29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 20th Dec 2014 01:14
Thank you for the badge! It's so shiny!

I'm having a lot of fun coming up with examples and I'm still adding more.

@Yodaman Jer - even though the 3D commands are limited I'm finding them really good to work with.

Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 20th Dec 2014 14:22 Edited at: 20th Dec 2014 14:39
Lovely bit of code

I've tweaked it a bit. I thought the only things missing were side walls and the ability to have more than one ball.
Just change the constant on the first line to adjust the number of balls:

29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 6th Jan 2015 20:33
That's really cool. I think the walls are a good addition.

When doing the examples I wanted to keep things simple. People, I'm guessing beginners, will be looking for the implementation of a single command, in this case "GetObjectRayCastBounceX()", so I didn't want to spend too much time at the start setting it all up, I wanted the example to be easy to follow. Because of this I almost just had a single peg but having the pattern made it a lot more fun.

Login to post a reply

Server time is: 2024-11-25 15:03:52
Your offset time is: 2024-11-25 15:03:52