Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
<C> ball_motion

 
Post new topic   Reply to topic Printable version
 View previous topic  <C> cmdlist Post :: Post ACE -- ASSS C Enricher (beta 2 release...  View next topic  
Author Message
Goldeye
Novice


Gender:Gender:Male
Joined: Dec 15 2003
Posts: 57
Offline

PostPosted: Sat May 02, 2009 4:49 pm    Post subject: <C> ball_motion Reply to topic Reply with quote

I've got a module together to handle most of the work related to accurately dealing with the position of the ball at all times.

Through a C interface, it can report:
- Position/velocity of a ball at a given time.
- When the ball will come to rest or bounce
- When the ball will intercept a line/rectangle/tile/elvl-region
- Exposes a callback to allow you to conduct your own tests on the ball each tick


Example uses:
Angled walls: Angled bounces off 'angled' walls, by disabling BallBounce in config, and entering all coordinates into a config (building this into an editor would be awesome), and then firing the ball anew in whatever direction you want when it hits the wall. <Edit: I made this but it works badly for players with high pings because of the delayed physics>

Dodgeball: Not out if you touch the ball after a bounce. Out if you touch it before it (truly) comes to a rest

Bots: Allow a bot to know where the ball is and where it's going.

If you want to know if or how this can be helpful for your project, just ask. icon_smile.gif

<Edit:>
The module uses macros arnk put together (in akd_asss.h). They might not be compiling outside of hz. If you like the macros, don't use them; check out Arnk's ACE scripts. They're much better for the purpose: http://forums.minegoboom.com/viewtopic.php?t=8629




Contains: ball_motion.c, ball_motion.h, akd_asss.h

ball_motion.zip - 8.28 KB
File downloaded or viewed 251 time(s)


Last edited by Goldeye on Sat Jul 03, 2010 7:17 pm, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List Send email
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Sat May 02, 2009 5:01 pm    Post subject: Reply to topic Reply with quote

icon_surprised.gif

sounds cool

didn't know someone figured out the ball physics O.o
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Sat May 02, 2009 6:05 pm    Post subject: Reply to topic Reply with quote

5 stars for no attachment icon_smile.gif
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Goldeye
Novice


Gender:Gender:Male
Joined: Dec 15 2003
Posts: 57
Offline

PostPosted: Sat May 02, 2009 8:31 pm    Post subject: Reply to topic Reply with quote

Samapico: Smong figured it out from subspace.exe (a day before I would have, I always mention -_- ):
http://forums.minegoboom.com/viewtopic.php?p=76456#76456

Bak: I said I'd put it out faster if anyone wants it.
Back to top
View users profile Send private message Add User to Ignore List Send email
Goldeye
Novice


Gender:Gender:Male
Joined: Dec 15 2003
Posts: 57
Offline

PostPosted: Mon May 25, 2009 7:01 am    Post subject: Reply to topic Reply with quote

I unexpedited since no one asked.
Back to top
View users profile Send private message Add User to Ignore List Send email
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Mon May 25, 2009 6:14 pm    Post subject: Reply to topic Reply with quote

Goldeye wrote:
I unexpedited since no one asked.

This:
Bak wrote:
5 stars for no attachment icon_smile.gif
Back to top
View users profile Send private message Add User to Ignore List Send email
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Mon May 25, 2009 10:16 pm    Post subject: Reply to topic Reply with quote

So now all we need to do is remove the friction and we have bomb tracking. icon_smile.gif
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Tue May 26, 2009 12:53 am    Post subject: Reply to topic Reply with quote

Initrd.gz wrote:
So now all we need to do is remove the friction and we have bomb tracking. icon_smile.gif
Except that a bomb doesn't trigger any event when it's triggered, which is the main reason why tracking a bomb is not reliable. The rest is just simple linear stuff.
Back to top
View users profile Send private message Add User to Ignore List
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Thu Jul 01, 2010 10:06 pm    Post subject: Reply to topic Reply with quote

uber bump...

Nothing yet?
Back to top
View users profile Send private message Add User to Ignore List
Goldeye
Novice


Gender:Gender:Male
Joined: Dec 15 2003
Posts: 57
Offline

PostPosted: Thu Jul 01, 2010 10:31 pm    Post subject: Reply to topic Reply with quote

Ooh, interest!

I'll see about getting it here tomorrow
Back to top
View users profile Send private message Add User to Ignore List Send email
Goldeye
Novice


Gender:Gender:Male
Joined: Dec 15 2003
Posts: 57
Offline

PostPosted: Sat Jul 03, 2010 7:17 pm    Post subject: Reply to topic Reply with quote

Done. See first post.
Back to top
View users profile Send private message Add User to Ignore List Send email
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Sun Feb 27, 2011 10:48 pm    Post subject: Reply to topic Reply with quote

8 months later: I'm finally getting around to using this...

I plan to use it for 2 things for now:
-Detect an actual shot towards the goal vs a simple pass or a missed shot
-Detect when the ball hits the post

The first one is simple, since I can call the function when the ball is thrown.

However, I'm not sure how to do the second one... I can use BallBounce(...) to know if the ball should eventually hit the post, but is there some way to get a callback when it does hit the post? Or do I need to start a timer, and make sure no one touches it while the timer counts down?
Back to top
View users profile Send private message Add User to Ignore List
Goldeye
Novice


Gender:Gender:Male
Joined: Dec 15 2003
Posts: 57
Offline

PostPosted: Sun Feb 27, 2011 11:08 pm    Post subject: Reply to topic Reply with quote

I wrote a module that can do both of those (with one function).
Will try to bring it out sometime soon.
Back to top
View users profile Send private message Add User to Ignore List Send email
Goldeye
Novice


Gender:Gender:Male
Joined: Dec 15 2003
Posts: 57
Offline

PostPosted: Sat Mar 12, 2011 5:10 pm    Post subject: Reply to topic Reply with quote

Ball motion is that module... tongue.gif
You'd use GoalTime to detect if it will hit the net, and either RegionIntersect or LineIntersect (depending on which angles you want to check) for the post.

The IntersectData returned by either function should contain a time of 0 to indicate no intersect at all.


There are potentially physics errors in this module. Or they might be in our modules using this one. Not sure

PS. Bomb tracking shouldn't be that hard...
Back to top
View users profile Send private message Add User to Ignore List Send email
Guest



Offline

PostPosted: Sun Apr 03, 2011 8:43 pm    Post subject: Reply to topic Reply with quote

Does this don't have a python interface? When I try load it, it says there isn't. Would you be willing to add it?
Back to top
Goldeye
Novice


Gender:Gender:Male
Joined: Dec 15 2003
Posts: 57
Offline

PostPosted: Sun Apr 03, 2011 10:08 pm    Post subject: Reply to topic Reply with quote

It's tricky to make a python interface because of the data structures.
If someone's very familiar with pyint, maybe they're willing to take a shot at this?
It'll be a long long time before I can work on it.

However, if you describe your exact use, I may be able to make 'wrapper' functions that just return ints.
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 661 page(s) served in previous 5 minutes.

phpBB Created this page in 0.540155 seconds : 43 queries executed (73.3%): GZIP compression disabled