Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (BrainSailor, 1 invisible), 1,090 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Solar System Orbit Simulation #221348
08/13/08 16:17
08/13/08 16:17
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline OP
Serious User
DJBMASTER  Offline OP
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Hi, i've seen a couple of people asking how to rotate one entity around another one using code. I was just browsing and saw someone wanted to build a solar-system simulator or similar, but couldn't figure out how to do the rotation.

I've just built this in the last 15 mins...

> Allows you to rotate planets/satellites/etc around other objects.

> All done through 1 function, saving code space.

> Allows you to specify orbit radius, orbit speed, pan/roll/tilt speeds, line of latitude.

> Supports circular and elliptical orbits.

> Can be used for other things, not just planets, that require rotation around a point or entity.

I've tried to explain inside the planet_orbit.c file as much as i could.

Hope it is useful to someone, if not it's more practise coding for me, lol.

Finally here is the download link >>>

http://www.djbm.kawanda.net/public_files/planetorbit.zip

BTW > would work really well with the planet shader i've seen floating about. Should be in an AUM somewhere.

Thanks...DJB MASTER...

Last edited by DJBMASTER; 08/16/08 18:55.
Re: Solar System Orbit Simulation [Re: DJBMASTER] #221360
08/13/08 17:30
08/13/08 17:30
Joined: Apr 2004
Posts: 516
USA
Trooper119 Offline
User
Trooper119  Offline
User

Joined: Apr 2004
Posts: 516
USA
Excellent contribution, I've noticed the same thing but never thought of a contribution. Great job with helping out the community smile

EDIT: URL is incorrect, looks like you missed part of the link

Last edited by Trooper119; 08/13/08 17:31.

A clever person solves a problem.
A wise person avoids it.
--Einstein

Currently Codeing: Free Lite-C
Re: Solar System Orbit Simulation [Re: Trooper119] #221365
08/13/08 17:42
08/13/08 17:42
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline OP
Serious User
DJBMASTER  Offline OP
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Thanks Trooper119, i forgot that having spaces in URLs isnt the best idea. It's fixed now, thanks.

Last edited by DJBMASTER; 08/13/08 17:43.
Re: Solar System Orbit Simulation [Re: DJBMASTER] #221430
08/14/08 01:01
08/14/08 01:01
Joined: Oct 2007
Posts: 27
P
phmenard Offline
Newbie
phmenard  Offline
Newbie
P

Joined: Oct 2007
Posts: 27
Wow ... thats just what I was looking for, many thanks ... a great piece of code. While I have you here would you car to give me a snippet on ENTITY SCANNING?? How do I get one ENTITY to know its close to another ENTITY.

Re: Solar System Orbit Simulation [Re: phmenard] #221432
08/14/08 01:16
08/14/08 01:16
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
vec_dist(my.x,your.x) quickest way if you're just checking how far something

c_trace(my.x,your.x,IGNORE_ME); for seeing if they can see each other

c_scan(my.x,my.pan,vector(120,0,200),SCAN_ENTS); best used on button presses, returns closest entity =D

Hope this helps!

Re: Solar System Orbit Simulation [Re: DJBMASTER] #290356
09/18/09 16:15
09/18/09 16:15
Joined: Jun 2008
Posts: 21
S
spaceguy76 Offline
Newbie
spaceguy76  Offline
Newbie
S

Joined: Jun 2008
Posts: 21
Is this still available to download somewhere?

Re: Solar System Orbit Simulation [Re: spaceguy76] #290379
09/18/09 17:33
09/18/09 17:33
Joined: Apr 2009
Posts: 4
A
archie Offline
Guest
archie  Offline
Guest
A

Joined: Apr 2009
Posts: 4

Re: Solar System Orbit Simulation [Re: archie] #290448
09/19/09 02:33
09/19/09 02:33
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline OP
Serious User
DJBMASTER  Offline OP
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Oh yeah, sry i was cleaning out my webspace and deleted it, but thanks to whoever put it on the wiki. Great job!

Last edited by DJBMASTER; 09/19/09 03:57.
Re: Solar System Orbit Simulation [Re: DJBMASTER] #290453
09/19/09 03:39
09/19/09 03:39
Joined: Jun 2008
Posts: 21
S
spaceguy76 Offline
Newbie
spaceguy76  Offline
Newbie
S

Joined: Jun 2008
Posts: 21
Originally Posted By: DJBMASTER
Oh yeah, sry i was cleaning out my webspace and deleted it, but thanks to however put it on the wiki. Great job!


mad

would have liked to toy around with it with the original files. I guess it won't be difficult to whip up a star and a couple of planets to test it with. This might come in handy for a video game i'm thinking of producing.


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