Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 847 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Keeping distance #464957
03/20/17 12:43
03/20/17 12:43
Joined: Jul 2001
Posts: 4,801
netherlands
Realspawn Offline OP

Expert
Realspawn  Offline OP

Expert

Joined: Jul 2001
Posts: 4,801
netherlands
I have astroids in my game that use the same pointer what would
be the best way so they always stay on a certain distance from
each other ?

Thank you for your time laugh


Find all my tutorials & Workshops at : www.rp-interactive.nl

Creativity starts in the brain
Re: Keeping distance [Re: Realspawn] #464959
03/20/17 13:34
03/20/17 13:34
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
How do you move your asteroids?
If you move them through e.g. c_move, you can just increase the bounding box your asteroids (scale than c_setminmax than shrink to original size , or just vec_scale min_x and max_x manually). Also setting the GLIDE flag in your c_move function helps (also take a look at move_friction in the manual).

A better way perhaps would be adding a EVENT_IMPACT to your asteroids that when they make contact with each other (e.g. through c_move) they move away from each other (just compare the positions of both asteroids to calculate the velocity you want and e.g. save these in the asteriods' skills and than in the asteroid's c_move use these skill values).

Another way but maybe overkill solution would be implementing a flocking system.


Last edited by Reconnoiter; 03/20/17 13:37.
Re: Keeping distance [Re: Reconnoiter] #464961
03/20/17 15:06
03/20/17 15:06
Joined: Jul 2001
Posts: 4,801
netherlands
Realspawn Offline OP

Expert
Realspawn  Offline OP

Expert

Joined: Jul 2001
Posts: 4,801
netherlands
There not moving but appear at random places
that impact sounds like a solution i will toy with it some more.
i fixed the issue thx for pointing me in the right direction laugh


Last edited by Realspawn; 03/20/17 15:10.

Find all my tutorials & Workshops at : www.rp-interactive.nl

Creativity starts in the brain

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1