Welcome aboard Visitor...

Daily Screenshot

Server Costs Target

Target met!

Latest Topics

- help me »
- Anyone still playing from a decade ago or longer? »
- Game still active. NICE! »
- Password resett »
- Darkspace Idea/Opinion Submission Thread »
- Rank Bug maybe? »
- Next patch .... »
- Nobody will remember me...but. »
- 22 years...asking for help from one community to another »
- DS on Ubuntu? »

Development Blog

- Roadmap »
- Hello strangers, it’s been a while... »
- State of DarkSpace Development »
- Potential planetary interdictor changes! »
- The Silent Cartographer »

Combat Kills

Combat kills in last 24 hours:
Kills chart
UGTO (0) ICC (0) K'Luth (1)

Upcoming Events

- Weekly DarkSpace
07/20/24 +8.9 Hours



23th - Sheng
20th - kedimedi

Social Media

Why not join us on Discord for a chat, or follow us on Twitter or Facebook for more information and fan updates?


DarkSpace - Beta

Forum Index » » Soap Box » » Gravity Game Revisited
 Author Gravity Game Revisited
Grand Admiral
Pitch Black

Joined: August 26, 2005
Posts: 1017
From: Virginia, United States
Posted: 2008-01-08 13:38   
So, I am sure you all remember the final program I came up with a few months back, wherein particles of mass would gravitate towards each other, impact, etc.

Well, I have been tinkering again.

I have added the fabric of space to the program, thus making the gravity wells visible. It should be noted that with this spacial grid is active, the program runs MUCH slower, but returns to normal speed when the grid is turned back off.


A: Alternate gravity (switch from attract to repel, and vice versa)

R: Reset

T: Start/Stop Time (This pertains only to the particles and not the switching of gravity)

N: Turns NOVA on/off (initially off. Causes masses greater than ten (white) to explode into pieces with a sum mass of initial total minus one).

G: gravity grid on/off

J & L: Rotate the plane of the view back and forth.

K: return plane of space to initial position (flat view)

Q: switches between grid POINTS and grid LINES for the gravity wells. Only the points are well programmed and in 3 dimensions. The Lines are still a work in progress. Interesting to looks at, but rather obstructive to the view of the particles.

L Mouse: Place a single particle.

R Mouse: Think spray-paint on MS Paint

L+R Mouse: place all remaining available particles (of mass 1)

keyboard numbers 1-5: sets mass of placed particles.


Notes on performance: The game has a MAX number of points as well as a MAX total mass. This means it will stop you when you reach the maximum mass even of there is only one (massive) particle in play. I think it is currently set to 400. I highly recommend FEW particles in play, but of any mass you like. The program lags from the number of particles, not by their mass.

Note: although they appear to remain the same size, each particle's radius of impact is directly related to its MASS. So, a single massive particle will absorb a smaller particle at farther distances than a TINY particle.

Have fun. Suggest anything (from ideas on additions to the program, to ways to rework it so that it may run faster, to ideas on better controls or controls you would like to have added).

LINK: http://www.mediafire.com/?7yibnmtyeko

Gravity.exe - Palestar Download Mirror

Notice it is on mediafire. Anyone with access can feel free to move it to Jack's server and provide a new link, since this one will probably expire in a few days/weeks.

[ This Message was edited by: Mr Black on 2008-01-08 14:51 ]

Grand Admiral

Joined: February 27, 2007
Posts: 220
From: Red Light District
Posted: 2008-01-08 14:10   
thats all types of awesome, thanks for reposting it! Im gonna go play
Noob you say? I may fly an escort destroyer...but I just stayed at a Holiday Inn.

  Goto the website of Phellan
Mr Black
Grand Admiral

Joined: September 20, 2003
Posts: 486
From: Gaifenland
Posted: 2008-01-08 14:50   
Nice. Uploaded to the DS downloads section - see OP for link.
DarkSpace Administrator - \\r\\n

Galactic Navy

Joined: November 21, 2001
Posts: 1130
From: Bandcamp
Posted: 2008-01-08 15:47   


[ This Message was edited by: kenetiks on 2008-01-08 15:50 ]

  Email kenetiks   Goto the website of kenetiks
G.Adm. Kirk
Grand Admiral
Courageous Elite Commandos

Joined: May 13, 2005
Posts: 91
From: Baton Rouge, LA
Posted: 2008-01-08 19:37   
What is this coded in? Is the source public?

Grand Admiral
Pitch Black

Joined: August 26, 2005
Posts: 1017
From: Virginia, United States
Posted: 2008-01-08 19:58   
I wrote this with Dev-C++. I could provide the code. Ill do that tomorrow.

Thanks, Mr Black, for providing a link to it directly on the DS website.

G.Adm. Kirk
Grand Admiral
Courageous Elite Commandos

Joined: May 13, 2005
Posts: 91
From: Baton Rouge, LA
Posted: 2008-01-08 20:10   
I'm a Java nerd so I could probably at least read that. I am quite interested in the math behind it and it's graphical implementation.

Grand Admiral
Pitch Black

Joined: August 26, 2005
Posts: 1017
From: Virginia, United States
Posted: 2008-01-09 13:30   
Here is a link to the code. I just ran down the entire 800 lines of it, putting in a basic explanation of what is going on.

Link: http://www.mediafire.com/?eto91osd914

I pretty much use for loops and arrays to store and determine data. The rest are just physics calculations (with a bit of fudging the numbers to make it looks good on a computer).

I was wrong btw in my first post. The max particle count (and max mass for that matter) is 800.

make sure your 'word wrap' for notebook is turned off when viewing it.


On a related note, I could see it possible to have a similar gravity-function added to DS, not to make the planets and all have annoying gravity wells, but in a different way.

We can assume that our sublight engines automatically account for gravity pulling us one way or another and thrusters cancel any such movement, thus keeping the game the way it is now.

However, in 484, systems will be separated by loading screens (or at least I have heard), so no 2 systems can influence each other. This makes my idea very doable.

Here is the idea. Everytime you jump, the server runs a calculation, based on the masses of every planet, moon and star in the system, and your jump path is bent and curved accordingly.

This particle game does the calculation for hundreds of particles, each acting on all others. A system would be much simpler. The planets will not be pulled by the ships or other planets, so we only have to run the calculation for each ship in the system every time it jump. I can't imagine that would be overly heavy on the server or cause substantial lag, esspecially if a profesional programmer did the job instead of my sloppy work.

How about it? Would be wicked cool! You know you want to... Bring jump navigation out of the noob zone and make it like combat (where skill and experience determine the shortest/fastest jump path).

[ This Message was edited by: Kanman *FC* on 2008-01-09 14:00 ]

Chief Marshal
Raven Warriors

Joined: May 19, 2002
Posts: 2576
From: Hawthorne, Nevada
Posted: 2008-01-10 14:30   
Needs moar awesome.

Well just stuff to mess around with. Little pixels changing color really doesn't invoke a feeling of satisfaction.

Very neat though.


Page created in 0.033128 seconds.

Copyright © 2000 - 2024 Palestar Inc. All rights reserved worldwide.
Terms of use - DarkSpace is a Registered Trademark of PALESTAR