Bplus
What to say... Great, cool!
Thanks to share
Ps I must admit that this program has its neo.... it shows so many revolving balls :D
But if I think better in this program there is a great lesson that I try to learn.
Here is a much nicer version. The planets stay appeared until right before they go behind the Sun. I also made Saturn look better. I was able to do this by adding some more info on the IF/THEN statements to see where the coordinates are exactly. I added this to the ones that see if the planets are going right or left so I know where they are headed. Check this one out. :) Also, I didn't mean to hijack your thread here. I would make my own thread but I already have this in 1 other thread as well lol.
Oh, and don't ask about the Moon orbit. I tried hiding that behind the Earth and couldn't do it. It's just barely noticeable anyway. :)Code: QB64: [Select]
'Ken G. made thie program on August 18, 2019, 'Thank you to STxAxTIC on the QB64.org forum for a little bit of help with The Moon orbit! _TITLE "Solar System Simulator by Ken G. Use Mouse Over Planets, Mouse Wheel to Zoom, and Up and Down Arrow Keys To Tilt." mercury = 0.241 venus = 0.6152 mars = 1.8809 jupiter = 11.8618 saturn = 29.457 uranus = 84.0205 neptune = 164.8 angle = 180 tilt = 1 one: _LIMIT 500 mouseWheel = 0 mouseX = _MOUSEX mouseY = _MOUSEY a$ = INKEY$ seconds = seconds + .01 s1 = (60 - seconds) * 6 + 180 / mercury s2 = (60 - seconds) * 6 + 180 / venus s3 = (60 - seconds) * 6 + 180 'Earth and Moon s4 = (60 - seconds) * 6 + 180 / mars s5 = (60 - seconds) * 6 + 180 / jupiter s6 = (60 - seconds) * 6 + 180 / saturn s7 = (60 - seconds) * 6 + 180 / uranus s8 = (60 - seconds) * 6 + 180 / neptune 'Mercury oldx1 = x1 'Venus oldx2 = x2 'Earth oldx = x 'Mars oldx3 = x3 'Moon 'Outer Planets 'Jupiter oldx5 = x5 'Saturn oldx6 = x6 'Uranus oldx7 = x7 'Neptune oldx8 = x8 'Sun 'Mercury 'Venus 'Earth 'Moon 'Mars 'Outer Planets 'Jupiter 'Saturn NEXT rings 'Uranus 'Neptune 'Mercury 'Venus 'Earth 'Moon 'Mars 'Outer Planets 'Jupiter 'Saturn NEXT rings 'Uranus 'Neptune seconds = 0 GOTO one: GOTO one:
Oops! Thanks Steve, I will fix.
Every planet is using different numbers at different locations with different colors. I'm not sure how I could make an array when everything is using different numbers at one time. And really, I think 2 different variables use the same memory has 1 array of 2 different numbers.
Wow... well thanks B+, but there's a couple things you should know. First, I'm sure you guys have heard on here from people saying "It's hard to teach old dogs new tricks." Second, that tied together with my head injury problems, like very bad memory, often times I just forget things to use with programming. I know all of this can be fixed by lots of practice. SUB's are still a tiny bit in the gray area to me. I know what they are, like little programs within programs, etc. But I think one big reason I didn't even use GOSUBs in any of the code on this program is because each and every variable is different. Every planet is using different numbers at different locations with different colors. I'm not sure how I could make an array when everything is using different numbers at one time. And really, I think 2 different variables use the same memory has 1 array of 2 different numbers. Of course, you know tons more about it than I do so the way you program would have been much shorter I'm sure. But I'm still proud that this program only goes to line 237 with a lot of empty lines. :)