Welcome aboard Visitor...

Daily Screenshot

Server Costs Target

Time running out!

54% of target met.

Latest Topics

- 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? »
- Medal Breakpoints »

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:
No kills today... yet.

Upcoming Events

- Weekly DarkSpace
03/30/24 +2.1 Days

Search

Anniversaries

No anniversaries today.

Social Media

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

Network

DarkSpace
DarkSpace - Beta
Palestar

[FAQ
Forum Index » » Soap Box » » Gravity Game Revisited
 Author Gravity Game Revisited
Kanman
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.

CONTROLS:

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.

END CONTROLS.


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 ]
_________________


Phellan
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
Palestar


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.
_________________
\\r\\n
DarkSpace Administrator - \\r\\n
drafell@palestar.com

kenetiks
Admiral
Galactic Navy


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

Screenshot.
http://osiris.thegeekbox.com/~kenetiks/images/ken24.jpg

[ 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?
_________________


Kanman
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.
_________________


Kanman
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.


EDIT:

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 ]
_________________


Enterprise
Chief Marshal

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.




-Ent
_________________


Page created in 0.012204 seconds.


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