Using celestia code in a game

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
tyreth

Using celestia code in a game

Post #1by tyreth » 24.02.2003, 14:55

Hello,

I am working on a GPL game which is set in our solar system. It's going to be a game of space combat like homeworld but with empire management like Master of Orion or Imperium Galactica (http://www.sourceforge.net/projects/soldominion).

The Celestia code probably has a lot of the stuff we'll need to accurately reflect the solar system. So I was wondering what's the best way to integrate the code into this project? We've already started coding, so is there libraries with celestia that we can link to, or other ways to extract the code we need? Just looking for any hints, tips, advice, etc that might aid us.

Thanks

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #2by selden » 24.02.2003, 15:52

I think you may be "reinventing the wheel". See http://mostlyharmless.sourceforge.net/index.htm

At least you should investigate combining your efforts.
Selden

Guest

Post #3by Guest » 25.02.2003, 01:20

Actually i think our projects sound very different. This one sounds more like a large scale (galaxies) trading game, whereas ours is focussed on our solar system only.

But the scale is only one difference, in our game you control an entire empire that is trying to reach out to the planets in our solar system for the first time, and the challenges and wars that arise from that.

So theres colony & technololgy management.

Unless I'm misinterpreting you and you mean just working together on the using of Celestia for a game :)

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #4by selden » 25.02.2003, 01:33

I was primarily thinking of the aspect of using Celestia as the kernel of the display engine. "Mostly Harmless" already includes modifications to implement gravity as it affects the viewpoint spacecraft, for example.
Selden

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #5by marc » 25.02.2003, 03:50

Your game idea certainly sounds different.
I havn't linked to celestia as such, ive just been hacking at celestia to try and change it into a game. This may or may not be a good approach to creating a game.

As for tips on how to get started. Print out some chunks of the celestia code and start reading. Then you should be able to figure out what you can or cant use.

If your game is only going to be sol system based then using celestia might be a bit of an overkill. Though im not familiar with it, orbiter might be more suitable. Or it might be better to use one of the open source 3d engines such as Crystal Space

http://sourceforge.net/softwaremap/trov ... rm_cat=110

Topic author
tyreth

Post #6by tyreth » 26.02.2003, 07:38

cool, you live in Melbourne, so do I :) Yeah I might have a read through the sources that is the best way. Maybe I'll just cut and paste the code that will be useful, so that we don't need to re-invent the wheel - but rather than build our game around celestia, we'll build the celestia code into our game.

That might be a better approach.
So how many people helping you with Mostly Harmless?

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #7by marc » 27.02.2003, 01:25

Just me, though i have a number of poeple ready to go with artwork and content.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #8by selden » 27.09.2004, 11:41

I have to apologize to someone posting as "The Kryptonian" -- I accidentally deleted the post while trying to respond.

Essentially, he wrote that he was distressed that "Mostly Harmless" only worked on Windows, becuase Windows doesn't easily support Grid computing, multiple-system graphics, scripting, and other useful functions that Linux can do easily.

(Un)fortunately, Windows can do all of those things, and Cornell's Theory Center will be delighted to show you how. See http://www.tc.cornell.edu/news/releases/2004/winhpc4.htm

Even so, I'm sure Marc would welcome suggestions and/or help in making Mostly Harmless cross-platform compatible.
Selden

Guest

Post #9by Guest » 27.09.2004, 16:17

lol actually selden was exercising his 'evil mod' abilitiea muahahaha....

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #10by Rassilon » 27.09.2004, 16:18

^me
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

thekryptonian
Posts: 5
Joined: 31.10.2004
With us: 20 years
Location: Simi Valley

Certainly possible, but possibly not desirable...

Post #11by thekryptonian » 19.12.2004, 09:08

selden wrote:I have to apologize to someone posting as "The Kryptonian" -- I accidentally deleted the post while trying to respond.

Essentially, he wrote that he was distressed that "Mostly Harmless" only worked on Windows, becuase Windows doesn't easily support Grid computing, multiple-system graphics, scripting, and other useful functions that Linux can do easily.

(Un)fortunately, Windows can do all of those things, and Cornell's Theory Center will be delighted to show you how. See http://www.tc.cornell.edu/news/releases/2004/winhpc4.htm

Even so, I'm sure Marc would welcome suggestions and/or help in making Mostly Harmless cross-platform compatible.


I've seen the cluster computing solutions for Windows. While it's impressive that you can get windows to do cluster computing, it's still not grid computing, as it relies on a central task manager that manages resources for all the other machines. True grid computing makes distribution decisions on a collective basis, and does not require expensive development tools and libraries to make it work.

As for the other things, it's much easier to start with an operating system that was built from the beginning to do these sorts of tasks, so we chose Linux for our project.

I was initially rather excited to see Marc's project - while I couldn't get Marc's version to run, I was able to inspect his code. At this point I'm thinking that it might be easier to modify some of what he's done and use it in our project (which will also be released under the GPL) rather than build on his code base as a foundation.

jeshua
Posts: 2
Joined: 08.01.2006
With us: 18 years 10 months

Post #12by jeshua » 08.01.2006, 19:33

Hello I am a student in mathematics and I think that what a space game needs is real gravity. Let me explain, make it so that if you get enough ships together to attach to an asteroid and that you can be able to change its course to hit an enemy target planet. Well that would be only one of the advantages of real gravity in a space game. I have come up with an n-body vector equation that I was able to putt on Microsoft Excel and actually get results. I think that it is definitely a cool thing if you need to constantly change your velocity and orbit and maneuver a little in order to land your ship on a space station while all the forces and physical laws are at work. If you are interested in the equation I can send you a copy with instructions of what all the symbols mean. It is a recursive equation so it refers back to itself; and therefore, all you need to know is the mass, where it started and its initial velocity of all the objects.

Jeshua

GlobeMaker
Posts: 216
Joined: 30.10.2005
With us: 19 years

Post #13by GlobeMaker » 08.01.2006, 22:38

Hi Jeshua,

If you can program in C++ you are free to edit the open source software
and implement anything you want. But if you want someone else to
do that for you, that is not likely to happen. There have been many
people who say they want gravity in Celestia, but the key people
have good reasons not to add gravity. If you use the search utility,
you can read about why gravity is rejected as an improvement.

As an alternative to gravity, I am working to provide rocket motors
by the end of 2006. Do you want to help write C++ classes to make
rocket motors? If yes, then more details will be provided. If you
do not program with C++, then your spreadsheet is as close as gravity
will come to Celestia. Your mathematical skills are of interest to me,
if they can be coded in C++.

Jeshua said,
" if you get enough ships together to attach to an asteroid and that you can be able to change its course ".

Yes, excellent, that is my goal also
over the next 11 months of C++ work. The ships will have motors to
move .3ds objects independently of their pre-calculated orbits, but
not subject to any accurate gravitational modeling. It may be useful
to have inaccurate 2 body gravity modeled, but when 20 bodies
all need accurate gravity simultaneously, the video frame rate
slows down too much.

Best wishes...
Your wish is my command line.

jeshua
Posts: 2
Joined: 08.01.2006
With us: 18 years 10 months

Post #14by jeshua » 09.01.2006, 06:02

So do you mean that all you will be using is the conservation laws of mometum and energy. I am sorry Programming c++ ? is not my forte. I do; however, understand why no game maker has used any extensive gravitational number chrunching, because no pc would run with that load of work. I hope only that when computers come a ways it will happen; then even a whole Matrix thing could run. Well, good luck.

Jeshua


Return to “Development”