Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Jewel
May 2, 2009

MrBadidea posted:

https://www.youtube.com/watch?v=fAsg_xNzhcQ

I read through the associated paper with it a few months ago when I was coming up with my final year University project. They do the SVO construction/updates on the graphics card as a compute shader iirc. It sounded like a whole lot of pain in the rear end, so I decided to do some work with SubD surface tessellation.

I'm starting to think I would have enjoyed the compute shader work more (gently caress SDKMesh, FBX and Collada right in the eyes) :emo:

Ahah, this is the video I kept wanting to link but decided it was probably too slow for a large scale. Perhaps not though.

Adbot
ADBOT LOVES YOU

Shameproof
Mar 23, 2011

Does anyone know where I can find parallel un-DEFLATE library for any of the three GPU computing languages?

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Shameproof posted:

Does anyone know where I can find parallel un-DEFLATE library for any of the three GPU computing languages?
I don't think it's even possible to parallelize inflate, the entire concept of a sliding dictionary makes every unit of data dependent on the data before it being finished, so it's serial by nature.

Shameproof
Mar 23, 2011

Oh, right, of course. Hmm. Is there any sort of precedented lossless compression scheme that plays nice with GPUs?
I'm 80% of the way done writing the Segment tree I posted about a few pages pack (it's a skip list now), and I'm dreading having to marshal it to the GPU and read it in there.
And so I'm thinking it might be easier to store them just as arrays. Then I could simulate only the chunks in a roughly 100m square radius, and send the compressed forms of the more distant chunks straight to the GPU. Also, I'd ideally like to not have to write this stuff out myself :effort:

omeg
Sep 3, 2012

7-zip's LZMA is supposedly somewhat parallelizable, but no idea about its GPU implementations.

Hughlander
May 11, 2005

Nvidia presentation on it: http://developer.download.nvidia.com/GTC/PDF/GTC2012/PresentationPDF/S0361-GTC2012-Lossless-Data-Compression.pdf Apparently pbzip2 will increase in decompression with multiple CPUs but not to the same degree as compression according to another paper I found. I use pbzip2 all the time on a 16 core machine when I need to compress a SQL worklog 1TB in size...

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
I'm guessing that it's not possible to process entire blocks in parallel on the GPU? That seems like a better approach for BWT since there's no correlation between blocks.

Paniolo
Oct 9, 2007

Heads will roll.
So is there not a dedicated Unity thread, or is it just not in CoC?

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?
There's no dedicated Unity thread. If someone does do one, it should definitively be in CoC. The lower traffic would help it not sink like a stone.

(Once upon a time, we had a UDK thread, but it did miserably - maybe there's enough of us using Unity to keep a thread going, maybe not)

tehsid
Dec 24, 2007

Nobility is sadly overrated.

Shalinor posted:

There's no dedicated Unity thread. If someone does do one, it should definitively be in CoC. The lower traffic would help it not sink like a stone.

(Once upon a time, we had a UDK thread, but it did miserably - maybe there's enough of us using Unity to keep a thread going, maybe not)

I'd be really interested in seeing one. I've tried to spend so much time with unity but with my utter hate of most public forums, its rough getting help when you get stuck. A dedicated thread would be awesome.

Jewel
May 2, 2009

Shalinor posted:

There's no dedicated Unity thread. If someone does do one, it should definitively be in CoC. The lower traffic would help it not sink like a stone.

(Once upon a time, we had a UDK thread, but it did miserably - maybe there's enough of us using Unity to keep a thread going, maybe not)

The UDK thread might pick up again when UDK4 comes out (or a new thread for it). Although that is a while away.

Beef
Jul 26, 2004
Can anyone think of a space game that incorporated relativity?

Jewel
May 2, 2009

Beef posted:

Can anyone think of a space game that incorporated relativity?

Now I'm imagining a space game where you just press forward and suddenly due to the rapid change in momentum all your crew dies, game over.

The Cheshire Cat
Jun 10, 2008

Fun Shoe

Beef posted:

Can anyone think of a space game that incorporated relativity?

Define "incorporated". I think in Eve when you use the fast travel mode it blue/red shifts the light in front of/behind you, but it's just a little graphical tint overlay.

If you mean actually implementing the more complicated effects of relativity, like time dilation and increase in mass, then I'm not aware of anything like that. I think Notch originally said he'd planned on having that kind of physics simulation in 0x10c, but quickly backed off of that once he actually tried it.

Blue Footed Booby
Oct 4, 2006

got those happy feet

Jewel posted:

Now I'm imagining a space game where you just press forward and suddenly due to the rapid change in momentum all your crew dies, game over.

There really need to be more sci fi games that include some sci with their fi. I read a novel ages ago where a ship designed for some particular alien species had to carry passengers with much lower tolerances for g forces, and some other passengers who could only eat live mammals (which of course immediately got lose and started building nests in the life support system). The fragile aliens were also trisexual hermaphrodites.

What I'm trying to say is that one of you bastards needs to make a game that recreates the experience of being 12 and picking random books out of the library's science fiction section.

As for relativity in games, I think the big problem is how unintuitive it is. You can either dumb it down enough that it can be turned into game mechanics that regular folks can wrap their heads around, or you end up making something like that 4D FPS tech demo that's totally unplayable and only really good for inducing headaches. I guess you could have a game where time dilates while traveling at or near the speed of light, but at that point it seems like you just have a fast-travel elapsed time counter that happens to go really goddamn fast.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!

Shalinor posted:

There's no dedicated Unity thread. If someone does do one, it should definitively be in CoC. The lower traffic would help it not sink like a stone.

(Once upon a time, we had a UDK thread, but it did miserably - maybe there's enough of us using Unity to keep a thread going, maybe not)
I don't use Unity myself, but I don't mind the posts in here and don't think splintering this thread further is good. We already have a separate 'making games megathread' for some reason (why?)

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
The Unity posts aren't really derailing this thread any more than the XNA posts were however many pages back. It's not like this thread is moving terrifically fast. A lot of things are applicable across engines, so I think it's fine to have one thread.

Incidentally, I'm surprised that there's been almost nothing regarding the CryEngine 3 SDK.

Jewel
May 2, 2009

Orzo posted:

I don't use Unity myself, but I don't mind the posts in here and don't think splintering this thread further is good. We already have a separate 'making games megathread' for some reason (why?)

Imo that's more for designing them, or at least, should be. I like this thread separated from that one because programmers can answer eachother's questions without the thread cluttering from other things.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Jewel posted:

Imo that's more for designing them, or at least, should be. I like this thread separated from that one because programmers can answer eachother's questions without the thread cluttering from other things.
Yep. This.

I'm also of the mind that this thread is sufficient for Unity questions. Splintering off the UDK chat just killed it, and I'm... skeptical, that Unity posting would do any better. I think most of us just check the (quite good) Unity forums, if we have obscure questions.

That said, it's just my opinion as a person. Don't take that as The Mod Decision. If you guys want to try a Unity thread, hey, go for it, and definitely do it in CoC if anywhere.

Siliziumleben
Dec 4, 2003

The scientists' findings were astounding! They discovered that the powers of the Metroid might be harnessed for the good of civilization!

Beef posted:

Can anyone think of a space game that incorporated relativity?

Blue Footed Booby posted:

I guess you could have a game where time dilates while traveling at or near the speed of light, but at that point it seems like you just have a fast-travel elapsed time counter that happens to go really goddamn fast.
Elapsed time (as experienced by a stationary observer) or elapsed proper time (as experienced by the moving object)? :eng101:

I recently "finished" (got sick of working on) a "realistic" (not really) 2D space exploration game that features relativistic time dilation for the player's spaceship. I couldn't manage to make it affect gameplay that much - the main difference is that since in my game the player's ship propels itself forward at a constant acceleration, traveling to more distant star systems becomes more attractive with the inclusion of relativistic effects as the ship spends more time at near-light speed and thus the ratio between time and proper time increases.
Now that I think about it, this actually probably hurts gameplay because distance becomes less of a factor when the player has to decide where to go next. Although adding fuel resource management would probably mitigate that effect...

At any rate, I too would like to see a good hard sci-fi space game one of these days.

Opinion Haver
Apr 9, 2007

Blue Footed Booby posted:


As for relativity in games, I think the big problem is how unintuitive it is. You can either dumb it down enough that it can be turned into game mechanics that regular folks can wrap their heads around, or you end up making something like that 4D FPS tech demo that's totally unplayable and only really good for inducing headaches. I guess you could have a game where time dilates while traveling at or near the speed of light, but at that point it seems like you just have a fast-travel elapsed time counter that happens to go really goddamn fast.

Achron! I remember thinking that was cool as hell when it got announced but even then I realized that there was no way it was going to take off and that writing an AI for it would basically be impossible.

The Cheshire Cat
Jun 10, 2008

Fun Shoe
Achron actually came out: http://www.achrongame.com

It's not so much relativity as it is straight up time travel though.

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!
Speaking of Unity (as we are), what do people recommend for building a 2D game with it? More specifically, a 2D god game in the spirit of Settlers. I've heard of Futile, but that's about it. Any other recommendations or seconds for Futile?

Paniolo
Oct 9, 2007

Heads will roll.

Shalinor posted:

I'm also of the mind that this thread is sufficient for Unity questions.

Alrighty then. So, is it true that the best way to handle global state in Unity is to shove it in script components attached to game objects in an always-resident scene?

Also, is there any kind of render to texture camera support? (edit: Nevermind, I realize now this is pro-only.)

I've just started diving into it for a sort of a weekend project, but too much of the documentation and articles I've found are aimed at people who are just getting into game development. Anything out there aimed at more seasoned folks, particularly those with experience using other game engines, would be nifty.

Paniolo fucked around with this message at 04:30 on Oct 30, 2012

Serenade
Nov 5, 2011

"I should really learn to fucking read"
You can use a type of singleton for a global thing in unity.

Here is a pretty bare bones javascript implementation from like, a year ago. You don't need to add this to the scene, but it does have to be in the project.

Camera to texture is pro only.
e:f,b, by you.

Serenade fucked around with this message at 04:40 on Oct 30, 2012

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Serenade posted:

You can use a type of singleton for a global thing in unity.

Here is a pretty bare bones javascript implementation from like, a year ago. You don't need to add this to the scene, but it does have to be in the project.
Is there a reason to do it that way rather than just have static member functions and static member variables of a "globals" class, so you can just access them as, eg. "globals.highscore"? Seems weird to me to have a singleton that you have to initialize and/or check for the existence of every time you use anything from it, rather than just using statics which will always be there.

You might still need to call a static initialize function at the start of your game, of course, if any of your globals are something that can't be readily initialized with a default value, but globals.initialize() once (per scene, with a check in there for already initialized, if you want to be able to debug starting from other scenes) is surely still better than globals.getinstance() every time you want to use any global variable.

Serenade
Nov 5, 2011

"I should really learn to fucking read"
I think the reason that doesn't work is because of Unity weirdness.

For example, attempting to use 'BoardMaster.paused' gives the error
code:
Assets/Test.js(9,21): BCE0020: An instance of type 'BoardMaster' is required to access non static member 'paused'.
However I could be wrong, I doubt it's the most optimal solution and it's been a while since I've touched it. This was a case of it working so it being good enough.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!
Yeah, that's because paused would need to be declared like "public static boolean paused=false;" or something. (Been using too many languages recently so I'm not sure exactly, but you have to declare every global variable as static to do it my way.)

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Er, it's a singleton. You want BoardMaster.getInstance().paused.

Erz
Sep 9, 2004
I'm a beginner at programming but I believe the main reason to use a singleton is so fields show in the inspector. GameObjects can also persist through scenes but I'm not sure about statics, so maybe that too.

In that boardmaster script I'd personally move getInstance() calls inside it instead of needing to type it every time in other scripts. I use c# but something like this:

public static function pause () { getInstance().paused = true; }

Then you can just use BoardMaster.pause() the rest of the time.

e: also you can't start coroutines in static methods

Serenade
Nov 5, 2011

"I should really learn to fucking read"

roomforthetuna posted:

Yeah, that's because paused would need to be declared like "public static boolean paused=false;" or something. (Been using too many languages recently so I'm not sure exactly, but you have to declare every global variable as static to do it my way.)
That actually did work. I seem to recall having some trouble with the static keyword in Unity's javascript, but "public static var paused : boolean = false ; " and a lone "Debug.Log( BoardMaster.paused ) ;" in a separate file did work.

I cannot actually remember why I did it this way.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!
Erz makes some good points - no coroutines could be important for some global functions, and debugging inspector access can be helpful too. statics definitely persist across scenes though (and without having to be explicitly told to do so, unlike a game object). So I'd say the answer to "So, is it true that the best way to handle global state in Unity is to shove it in script components attached to game objects in an always-resident scene?" is "depends what you're trying to achieve with your global state!"

I've not wanted anything to be global that wasn't easiest managed with a simple class full of static variables, myself.

Beef
Jul 26, 2004

The Cheshire Cat posted:

Define "incorporated". I think in Eve when you use the fast travel mode it blue/red shifts the light in front of/behind you, but it's just a little graphical tint overlay.

I was more thinking of a solar system scale fleet combat game.
Relativity would affect the spread of information. For example, you jump into the system and it takes a few hours before the enemies actually know about it. In other words, information doesn't propagate instantly. A fleet-combat like game, think DEFCON like interface, is mostly about information, so I'm guessing that would make a fun gimmick.

Relativity could also play in a more indirect way. It makes it really hard to engage at longer ranges when individual ships are hitting 0.1 or 0.2 light speed. That can just be incorporated in the hit % or engagement ranges.


I finally got some free time to work on a project, that's after finishing more than a year of grueling work on my PhD. Should I better flesh out the idea before starting to prototype the thing?

Hughlander
May 11, 2005

Beef posted:

I was more thinking of a solar system scale fleet combat game.
Relativity would affect the spread of information. For example, you jump into the system and it takes a few hours before the enemies actually know about it. In other words, information doesn't propagate instantly. A fleet-combat like game, think DEFCON like interface, is mostly about information, so I'm guessing that would make a fun gimmick.

Relativity could also play in a more indirect way. It makes it really hard to engage at longer ranges when individual ships are hitting 0.1 or 0.2 light speed. That can just be incorporated in the hit % or engagement ranges.


I finally got some free time to work on a project, that's after finishing more than a year of grueling work on my PhD. Should I better flesh out the idea before starting to prototype the thing?

Heck, I don't know of any game that includes traveling a solar system with Newtonian Physics... I kept thinking about an Honor Harrington RTS where at physics were Newtonian but with an acceleration rate measured in the hundreds of gs. Even then you'd probably want to play 90% of it at 100x speed or so.

"Ok, we've set our course, we're accelerating in 9 hours we'll be in weapons range! For oh 3 seconds."

Beef
Jul 26, 2004
Honor Harrington and Lost Fleet style of games was exactly what I had in mind :)

What I currently have in mind are simple static orbital ellipses for the planets, but dynamically calculate velocities of any other objects, such as your ships or fleet. So it's a mix of Kepler and Newton :D

The interface will have to be really good to plan courses and orbits. The most intuitive seems to extrapolate a curve in time and space ahead, moving your mouse bends the curve and clicking sets fixed points in time and space: I need to be there at that time. Intercepting a moving object is a bit trickier, but should basically be 'intercept this' for the user.

I suspect making this fun at all will be a lot harder than any of the physics will ever be :psyduck:

The Cheshire Cat
Jun 10, 2008

Fun Shoe

Beef posted:

Honor Harrington and Lost Fleet style of games was exactly what I had in mind :)

What I currently have in mind are simple static orbital ellipses for the planets, but dynamically calculate velocities of any other objects, such as your ships or fleet. So it's a mix of Kepler and Newton :D

The interface will have to be really good to plan courses and orbits. The most intuitive seems to extrapolate a curve in time and space ahead, moving your mouse bends the curve and clicking sets fixed points in time and space: I need to be there at that time. Intercepting a moving object is a bit trickier, but should basically be 'intercept this' for the user.

I suspect making this fun at all will be a lot harder than any of the physics will ever be :psyduck:

You just need to make the explosions REALLY satisfying if you manage to intercept something moving at relativistic speeds.

Would your orders to ships be instant or travel at light speed as well? It might be an interesting strategic consideration to have it so that your units response time to orders will depend on how far away they are from a base (you could maybe construct bases closer to the battlefront to speed up your orders and explain it away as quantum entanglement connecting them instantaneously to your main base. Or just explain it that "your" orders are just whatever the local fleet admiral came up with on his own). You'd probably want to factor that response time in to the spacetime curve extrapolation, so your units don't end up receiving orders like "I need you to be at spacial coordinate X Y Z six hours ago" (unless you want to really go nuts with the physics and implement traveling backwards through time via tachyons).

And yeah, you would probably want the game to have a massively accelerated timescale. Unless it's meant to be a browser game where you just log in once a day and give out your orders, then come back the next day to see how it all played out.

The Cheshire Cat fucked around with this message at 16:16 on Oct 30, 2012

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?
I would argue that you do not want GameObjects to persist across scene loads. In practice, it is almost impossible to get such an object to respond to a scene load, which means if it was tracking ANYTHING in-scene, you've now got a lot of pointers in a very weird stare. They don't even invalidate immediately - there's seemingly a window before it realizes the GameObject pointer it had is now bad.

... instead, I would highly recommend building static singletons that bake out to PlayerPrefs on destruction, and reload from PlayerPrefs on load. All the convenience of a global always-there singleton, but they can actually respond to scene change events in a sane fashion via their usual Awake() method.

Just be sure you prefab them out. Nothing sucks more than needing to tweak such a global manager, only to realize each scene has its own version.

Beef
Jul 26, 2004

The Cheshire Cat posted:

You just need to make the explosions REALLY satisfying if you manage to intercept something moving at relativistic speeds.

Good point. Maybe make the pieces of the wreck scatter along the original trajectory :)


quote:

Would your orders to ships be instant or travel at light speed as well? It might be an interesting strategic consideration to have it so that your units response time to orders will depend on how far away they are from a base (you could maybe construct bases closer to the battlefront to speed up your orders and explain it away as quantum entanglement connecting them instantaneously to your main base. Or just explain it that "your" orders are just whatever the local fleet admiral came up with on his own). You'd probably want to factor that response time in to the spacetime curve extrapolation, so your units don't end up receiving orders like "I need you to be at spacial coordinate X Y Z six hours ago".


That's the idea, all information on your units and enemy units 'travel' at light speed. You indeed need to put the players somewhere on the battlefield to have a measure of distance, be it in a flagship or planetary CnC.

Some of the old groignard games for Napoleonic times incorporated a similar delayed-order mechanic, accounting for the time it took for runners to come and go with the carried information. Implementing this should be as simple as timestamping events and organising the game information around priority queues.

Time acceleration probably needs to be a bit more than just '100x speed' buttons; pausing at new events seems critical in that kind engagements.


My current plan is to hack together in Lisp+SDL a 2D solar system prototype with dynamic ship orbits. Then start fleshing out more of the design, before I start sounding like a 16-year old pitching a game idea.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Hughlander posted:

"Ok, we've set our course, we're accelerating in 9 hours we'll be in weapons range! For oh 3 seconds."
Honestly if you want some "hard" sci-fi then you can probably stop well short of relativity and just get spaceship design to stop mimicking fixed-wing aircraft design.

There is no air, lift, drag, or gravity, you have 6 DOF and can maintain a dead stop with no power, surely that means you can do more than strap a single thruster to the rear end-end and stick some useless fins out of the side!

OneEightHundred fucked around with this message at 17:04 on Oct 30, 2012

Adbot
ADBOT LOVES YOU

Beef
Jul 26, 2004
A good excuse for programmer art if I ever heard one.

"A sphere is obviously the best design, so that's why everything are just circles! Realism!"

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply