Sunday, March 26, 2017

Logging the Creation of a Beast -- the Good, the Bad, and the Template Metaprogramming.

Re: Sunday, March 26, 2017

Postby Silverware » Tue Mar 28, 2017 12:44 pm

RedDwarfMining wrote:Collision detection hogging frame rates? Turn it off. Turn it on when a entity nears another...should take awhile!


You are thinking of Coarse collision detection, Josh was speaking about fine collision detection.


Coarse collision detection, the long distance stuff was cheap and fast.
That is typically implemented as a minimum sphere around a ship, if two spheres interact (between two ships) then you know they are going to need collisions.
That is really quick, take the two points in space of the center of those spheres, get the distance between them, and compare it to the sum of the two spherical radii, if it is smaller they are colliding, if the same size or larger, they are not colliding. Easy.

Combined with Octtrees, you can be sure to only check things in a small region against each other. So you are doing typically less than 100 calculations with 100 ships in a region of space, per frame.
(Octtrees do pretty much exactly what you described, but only allow checks against nearby things)


The issue Josh had was with the fine collision detection, the stuff that detects exactly where ships are, the stuff that allows you to fly through asteroids, or to skim past the surface of a carrier. Or collide with an antenna.
This is a much more complex issue, and it seems Josh has resolve at least part of it.
With most systems, each part needs to be a convex mesh. And larger, or complicated ships need more meshes.
Each mesh usually needs to be tested against at least the ones that collide with the sphere from the coarse collision detection. Which could be the entire ship, if one is small and one is large.

There are options for this too, but they are too varied and complicated for me to bother typing out right now. :D



But don't worry about all that, Josh has it covered from the sounds. :clap:
Image
Image
User avatar
Silverware
Vice Admiral
 
Posts: 2959
Joined: Sun Sep 07, 2014 3:23 pm
Location: Goattown-Three, Sigma Six, Goat Space

Re: Sunday, March 26, 2017

Postby JanB1 » Tue Mar 28, 2017 12:58 pm

Silverware wrote:
RedDwarfMining wrote:Collision detection hogging frame rates? Turn it off. Turn it on when a entity nears another...should take awhile!

(...) the stuff that detects exactly where ships are, the stuff that allows you to fly through asteroids, or to skim past the surface of a carrier. Or collide with an antenna.
(...)


I hate it when in games you have a fence, but can't shoot through the spaces between the fence parts, because it's just one pig plane pane (thank you narwhalz :roll: ) with a texture and some transparency on it... :problem:
Last edited by JanB1 on Tue Mar 28, 2017 1:27 pm, edited 1 time in total.
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here

Flatfingers wrote:23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
User avatar
JanB1
Rear Admiral
 
Posts: 1251
Joined: Mon Mar 30, 2015 1:14 am
Location: Europe

Re: Sunday, March 26, 2017

Postby 0111narwhalz » Tue Mar 28, 2017 1:08 pm

JanB1 wrote: pig plane

Image
:ghost:
User avatar
0111narwhalz
Commander
 
Posts: 448
Joined: Mon Feb 01, 2016 11:40 pm

Re: Sunday, March 26, 2017

Postby Flatfingers » Tue Mar 28, 2017 1:45 pm

RedDwarfMining wrote:Make space games Navy based travel not a Air Force. boats not planes.

Naval aviators would like to have a word with you. ;)

I think I know what you mean, though. There's just something more interesting about big ships whose movement has to be planned versus more direct/immediate fighter craft.

That said, I suspect the Freelancer inspiration for Limit Theory means that fighters are required and capital ships are an option in LT, rather than the other way 'round.
User avatar
Flatfingers
Vice Admiral
 
Posts: 4536
Joined: Sat Nov 24, 2012 12:45 am

Re: Sunday, March 26, 2017

Postby Silverware » Tue Mar 28, 2017 1:57 pm

JanB1 wrote:
Silverware wrote:
RedDwarfMining wrote:Collision detection hogging frame rates? Turn it off. Turn it on when a entity nears another...should take awhile!

(...) the stuff that detects exactly where ships are, the stuff that allows you to fly through asteroids, or to skim past the surface of a carrier. Or collide with an antenna.
(...)


I hate it when in games you have a fence, but can't shoot through the spaces between the fence parts, because it's just one pig plane pane (thank you narwhalz :roll: ) with a texture and some transparency on it... :problem:


Yeah, using ray tracing (methods not perfect rays, because bullets fall in gravity :V) and checking where you collide with can be done. But many games don't do that. Its sad.
Image
Image
User avatar
Silverware
Vice Admiral
 
Posts: 2959
Joined: Sun Sep 07, 2014 3:23 pm
Location: Goattown-Three, Sigma Six, Goat Space

Re: Sunday, March 26, 2017

Postby Cornflakes_91 » Tue Mar 28, 2017 3:47 pm

RedDwarfMining wrote:How would the GTA/Skyrim/Witcher/ETC... work if they had to load their maps/entities so often/fast? What If their horses/cars/characters could travel @1800-10,000 m/s? Bet there would be one or two cases of 'pop in'...whole towns infact. :lol:

Hard to have nice things in space games...because they are going to be off screen in seconds!!

Make space games Navy based travel not a Air Force. boats not planes.

15 m/s limit on the big ships...20m/s frigates ...30m/s max all other craft. From a distance they would be barely moving...infact the universe would look frozen...nothing moving...until you get close to the entities and realize they're moving.

Collision detection hogging frame rates? Turn it off. Turn it on when a entity nears another...should take awhile!

The game Dreadnought does a pretty good job...I like that, but in deep space.

Star Citizen tried to slow down the ship speed and give the engine/server a rest...but the fanatics shouted that down.


And now scale the 10km/s to the relative scale and movement speed of the witcher and think again :P

"Absolute" movement speed means nothing.

an asteroid field with 1000 meter rock distance and 1000m/s top speed is exactly the same as a forest with 10m distance between trees and 10m/s top speed when sprinting or on horseback.
At least in terms of loading and detail density.
The forest very likely having higher density because its not just rocks in nothingness
User avatar
Cornflakes_91
Admiral
 
Posts: 9188
Joined: Wed Mar 06, 2013 1:53 am
Location: Austria

Re: Sunday, March 26, 2017

Postby Silverware » Tue Mar 28, 2017 4:24 pm

Cornflakes_91 wrote:
RedDwarfMining wrote:How would the GTA/Skyrim/Witcher/ETC... work if they had to load their maps/entities so often/fast? What If their horses/cars/characters could travel @1800-10,000 m/s? Bet there would be one or two cases of 'pop in'...whole towns infact. :lol:

Hard to have nice things in space games...because they are going to be off screen in seconds!!

Make space games Navy based travel not a Air Force. boats not planes.

15 m/s limit on the big ships...20m/s frigates ...30m/s max all other craft. From a distance they would be barely moving...infact the universe would look frozen...nothing moving...until you get close to the entities and realize they're moving.

Collision detection hogging frame rates? Turn it off. Turn it on when a entity nears another...should take awhile!

The game Dreadnought does a pretty good job...I like that, but in deep space.

Star Citizen tried to slow down the ship speed and give the engine/server a rest...but the fanatics shouted that down.


And now scale the 10km/s to the relative scale and movement speed of the witcher and think again :P

"Absolute" movement speed means nothing.

an asteroid field with 1000 meter rock distance and 1000m/s top speed is exactly the same as a forest with 10m distance between trees and 10m/s top speed when sprinting or on horseback.
At least in terms of loading and detail density.
The forest very likely having higher density because its not just rocks in nothingness


Except for Perspective scaling of the models...
The difference between 10m and 1010m away in perspective is reasonably large. (+1000m/s)
The difference between 10m and 20m is much less. (+10m/s)

This might be enough to cause perceived popping. Especially if we were trying to be efficient and making models switch out to sprites at far distances.
Image
Image
User avatar
Silverware
Vice Admiral
 
Posts: 2959
Joined: Sun Sep 07, 2014 3:23 pm
Location: Goattown-Three, Sigma Six, Goat Space

Re: Sunday, March 26, 2017

Postby RedDwarfMining » Tue Mar 28, 2017 5:36 pm

Pretty much what Silverware said. Thanks!

No big deal anyway...I plan on modding LT into the slow moving Navy vessel(boat :D ) game! If it takes 2 weeks to complete cargo runs, so be it.

I've played enough instant gratification games to know they are a dead end street for me.

Elite Dangerous is a perfect example: Get as much money as fast as you can...so you can get a bigger/better ship so you can make money as fast as you can.

Oh.. And i'm okay with any speed when the ship is interstellar.
User avatar
RedDwarfMining
Lieutenant
 
Posts: 88
Joined: Tue Nov 18, 2014 1:26 pm

Re: Sunday, March 26, 2017

Postby IronDuke » Tue Mar 28, 2017 6:18 pm

RedDwarfMining wrote:Elite Dangerous is a perfect example: Get as much money as fast as you can...so you can get a bigger/better ship so you can make money as fast as you can.

Seems a lot of the people on the game's forum complain it's too slow, but whatever. :ghost:

--IronDuke
Moving toward the future at 60 minutes per hour.
I-War 2 thread
Epic Limit Theory Limerick
User avatar
IronDuke
Rear Admiral
 
Posts: 1449
Joined: Mon Aug 31, 2015 10:47 pm
Location: The other end of the weapons barrage that's killing you. :3

Re: Sunday, March 26, 2017

Postby Silverware » Tue Mar 28, 2017 6:31 pm

RedDwarfMining wrote:No big deal anyway...I plan on modding LT into the slow moving Navy vessel(boat :D ) game! If it takes 2 weeks to complete cargo runs, so be it.


Should take this elsewhere, but think.
When ships are slow, its better to be well armored and shielded. Because you can't dodge.
Therefore ships get bigger to carry heavier guns and more armor. Thus get slower.

You turn it from a game around fighters, to one around massive capital-ships, where carriers are useless.

If fighters/bombers are overpowered, then capitals die off, and its Carriers + Strikecraft.
If fighters/bombers are under-powered then they die off, and its Battleships.

Its a very very fine balance.
After WW2 Fighters/Bombers got faster and deadlier, while boats didn't get much deadlier or faster. Its why we have carrier fleets now.
With the advent of railguns, over the horizon weapons, and better anti-missile defenses, we will start to have fast assault cruisers take the primary naval role, as other ships are too slow to dodge rails, or too small to use good rails.

Speed, armor/shielding, and weapon compactness dictates combat mechanics and spread of useful ship types.


Just in case you wanted to have carriers be useful :3
Image
Image
User avatar
Silverware
Vice Admiral
 
Posts: 2959
Joined: Sun Sep 07, 2014 3:23 pm
Location: Goattown-Three, Sigma Six, Goat Space

Re: Sunday, March 26, 2017

Postby JanB1 » Wed Mar 29, 2017 12:08 am

RedDwarfMining wrote:I've played enough instant gratification games to know they are a dead end street for me.


Hmm..."X3: Terran Conflict" or even "X3: Albion Prelude" could be a good game for you.

You have the option to start with an Argon "Mercury", a small freighter which costs about 189'335 Cr and has a speed of 50m/s (not upgraded) up to 100m/s (fully upgraded).

The better version of this ship costs 613'530 Cr. I'm telling you, it takes you ages to get the next better freighter. And even longer to get the capital freighter called "Mammoth" wich costs you 28'506'608 Cr.

And I won't even start how long it takes you till you'll be able to put our first factory into space. But it's not done with one factory, you need multiple to make profit. So, yeah. You'll spend man hours till you're one of the BIG traders.
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here

Flatfingers wrote:23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
User avatar
JanB1
Rear Admiral
 
Posts: 1251
Joined: Mon Mar 30, 2015 1:14 am
Location: Europe

Re: Sunday, March 26, 2017

Postby Cornflakes_91 » Wed Mar 29, 2017 1:15 am

Silverware wrote:Except for Perspective scaling of the models...
The difference between 10m and 1010m away in perspective is reasonably large. (+1000m/s)
The difference between 10m and 20m is much less. (+10m/s)

This might be enough to cause perceived popping. Especially if we were trying to be efficient and making models switch out to sprites at far distances.


Not when your actor (and thus perspective movement) gets scaled appropriately as well.
Relative scale, movement and detail has to scale the same way.
Of course it would make problems if geralt could go to mach 3, but he doesnt.
User avatar
Cornflakes_91
Admiral
 
Posts: 9188
Joined: Wed Mar 06, 2013 1:53 am
Location: Austria

Re: Sunday, March 26, 2017

Postby JoshParnell » Wed Mar 29, 2017 4:12 am

It still wonder how the X series handles collision detection. Especially Rebirth, just because the scale differences are enormous and some areas are absurdly populated in terms of sheer number of objects being drawn / simulated (Home of Light system / Terracorp HQ sector, for example..). I'm pretty darn impressed when I deploy I hacking drone that's absolutely tiny in comparison to a massive factor, and still collisions against the station seem triangle-perfect :shock:

Course, if this week has already brought us some powerful new technologies that will, hopefully, enable similar feats in LT :)

Also Re: RedDwarfMining, what Silverware said is correct (and important).

CD happens in two phases in games: broadphase and narrowphase. Broadphase is where we answer the question "what pairs of objects might be colliding?" Narrowphase we answer "are x and y colliding?" And we use different acceleration structures for the phases that are fine-tuned for answering those respective questions as efficiently as possible.

(And narrowphase between two complex objects that have a several-orders-of-magnitude scale difference is hard.)
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
User avatar
JoshParnell
Developer
 
Posts: 4260
Joined: Sun Oct 07, 2012 3:06 pm
Location: Baton Rouge, LA

Re: Sunday, March 26, 2017

Postby JanB1 » Wed Mar 29, 2017 4:15 am

[quote="JoshParnell"]It still wonder how the X series handles collision detection. (...)

Well, ask them.

They are a rather small developer, and I'm sure they will answer your questions if you ask nicely. :D
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here

Flatfingers wrote:23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
User avatar
JanB1
Rear Admiral
 
Posts: 1251
Joined: Mon Mar 30, 2015 1:14 am
Location: Europe

Re: Sunday, March 26, 2017

Postby JoshParnell » Wed Mar 29, 2017 4:16 am

True :) I'm acquainted with one of the graphics programmers.

Although in case you haven't noticed, I do have this fetish for re-inventing wheels without looking at references :ghost:
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
User avatar
JoshParnell
Developer
 
Posts: 4260
Joined: Sun Oct 07, 2012 3:06 pm
Location: Baton Rouge, LA

PreviousNext

Return to Dev Logs



Who is online

Users browsing this forum: JoshParnell and 10 guests