Lurker > Sahuagin

LurkerFAQs, Active DB, DB1, DB2, DB3, Database 4 ( 07.23.2018-12.31.2018 ), DB5, DB6, DB7, DB8, DB9, DB10, DB11, DB12, Clear
Board List
Page List: 1, 2, 3, 4, 5, 6, 7, 8, 9
TopicWho would you say "won" this hypothetical argument
Sahuagin
10/07/18 12:24:13 AM
#10
argonautweakend posted...
Person A states their belief. Person B enters and states why they feel A's opinion is wrong. Person A misinterprets B's argument and argues from that position. Person B restates their argument for clarity. Person A, again, misinterprets B's argument and argues from that position. Person B says they are done with the argument as a result and walks away.

inconclusive. we have no way of assessing which arguments are valid. for all we know Person A might be misinterpreting a valid argument, when Person B's rebuttal is actually invalid.
---
TopicCool function I wrote
Sahuagin
10/05/18 11:25:01 AM
#22
checking some of my code, one place I use ref is on string validation

bool ValidateAndClean(ref string pString) {
...
}


the bool return value indicates whether the string changed, and the string changes to a different string if it was "messy" (whatever that means in the context of the method)

Magus 10 posted...
Yeah, multiple returns is the scenario I was thinking about with tuples being another option, although I suppose in the case where you're checking an error return value then out params are probably a little easier to use.

another scenario is method chaining. if you want to return values while method chaining you have to use out parameters. I have a tree control where I build the parts of the tree in a method chain:


treeControl
.BuildLayers()
.AddLayer<T1, T2>(t2 => t2.Parent, t1 => t1.Children, out var layer1)
.AddLeafLayer<T2>(out var layer2);

// do stuff with layer1 and layer2


It's maybe a bit overkill, but I just wrote a method that allows me specifically to assign in a method chain, which allows me to avoid a starting variable at the top.


// generic extension method on object
T AssignTo<T>(
...this T pValue,
...out T pTarget
) =>
...pTarget = pValue;


turns this:


var myValue =
___methodChainStart
___.DoOneThing()
___.DoSomething()
___.ThenDoSomethingElse()
___.Select(x => x.SomeProperty);

// do something else with myValue

to this:

methodChainStart
.DoOneThing()
.DoSomething()
.ThenDoSomethingElse()
.Select(x => x.SomeProperty)
.AssignTo(out var myValue);

// do something else with myValue


it's not a huge difference, but it reads a lot nicer since the assignment is now where the actual value is instead of at the opposite end

also with TryParse, I actually clean it up so that I can write this:

if (someText.IsNot<int>(out var intValue))
...return;

// make use of intValue

---
TopicCool function I wrote
Sahuagin
10/05/18 2:22:33 AM
#20
Magus 10 posted...
You should never use ref unless you have a very good reason why (which 90% of the time is PInvoke, and the other 10% can probably be done a better way with tuples or something; edit: actually that's more likely the solution for out params, but I can't think of anything else for the other 10%).


one use for ref would be maybe if you had a counter that you wanted to pass between methods. then you can share the counter between a bunch of methods and increment it in any one of them. but then you can just put it in an object, too, which is better, so it's not super useful.

there are definitely some good uses for out parameters though, especially now that they aren't so clumsy in C# 7 with out var.

the standard example is something like:

if (!int.TryParse(someText, out var intValue))
...return;

// do something with intValue

---
TopicCool function I wrote
Sahuagin
10/05/18 2:09:23 AM
#19
Yellow posted...
Well, the idea is that it would take an existing object and turn it into a class, I don't see the point in passing the type independently when I can pass the type and the object at once.

right k, in that case you could just call .GetType() on the object. generic methods are definitely useful, but generics are a complexity that is often better removed when possible. basically you would make it generic if you needed it to be strongly typed, so if there was a return value or property somewhere that you wanted to be type T so that outside users would get back the type they're working with and not something like object.

a lot of the time too, you might have an overload that is generic on T, but then just passes typeof(T) to the real method that works on the Type object. the generic overload can be easier to use if the external context has a type parameter, and then the caller doesn't have to manually type typeof(T).

(I very often end up doing things this last way. the problem is that you can get a Type object from a generic T very easily, but if in the context you're working in you don't have a generic T, and you just have a Type object, you can't turn it into a generic T without some reflection. so usually the method that does all the work takes a Type object, and the generic method is just for convenience.)

Yellow posted...
I feel like half the time in C# I don't need to use ref as intended, since most objects just pass references anyway.

everything is passed by value, including object references. think of the ref keyword as meaning "in/out".

regular parameter: the value passed is received by the method. if the method changes the value of the parameter, nothing is changed "outside" of the method (the original variable that the value came from is not changed).

out parameter: you can't even pass in a value, you can only (and must) assign a value to the parameter within the method which then comes out of the method into a target variable. (new in C# 7 you can now use out var to create a variable inline, rather than define a variable on a separate line.)

ref parameter: you can pass in a value, *and* the parameter is linked to what was passed in such that if you modify the parameter, you modify the external variable. (the value of the variable, not the underlying object. so a ref list parameter means that you could pass back a different list than the one that was passed in (or you could pass back null). you don't need ref in order to manipulate the list, that already happens just by having a reference to the list).

in parameter (new in C# 7): you can pass in a value, but the method cannot change the parameter. basically a readonly parameter.
---
TopicCool function I wrote
Sahuagin
10/04/18 11:03:29 PM
#12
not sure what I should say. some random tips:

- look up StringBuilder
- your function doesn't need to be generic, you could just pass a Type as a parameter
- consider making it an instance of a class rather than a static class, and then push some data up into fields rather than passing arguments
- you don't need to use ref parameters, that's just if you would want to send a value back up from the function into the variable
- not that important, but should use C# names instead of .NET names for things like string VS String
---
TopicIn retrospect, Ultron kinda sucked
Sahuagin
10/04/18 10:50:24 PM
#2
oh for god's sake
---
TopicTom Wilson might be the biggest POS in DC
Sahuagin
10/03/18 9:52:53 PM
#2
thought you meant Biff. he's actually a pretty great guy IRL.
---
TopicI need general driving tips.
Sahuagin
10/03/18 2:26:19 AM
#7
family are terrible at teaching driving, take a driving course. you need to develop the right habits, and a course will teach you the right habits. when you get to the in-car part, the instructor will have his own brake pedal and will know the right way to instruct you while driving.
---
TopicSnow already? I'm supposed to have my first driving lesson tomorrow.
Sahuagin
10/03/18 2:08:20 AM
#24
Mario_VS_DK posted...
Same province I think, but I think you're farther north than me. Cause I'm pretty sure you're an Albertan right?

yeah Calgary
---
TopicOh no! Only 29 more days to Halloween!
Sahuagin
10/03/18 12:28:18 AM
#23
I had the stomach flu on Halloween like three years in a row as a kid

also my family are psychotically religiously opposed to it. they still give out the chick tract every year in fact.

https://www.chick.com/reading/tracts/0011/0011_01.asp

(oh, the point was, I don't exactly like Halloween, but I don't really hate it either)
---
TopicSnow already? I'm supposed to have my first driving lesson tomorrow.
Sahuagin
10/03/18 12:06:28 AM
#22
Mario_VS_DK posted...
Yikes. Glad I'm not there.

are you not from where I am? I have you marked as being from where I am. I assume you were talking about the same snow I have.
---
TopicWhat clothing store do you like to get your clothes from?
Sahuagin
10/02/18 9:47:34 PM
#39
HylianFox posted...
ugh, don't you fucking hate it when you find nice clothes that fit and feel amazing and you can never find anything else exactly like it?

I've thought of making a poll about it since I wondered if anyone else had that problem. I remember when I got them thinking I had ruined them when I nicked one of the legs. I figured they'd fall apart sooner or later. That was something like 15 years ago, and I still wear them every week.
---
TopicResearch Finds Half of Last Jedi Hate Aimed at Director Rian Johnson Came From P
Sahuagin
10/02/18 4:04:43 PM
#20
the guy literally said something like "I bet there will be a ton of people who walk out of the theatre thinking 'that was the worst movie I've ever seen', and you know, that's exactly the kind of movie I wanted to make; that's exactly the reaction I'm going for."
---
TopicSnow already? I'm supposed to have my first driving lesson tomorrow.
Sahuagin
10/02/18 3:59:43 PM
#14
man it's not just kind of snowy out, there's like a foot of snow. glad I had a take-a-day-off-anytime to cache in.
---
TopicWhat clothing store do you like to get your clothes from?
Sahuagin
10/02/18 3:51:39 PM
#35
shirts/socks: walmart
pants: adidas (also Wilson, the greatest pair I've ever owned is Wilson and it's lasted 10+ years and counting, but I've never found an exactly similar pair again)
---
TopicSo I ordered a pizza like an hour ago...
Sahuagin
10/02/18 1:29:47 AM
#20
it may be a lie or exaggeration. once when I was doing deliveries, I was late and had hurt my knee (only a little wasn't that bad), so gave the excuse that I had hurt my knee. apparently my boss turned that into telling the customer that I had been hit by a car. one customer in particular was very surprised to see me, asking if I was ok.
---
TopicWhy isn't tobacco a schedule I, it meets all the criteria probably
Sahuagin
10/02/18 1:22:04 AM
#11
Mead posted...
If it has a very high chance of giving you cancer or makes your lungs unable to push air back out until you become barrel chested and cant breathe, dying of suffocation, then its an unsafe substance

unhealthy, not unsafe. unsafe is like dangerous, like something that will injure or kill you right away.

unhealthy is like, well you're already dying a slow death *right now* just being mortal. doing things that are unhealthy just means you're very likely needlessly accelerating your slow death. healthy is just the slowest possible rate at which you can die.

Troll_Police_ posted...
cant it be used to treat IBS?

wording is "no currently accepted medical use". if anyone is literally prescribing cigarettes to treat that or another illness, then perhaps that one doesn't pass either.
---
TopicWhy isn't tobacco a schedule I, it meets all the criteria probably
Sahuagin
10/02/18 12:55:00 AM
#7
Lokarin posted...
400k deaths annually doesn't sound safe... tobacco in america kills more than crime worldwide

something being unhealthy doesn't make it "unsafe". unsafe is like if you'd die from smoking a whole pack in a day or something. (probably a strict definition of "safety" somewhere but I dunno where.)
---
TopicGOG have a vote up for the game they give away in two days
Sahuagin
10/01/18 9:41:09 PM
#16
DeltaBladeX posted...
Vote the game you heard of in my post

k done
---
TopicGOG have a vote up for the game they give away in two days
Sahuagin
10/01/18 9:37:19 PM
#14
game I never heard of VS game I never heard of VS game I never heard of
---
TopicHorrifying Accident for an AMERICAN Family REUNION involving a DRONE!!!
Sahuagin
10/01/18 9:35:07 PM
#3
Full Throttle posted...
She wasn't hurt but was disappointed

Horrifying!!!
---
TopicWhy isn't tobacco a schedule I, it meets all the criteria probably
Sahuagin
10/01/18 9:32:41 PM
#3
reading, it's supposed to be three things:
- high tendency to abuse (check)
- no medical use (check)
- severe safety concerns (fail) (actually written as: There is a lack of accepted safety for use of the drug...)
---
TopicFanboy reaction to Kathleen Kennedy's contract extension.
Sahuagin
10/01/18 9:27:31 PM
#11
most of my life I've just known Kathleen Kennedy and Frank Marshal as names that appear alongside the name Steven Spielberg, usually indicating an above average movie.

haven't seen TLJ yet though so have no opinion yet (and I don't care that much about SW anyway)
---
TopicBrain freeze from Ice Cream cake
Sahuagin
09/30/18 9:44:44 PM
#2
brain freeze can be frostbite to the roof of your mouth. it's not necessarily just fake pain, you can really be damaging your mouth (I found this out the hard way the past week actually...)
---
TopicMakin' a nasal snuff order
Sahuagin
09/30/18 11:46:07 AM
#6
supposed to be that it's similar to, though maybe not quite as bad as, smoking, and just gives you cancer in different places since it comes into contact/gets absorbed by different parts of you than smoke inhalation.
---
TopicWho is the strongest wizard/ magician/ whatevers in gaming?
Sahuagin
09/30/18 8:31:34 AM
#26
mooreandrew58 posted...
Well I think you'd be in the minority thinking the black waltzes aren't mages. Also porom and plaom from 4. While they did study and got better they where apparently prodigies that were naturally gifted and didnt need to be taught to use it, just to get better at it

I don't know the black waltzes

Porom and Palom have specifically been studying magic since being children. they are naturally talented, but they still learn and are still only performing magic through knowledge and skill.

the difference is something like, do I throw a fireball because for some reason that I'm not aware of I can just generate fireballs with my hands (magical being), or do I throw a fireball because I know that fire energy is channeled via the blah blah and moving my arms this way forms a conduit blah blah, and thus I get a fireball.
---
TopicWhite Woman forced to REMOVE a BLACK MAN Halloween Decoration being LYNCHED!!!
Sahuagin
09/30/18 8:19:50 AM
#23
Zeus posted...
anybody racist enough to publicly hang an effigy of a black man wouldn't lie about it.

completely unsupported assertion. people can and will lie about virtually everything.

adjl posted...
anyone stupid enough to want to do something like that in the first place probably thought that lie was sufficient to keep people from being upset with her.

that's more like it
---
TopicWho is the strongest wizard/ magician/ whatevers in gaming?
Sahuagin
09/30/18 1:32:13 AM
#21
mooreandrew58 posted...
Its like that sometimes though. In some lores some mages are just natural and didn't do jack to earn it

I feel like I wouldn't call that a mage then.

For Kefka and FF6 in general, it's kind of weird because... "magic" in that game all comes from Espers. There's little or no skill involved for anyone. Everyone just absorbs magical ability and gains it innately.

to me, a mage or a wizard is someone who has spent enormous amounts of time studying and learning and practicing and has knowledge and skill that are theoretically available to anyone, but they alone have earned the ability.

but I guess that's a needlessly strict definition that I just prefer. I know in D&D, sorcerers are supposed to have innate abilities, whereas wizards have worked hard for their skills.

I guess I prefer it to be about knowledge and skill. if you can just wave your hands and control magical energy innately, then you're just a magical being, not a practitioner of magic.
---
TopicWho is the strongest wizard/ magician/ whatevers in gaming?
Sahuagin
09/30/18 12:40:22 AM
#15
never really thought of Kefka as an actual mage since he didn't really do anything to earn his abilities
---
TopicWho is the strongest wizard/ magician/ whatevers in gaming?
Sahuagin
09/29/18 11:17:56 PM
#5
Irenicus

there was a thread before where someone tried to have a contest to see who was the most powerful mage. it seemed to turn out that there aren't actually all that many powerful mage characters unless you stretch the meaning quite a bit.
---
TopicNew York or Chicago style pizza
Sahuagin
09/29/18 11:10:35 PM
#74
Dikitain posted...
you like pinapple on pizza because you like pinapple, not because you like the combination of them together.

I don't think this is accurate. I love pineapple by itself. fresh pineapple is amazing. also, I can kind of appreciate the taste of pineapple + ham + mozarella cheese. but when it comes right down to it, I enjoy pizza a heckuva lot better if the pineapple is just removed altogether.

pineapple is just basically counter to how "normal" pizza tastes. it's the clash of tastes that I think people don't like, not the fact that they don't like pineapple itself.
---
Topicgo figure devry univ. was involved in the highest scoring college basketball gm
Sahuagin
09/29/18 12:48:47 PM
#5
TopicDoes anyone know how to work tv settings?
Sahuagin
09/29/18 11:32:09 AM
#3
Blorfenburger posted...
this annoying ghosting image

what's it look like? I bought a cheap 4k TV and it had 4 vertical ghost bars across the screen. depending on the scene it could range from not noticeable to extremely noticeable, usually somewhere in the middle. contrast and brightness settings could make it slightly less extreme, but only a little. returned it after a day.
---
TopicMy cousin's pet crab eating from a rock...
Sahuagin
09/28/18 2:17:56 AM
#7
it's basically a video. should just upload it to youtube.
---
TopicAnyone here with c++ experience willing to help my dumb ass
Sahuagin
09/28/18 1:52:57 AM
#11
OhhhJa posted...
I appreciate it. I have zero experience with programming and this course is online with pretty much zero teaching so I've been going through YouTube vids to learn. But yeah, my assistant just emailed me saying the same thing about just repeatedly testing different chunks of code

just to be clear, while on the one hand I am trying to say "learn to read documentation" and "learn to write test code", not really trying to discourage questions either.
---
TopicMy cousin's pet crab eating from a rock...
Sahuagin
09/28/18 1:49:21 AM
#5
TopicAnyone here with c++ experience willing to help my dumb ass
Sahuagin
09/27/18 11:56:16 PM
#8
http://www.cplusplus.com/reference/ostream/endl/?kw=endl
Inserts a new-line character and flushes the stream.

http://www.cplusplus.com/reference/ios/ios_base/precision/
seems like it stays set. you can also write a short program to test it, which is almost always better than asking.
---
TopicHey programming people; is it possible to render a hologram onto a texture?
Sahuagin
09/27/18 11:43:40 PM
#14
Lokarin posted...
well, what I mean is that I want to get a fake 3d effect from using only 3 (or more) lightmaps INSTEAD of just putting a 3d model in a cube

if you want to do something like have a bunch of textures, which are all the different ways of seeing the hologram, and then render the particular texture to the flat surface depending on the angle between the camera and the surface, that would be "very easy" to do.
---
TopicHey programming people; is it possible to render a hologram onto a texture?
Sahuagin
09/27/18 11:33:16 PM
#12
well I can't figure out what you're specifically asking for. depending what you mean, the answer could be anywhere from "3d games already do that" to "that's impossible to compute in real-time".
---
TopicHey programming people; is it possible to render a hologram onto a texture?
Sahuagin
09/27/18 11:24:03 PM
#10
Lokarin posted...
https://en.wikipedia.org/wiki/Radiosity_(computer_graphics)

yes, I was reading that, but it seems to be just one particular lighting algorithm that doesn't have anything to do with holograms.

so, I guess you're asking for a full light-simulation including having a holographic material in the scene that will appear holographic to the game character (which is possible only via the full light-sim)? (and it would not be holographic to the external viewer?)
---
TopicHey programming people; is it possible to render a hologram onto a texture?
Sahuagin
09/27/18 11:16:12 PM
#8
Lokarin posted...
Consider reflections in games. The easiest way to do them is to clone the terrain and flip it on the other side of the mirror.... very VERY few (virtually none) do reflections via radiosity.

when you say "radiosity" are you using that term to mean something specific or you're just using words that sound vaguely like what you're trying to describe?

"cloning the terrain" doesn't really sound like the right way to describe a reflection effect (it's close I guess). I haven't implemented a reflection before but it would I think use the same geometry with some kind of geometrical transformation applied, so that you'd see the same thing from a different angle, and then it would be rendered to a sub-region of the screen.

it sounds like maybe you're asking for real-time ray tracing? at some point it starts to be "six of one, half dozen of the other". 3d rendering works by (very roughly speaking) transforming models and drawing them on to a 2d surface, keeping track of whether the pixels being drawn should or should not be drawn on top of the previous pixels (z-buffering).

ray-tracing sort of works in reverse: for each pixel in the resulting image, figure out what color it should be by following the path a light ray would have taken to get there, keeping track of everything that was hit along the way, and using various math formulas to compute how they should affect the color. if a ray cast from the pixel immediately hits a red object, then it should be red. if it goes off into space, then it should be the background. etc.

ray tracing is traditionally very slow, though if you google it you can find some modern examples of real-time ray tracing:


I guess basically you need to be more specific
---
TopicNew York or Chicago style pizza
Sahuagin
09/27/18 9:55:18 PM
#27
Syntheticon posted...
basically a casserole

Dikitain posted...
not a casserole like Chicago

how is it like a casserole? isn't a casserole like a bunch of baked stuff, maybe with a top, but no bottom? chicago that I've had is just really thick pizza (also in squares but I don't think that's a requirement).
---
TopicHey programming people; is it possible to render a hologram onto a texture?
Sahuagin
09/27/18 9:32:06 PM
#6
what exactly is the effect? reading about it it just sounds like it's a 3D image recorded onto a 2D surface (ie: in such a way that it changes depending on perspective). so yeah, a mirror in a game, or even just 3D graphics as a whole, which generate 2D representations of 3D models. it's more like that 3D graphics are already doing what holograms are doing so much better that you don't even notice.

Lokarin posted...
EDIT: And I do mean by using the same technique as real holograms... not just using a 3d cubemap with a 3d model in it

that's like saying "using the same technique as real photographs, not just using a 2d image". are you looking for a full light-ray simulation or something? you could maybe do holographic ray-tracing, where you generate ray-tracing results from multiple perspectives. the result would have to be a gif or like one of those 360 degree videos or something.

thinking about it, maybe you mean that the result is literally 3D to the viewer? so moving the viewer's head changes what the image in front of him looks like? I've seen that done before with motion controls, so that the game knows where the viewer's head is:

---
TopicHave you ever been able to talk your way out of a speeding ticket ?
Sahuagin
09/26/18 10:30:24 PM
#19
only if you count not admitting that I speeded as "talking my way out of it".
---
TopicWhat would you say are the most intense* boss fights in a 2d platformer**
Sahuagin
09/26/18 10:27:39 PM
#13
good question

Mega Man X bosses for sure. some of them more than others, and it depends if you use something they're weak against, but a lot of them can be pretty intense if you use just the mega buster.

Contra 3, especially Level 3 and Level 4

(maybe these aren't "platformer"s though?)

Yoshi's Island maybe, particularly the last boss
---
Topicrate my promotional video for student president
Sahuagin
09/26/18 9:49:32 PM
#9
well you've doxxed yourself and the other people in the video. I shouldn't know your full name and where you go to school, for example. this should be deleted.
---
Topicrate my promotional video for student president
Sahuagin
09/26/18 9:43:29 PM
#6
guy, you should not be posting this. I was suspecting you were a fake account, but now it seems more likely you have some kind of mental problem. I guess maybe you're just woefully naive.
---
TopicI need free video editting software that's free and FAST
Sahuagin
09/26/18 9:30:52 PM
#10
Nomak-54 posted...
too late, video's finished b

so what did you use?
---
TopicI need free video editting software that's free and FAST
Sahuagin
09/26/18 9:12:32 PM
#5
TopicHow do you feel about multiple ending horror games where every ending is bad?
Sahuagin
09/26/18 2:00:23 AM
#21
Revelation34 posted...
You could use that logic on any choice based game.

sort of yeah. the same problem exists in any situation with choice: given two options A and B, it wouldn't make sense to make A a choice with a good outcome, and B a choice with a bad outcome, unless it's a riddle or something. (or even like that there are clues that B would be a stupid thing to do and A a smart thing to do; in that case you're rewarding the player for paying attention, though it could hurt replay value once you just know 'always A'). rather, to avoid that issue, the outcomes shouldn't be black and white, but complementary shades of gray (or maybe starkly contrasted outcomes but for role-playing purposes where you could have obviously good choice and obviously evil choice, or choice that benefits either faction A or B, etc.).

but for the horror game thing... the existence (or lack) of a good ending seems pretty significant, regardless of all of the above (depending precisely what 'good ending' means). it's a pretty big thematic difference. almost changes the genre if you overdid a good ending. if everyone CAN get out alive, then that's what you aim for, and anything less is some kind of loss. that's changing the genre of the game, or something.

on the other hand, something seems off if we say "horror must always have a bad ending", too.
---
Board List
Page List: 1, 2, 3, 4, 5, 6, 7, 8, 9