wtg62 wrote:Thank you for welcoming me here!
You're welcome! I hope you enjoy tes(*cough*SeriesofLeves*cough*)tubegames.com. I find it interesting how many people wander into TTG through GSim. This is actually how I got here myself. I found that it was the best GSim, too. It just seemed the most intuitive, practical, and user-friendly. Of course, other websites could have accretion disks, timers, rulers, prettier planets, etc., but this one just felt like someone built it for you to discover things, not just to watch circles flying around your screen. (It's obviously built for that, too, though)! It was just the only one without too much lag, an easy way to start over and pan and zoom and add all sorts of stuff, and its addition of tracks, and, importantly, the code you could use to share something. That just made it feel worthwhile to explore, especially with the ability to choose different exponents on r.
wtg62 wrote:Nope, I was looking around for some good gravity simulators, and so far this site has the best one I've seen yet.
Wait, so did you just find the link to it in Google, or did you click on the link from
testtubegames.com/gravity.html? Talking about URL's reminds me of something: do you want to know how to access past versions of GSim? Well, there are actually a bunch of hidden gamefiles at a specific url at TTG.com which have lots of cool stuff. I have a thread about it here:
viewtopic.php?f=3&t=126
wtg62 wrote:Didn't know it was requested before! I can only hope to see it sometime though.
I don't expect you to know that. I was just saying that not knowing that wasn't a bad thing.
wtg62 wrote:He's done it before, so like I said:
I don't doubt he could do it.
Simple actions like moving the view around, or zooming sound easy to make.
I'm a programmer myself, and it's sort of a complex thing to code. (
Or at least to me it is 
)
Hmmm... Here's what I would do:
//This isn't in any programming language, by the way, but hopefully it's easier to see how it might placed in one. It's kind-of java-y
Array planetx[x
1,x
2,x
3...]
//So that array would hold each planet's x position
Array planety[y
1,y
2,y
3...]
//That one holds y
Method paintStuff[] {
for(each planet) {
//Of course, the for loop wouldn't actual say each planet in the parantheses, but I didn't want to do extra work to include array length etc.
draw.circle(planetx[iteration]*pow(10,zoom)-centerx,planety[iteration]*pow(10,zoom)-centery,size*pow(10,size))
//This command would draw a circle and the current-iteration-of-the-for-loop-th planet's x and y, taking zooming and panning into account
}
}
Method senseMovement[] {
if(ZoomInKeyPressed) {
zoom+=0.1
}
if(ZoomOutKeyPressed) {
zoom-=0.1
}
if(PanMouseEvent) {
centerx=chginMouseX
centery=chginMouseY
}
}
//This might seem like a big bit of code, but it's really not. It took me 20 minutes to do when I haven't programmed in 6 months, so Andy should be able to add it in ~10 minutes, allowing you to finally see things going offscreen.
//Edit: I added in changing the size of planets depending on the zoom. I had accidentally overlooked that before.