[Development] Singularity Proof of Concept

A place to discuss mods in development and concepts for new mods.
Post Reply
Jeoshua
Militia Lieutenant
Militia Lieutenant
Posts: 163
Joined: Sat Sep 06, 2008 3:48 pm

Wed Dec 29, 2010 5:44 pm

This mod showcases several ideas I've had, and the hackish workarounds I've implemented to make them happen, including extremely large planets (which are actually to the scale given on the wiki, directly from george), stations you can actually fire straight through, and my personal favorite hack... Gravity.

Eventually it will have a story...

http://xelerus.de/index.php?s=mod&id=841

Note: If the mod doesn't work for you, open the xml file and remove the startingShip= line from the <AdventureDesc> section. Then disable the Umbra Playership.

User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2755
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

Fri Dec 31, 2010 12:26 am

aw man, nice job, but now i cant have antigrav ships that defy physics
Image
Image

*** AWAY ON SABBATICAL ***
** USE EMAIL TO CONTACT ME **

schilcote
Militia Captain
Militia Captain
Posts: 726
Joined: Sat Feb 02, 2008 7:22 pm

Fri Dec 31, 2010 2:30 am

I made gravity once... not sure what I did with it.
[schilcote] It doesn't have to be good, it just has to not be "wow is that the only thing you could think of" bad

User avatar
Wolfy
Fleet Admiral
Fleet Admiral
Posts: 5368
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Fri Dec 31, 2010 3:39 am

I believe you did it for the very first modding competition (the one where there were lots of delays because nobody followed my submission instructions resulting in lost and mis-sorted files for a month -_-)
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'hycrotan 'nonBinary))
Image

Jeoshua
Militia Lieutenant
Militia Lieutenant
Posts: 163
Joined: Sat Sep 06, 2008 3:48 pm

Fri Dec 31, 2010 5:47 pm

Uploaded a new version, using vector maths and a per-ship overflow catcher.

I never expected this to be unique, but it's something I've been wanting to make for-freaking-ever. I hope this is a slick enough implementation to get some attention.

User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2755
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

Sun Jan 02, 2011 3:28 am

Jeoshua wrote:Uploaded a new version, using vector maths and a per-ship overflow catcher.

I never expected this to be unique, but it's something I've been wanting to make for-freaking-ever. I hope this is a slick enough implementation to get some attention.
Slick enough? If its something new, its pretty slick. Don't worry about it.
Image
Image

*** AWAY ON SABBATICAL ***
** USE EMAIL TO CONTACT ME **

Jeoshua
Militia Lieutenant
Militia Lieutenant
Posts: 163
Joined: Sat Sep 06, 2008 3:48 pm

Sun Jan 02, 2011 4:54 pm

And I'm working on the next version, cleaning up code and extending the systems, yet again...

But this time it's different. I keep getting this weird bug where everything slides to the West at 10% lightspeed... which is really weird since the vector is always the same no matter where the gravity is (which is still applied, by the way).

Anyone else know anything about vector math, either in or out of TScript, that might be able to help me with tracking down this rediculous bug? Or understand it in some way so that I might do more effects with this gravity?

As it is, in 0.2 I am using gravObjects with a deffinite size. In other words, they're not point masses. Making a heavy object with no extent would make.... well... a singularity.

Understand where I got the name, yet?

User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2755
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

Sun Jan 02, 2011 7:46 pm

Jeoshua wrote:And I'm working on the next version, cleaning up code and extending the systems, yet again...

But this time it's different. I keep getting this weird bug where everything slides to the West at 10% lightspeed... which is really weird since the vector is always the same no matter where the gravity is (which is still applied, by the way).

Anyone else know anything about vector math, either in or out of TScript, that might be able to help me with tracking down this rediculous bug? Or understand it in some way so that I might do more effects with this gravity?

As it is, in 0.2 I am using gravObjects with a deffinite size. In other words, they're not point masses. Making a heavy object with no extent would make.... well... a singularity.

Understand where I got the name, yet?

No, I don't understand at all. :P Nice name, it honestly seems like a logic error, I'd recommend taking out anything moving in the code and trying to figure it out.
Image
Image

*** AWAY ON SABBATICAL ***
** USE EMAIL TO CONTACT ME **

Jeoshua
Militia Lieutenant
Militia Lieutenant
Posts: 163
Joined: Sat Sep 06, 2008 3:48 pm

Tue Jan 04, 2011 2:26 am

I need help to understand why this snippet of code isn't working. The whole thing returns good results the whole way through, then next time it doesn't work.

Interestingly, that last line in there, which is supposed to keep the remainder, is only works when theVelocity returns greater than 0. But that doesn't make any sense because theres not a conditional statement there.

http://transcendence.pastebin.com/1PfueuQV

User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Tue Jan 04, 2011 9:06 am

I am not sure what it might be. Since you are calling other of your own functions and using what appears to be global vars it is hard to know how the code runs.

Only thing that springs forward is that gravDistant is not declared in the block vars, so it will become global. The same goes for gravOutput, but that might be intentional.

Also, when you say it only works the first time through, do you mean the first time the function is called or the first iteration of the enum?

Jeoshua
Militia Lieutenant
Militia Lieutenant
Posts: 163
Joined: Sat Sep 06, 2008 3:48 pm

Tue Jan 04, 2011 6:55 pm

Actually, as usual, the act of asking forced me to go back and look.

It was the storage that was my problem. I wasn't bounds checking it, and it was causing an error. sysVectorSpeed was overflowing too, and when it does it returned 0x800000 (which is negative long int). And also returned 180 degrees of that. Since a negative number can still be divided, and divided by... it started moving me quickly to the west. I added some checks to see if the calculation returned anything. Now, not only does it work, but it works 100 times faster than it did before!

I just uploaded a new version too, with some added goodies.

Jeoshua
Militia Lieutenant
Militia Lieutenant
Posts: 163
Joined: Sat Sep 06, 2008 3:48 pm

Fri Jan 07, 2011 11:30 pm

Just uploaded another new version... this one works correctly on all counts.

Tell me if it doesn't

Post Reply