CodeBase - TrueSky Simulator

Return to the CodeBase listing

Category: Miscellaneous

Version: 1.01

0
0

Information

Uploaded: 22nd Aug 2008 02:15

Modified: 22nd Aug 2008 04:25

Author:  The Sab

Summary

Sky simulator. Controls a unique path for the sun and up to four moons, as well as day/twilight/night transitions. Adjustable viewer latitude and individual ecliptic for each orbital object.

Full Description

I started working on this before the RTS add-on came out, so I kept working on it. Each orbital object has a unique path with adjustable orbit length, revolution length, ecliptic, size, and distance from viewer. User must pass object and image numbers to each individual object. If an object already exists with that number, it will put that object in orbit, otherwise a default sphere with appropriate stats will be created and assigned to that object number. Changing the Latitude will accurately adjust the movement of all orbits. Calls must be made to the functions InitializeTrueSky(), CreateSky(ObjNo1, ObjNo2, ImgNo1, ImgNo2, Distance1, Distance2) and CreateOrbital(0, _SUN, ObjNo, ImgNo, DayLength, YearLength, Size, Degrees of Ecliptic) as all the timing functions are based on the sun, a.k.a. Orbital 0. Function TrueSky() must be called in the Main Loop. There are several features which I still wish to add, such as sun glow, planetary rings, and some other graphic tweaks, but I am still learning the graphic side of Dark Basic Pro. Also be aware that this program is making several sine and cosine calculations for each orbital, so it might eat up a bit of processor power. The code has pretty good notes and instructions, but let me know if anything is confusing or not working properly. Also, all textures that I used are too large to post here, but all were in .png format.

Comments

No comments yet.