SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 21/08/2015, 01:09 AM   #21
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,843
Reputation: 560
Default Re: ColAndreas - Collision Detection

Quote:
Originally Posted by Pottus View Post
Creating objects does take a lot of memory actually, ColAndreas creates compound collision shapes which are then used when an object is instantiated as a new instance of an object in the collision world.
Technically, what I said still stands then, it's the collision data. Lol...

I just had a crash after trying to create 720000 objects. However, it's no surprise because my computer only had like 900 mb ram available at that moment... XD

The process peaked 747540 mb before crashing.

Quote:
Originally Posted by ipsLeon View Post
I have a question, my whole maps are created with streamer, does colandreas detect colision on them or I have to use the plugin native to be able to detect it?
Use the CA_CreateDynamicObject_DC function. Either that or use CA_CreateObject for every object.
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 21/08/2015, 01:18 AM   #22
n0minal
Banned
 
Join Date: Mar 2013
Location: Rio de Janeiro
Posts: 4,105
Reputation: 699
Default Re: ColAndreas - Collision Detection

Quote:
Originally Posted by Crayder View Post
Use the CA_CreateDynamicObject_DC function. Either that or use CA_CreateObject for every object.
Alright but does ColAndreas have some functions as streamer do? Like SetVisibleItems etc? Cause by default, streamer used to create the maximum of 500 objects I think, how much objects are visible by default in CA?
n0minal is offline   Reply With Quote
Old 21/08/2015, 01:31 AM   #23
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,843
Reputation: 560
Default Re: ColAndreas - Collision Detection

Quote:
Originally Posted by ipsLeon View Post
Alright but does ColAndreas have some functions as streamer do? Like SetVisibleItems etc? Cause by default, streamer used to create the maximum of 500 objects I think, how much objects are visible by default in CA?
You've got it wrong... CA_CreateDynamicObject is a wrapper for CreateDynamicObject.

ColAndreas doesn't physically create objects. It stores their position in memory and adds a collision body in that position.

The maximum is whatever you want it to be. Just like streamer, you can change the max.
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 21/08/2015, 02:36 AM   #24
n0minal
Banned
 
Join Date: Mar 2013
Location: Rio de Janeiro
Posts: 4,105
Reputation: 699
Default Re: ColAndreas - Collision Detection

Quote:
Originally Posted by Crayder View Post
You've got it wrong... CA_CreateDynamicObject is a wrapper for CreateDynamicObject.

ColAndreas doesn't physically create objects. It stores their position in memory and adds a collision body in that position.

The maximum is whatever you want it to be. Just like streamer, you can change the max.
Oh ye, sorry, thought it used to create the object
n0minal is offline   Reply With Quote
Old 21/08/2015, 01:07 PM   #25
Pottus
Godfather
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 5,276
Reputation: 1141
Default Re: ColAndreas - Collision Detection

I purposely made it so that you can have static and dynamic collision objects since a lot of objects would never need to be deleted there is no need to store an internal reference.
Pottus is offline   Reply With Quote
Old 21/08/2015, 02:48 PM   #26
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Ottawa, Canada
Posts: 1,607
Reputation: 619
Default Re: ColAndreas - Collision Detection

I think the pawn based features/functions should be separated into an additional or optional include addons.

And I will look forward making an application of this soon, a type of example or feature showcase.
__________________

Stop contacting me for help! I ain't got time for yoir shit!


Gammix is online now   Reply With Quote
Old 21/08/2015, 04:13 PM   #27
Pottus
Godfather
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 5,276
Reputation: 1141
Default Re: ColAndreas - Collision Detection

Quote:
Originally Posted by Gammix View Post
I think the pawn based features/functions should be separated into an additional or optional include addons.

And I will look forward making an application of this soon, a type of example or feature showcase.
Does not seem there would be any benefit doing that really.
Pottus is offline   Reply With Quote
Old 21/08/2015, 11:21 PM   #28
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,843
Reputation: 560
Default Re: ColAndreas - Collision Detection

Quote:
Originally Posted by Gammix View Post
I think the pawn based features/functions should be separated into an additional or optional include addons.
I don't see any point in putting them in a separate library, but I could post them on here as example. I'll post those and do some demos.
Quote:
Originally Posted by Gammix View Post
And I will look forward making an application of this soon, a type of example or feature showcase.
I'm unsure what you meant by this, but if you mean like making demo videos or something that would be nice. It seems like a lot of people haven't really noticed the plugin's abilities yet, a showcase would prove that it is better than MapAndreas.

Wait, what is MapAndreas? (joke)
I remember a conversation on Mumble between Pottus and Chris about MapAndreas being forgotten, that was way before the release.
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 22/08/2015, 04:12 PM   #29
Private200
High-roller
 
Private200's Avatar
 
Join Date: May 2012
Location: Albania
Posts: 1,182
Reputation: 162
Default Re: ColAndreas - Collision Detection

If use:

Code:
CA_FindZ_For2DCoord(Float:x, Float:y, &Float:z)

I have to get the player Pos:X and Pos:Y, in order to return the ground Pos:Z? If yes, I can use this system to make loot objects appear on the ground and not float in it.

Correct me if wrong, based on what this function returns.
__________________
Taking a break from SAMP, PM me if you need any of my help.
And no, I am not going to script for your server.

Quote:
Originally Posted by X337 View Post
it's better and easier for you to just fap with your cat.
Private200 is offline   Reply With Quote
Old 22/08/2015, 04:28 PM   #30
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,843
Reputation: 560
Default Re: ColAndreas - Collision Detection

Quote:
Originally Posted by Private200 View Post
If use:

Code:
CA_FindZ_For2DCoord(Float:x, Float:y, &Float:z)

I have to get the player Pos:X and Pos:Y, in order to return the ground Pos:Z? If yes, I can use this system to make loot objects appear on the ground and not float in it.

Correct me if wrong, based on what this function returns.
Basically, yes.
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] ColAndreas - (Released) Pottus Plugin Development 415 19/08/2015 12:31 AM
No veh collision vs vehicles with collision issue Kar 0.3.7 RC Scripting 5 10/05/2015 11:08 PM
ColAndreas Pottus Screenshots and Videos 73 17/12/2014 08:32 PM
Collision Detection (Plugin) Deduction Scripting Help 0 27/12/2013 04:24 AM
Collision Detection? NumbSkull Scripting Help 4 13/11/2012 03:27 AM


All times are GMT. The time now is 03:23 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.