No, actually. They dumped UnrealScript, so it's primarily C++ now. There IS a scripting system called Blueprint but it's not really a language as much as a visual graph logic designer. Basically what Kismet used to be in UE3/UDK.
Posts made by Masaaki_Hosoi
-
RE: Game switching Unity versions mid development turned out to be TR :wtf:
-
RE: The W3C is at it again!
The W3C was going to include OGG in the standard but Apple and Nokia killed it.
Why the fuck.
Vorbis and Theora are basically about as patent free as you can get in a codec these days. And Vorbis kicks MP3's ass in terms of quality versus space. -
RE: Hackers can take over any Chrysler vehicle from the last 2 years. Yes, fully remotely. Yes, including steering, brakes and transmision.
As far as having the entertainment center display diagnostics...
The idea of having thing A query thing B for data without allowing an attacker to compromise thing B somehow seems familiar but.... hm.... where have I heard of that problem before.... hm.... nope, not coming to mind.
-
RE: More stupid Git errors THIS TIME IN FIRST-PERSON!
Can't tell you how many GIT repos I've accidentally nuked with simple mistakes. It's a lot like working with Linux, really.
Of course, whenever I relay these experiences to people who actually like Git (for whatever reason), they are almost invariably quick to tell me that it's easier to fuck up a repo with SVN. Somehow.
-
RE: SVGCaptcha
So I can defeat this Captcha by sorting letter tags by x-position and then concatenating the tag contents in sorted order? Sweet.
-
RE: The collapse of the .NET ecosystem
Open source is the engine in the heart of a vibrant programming ecosystem.
Not necessarily true. There are plenty of frameworks that are not open source and still have thriving developer communities. Lots of them, actually.
-
Amazon product listing WTF.
Oh, I see. It repels mosquitoes AND pregnant women. Neat!
As an added WTF, one of the product pictures is this:
Because, you know, watches dunked in water and mosquito repellent is basically the same thing. I guess.
-
RE: C vs C++, from the author of ZeroMQ
Shut down and restart? It's not like the alternative is "work correctly", so what do you suggest?
The web server should email the user "COMPLAIN! Naughty user!"
Duh.
-
RE: I just tried to use a network projector
This dialogue just support broken English for good quality.
EDIT: I also like how this is a sort of implicit "fuck you" to Mac and Linux users.
"You have to use Internet Explorer. Oh, you don't have that because you're not using Windows? How unfortunate." -
RE: C vs C++, from the author of ZeroMQ
@Masaaki_Hosoi said:
What about getting out and writing down "Get soap" on a todo list?
If you're actually going to get soap, then yes, this is error handling. If, however, you made the note as a form of prayer to God or a letter of complaint, then no, you're not handling any errors."Dear god, I am out of soap. Please send some.
PS
Where the fuck do my left socks keep going? Please send some replacements for those too." -
RE: C vs C++, from the author of ZeroMQ
Not really. When you take a shower and you notice there's no soap, washing with fresh water alone isn't what I consider error handling. Getting a new soap, or using shampoo instead, is.
What about getting out and writing down "Get soap" on a todo list? ;)
-
RE: C vs C++, from the author of ZeroMQ
@dkf said:
You should consider it to be part of the error handling, along with the fallback (or retry) strategy.
No. Logging isn't error handling. It's debug info. Might as well be no-op for all practical purposes. Error handling is when you actually do something in case of error. Displaying dialog box is error handling. Rolling back transaction is error handling. Logging error and continuing is NOT error handling. Not filling the data structure because file open failed, but then continuing to use this structure as if nothing happened, is not error handling either - it's ignoring it.I think your definition of error handling seems arbitrary.
I would consider logging at least a descriptive warning, coupled with a fallback strategy (in the previous case 0x0 texture, some sort of checkerboard pattern, or whatever), should be considered error handling - it's handling the error and not letting the program shit itself, while still providing the developer with useful information (they can check the log files to know which textures were missing, for instance).
-
RE: Unity UNET "Adventure": This is how you do FIFO wrong
Well, at least now I know the Unity Team knows about this issue, although for some reason it isn't marked as a known issue. Hopefully gets fixed in RC3, fingers crossed.
-
RE: C vs C++, from the author of ZeroMQ
AFAIK Unreal throws an error on missing file. Source might be a little insane, though, considering its goal was to be as nice to modders as possible.
I'm pretty sure Source at the very least logs a warning for missing resources (plus a nice obnoxious black and purple checkerboard which catches your attention and basically says "hey, dummy, this texture doesn't exist").
Also in UE4, AFAIK you get a blank white placeholder for missing textures. -
RE: C vs C++, from the author of ZeroMQ
I do get your point about the OpenGL border color thing - I wouldn't be surprised if the game uploaded a zero-size texture intentionally, as a placeholder.
There's no really any other sane way to do it (actual fallback textures aren't sane).
I suppose Unreal and Source are not sane.
-
RE: C vs C++, from the author of ZeroMQ
@Masaaki_Hosoi said:
I find that highly unlikely. Any sane game engine would check that the resource is null before attempting to upload it to the graphics card. So most likely the blackness is that game's version of a placeholder texture.
It's not null, it's zero. Also, as I said, black is the default of OpenGL, not that particular game - so they didn't have to put any placeholders of theirs.And you know it's not the game's own error checking for sure because... you've looked at the game's source code? I'll admit, I don't know for certain either but the game doing some basic error checking is far more likely to me than the game trying to upload a resource to the graphics card that doesn't exist.
As far as that code snippet, it bugs me a little (in particular, the way you declare Texture tex implying it as a struct, which feels wrong to me). But still a little closer to what I mean - defensive programming producing black textures as a placeholder.
-
RE: C vs C++, from the author of ZeroMQ
@Kian said:
Ignoring something is not the same as choosing not to act on it. There was probably quite a bit of code put in place to prevent missing resources from crashing the game. This is not the same as ignoring errors.
Actually, I think it goes more like this: the texture file is missing, so it doesn't open, so 0 bytes are read, so 0-sized texture is created, so it's all black because that's the default border color for OpenGL textures. This way of doing things is what I call ignoring.I find that highly unlikely. Any sane game engine would check that the resource is null before attempting to upload it to the graphics card. So most likely the blackness is that game's version of a placeholder texture.
@Kian said:
Within any given function, your job is not to catch and handle every possible exception. Your job is to handle the exceptions you know how to handle, ignore everything else, and stick to your exception safety specification. It's the same as with error codes. What do you gain from knowing what error codes might be returned, if you don't actually handle them at that particular point?
You can, for example, document all the possible failure modes for your function, which would be very, very useful for anyone wanting to use it?
Which you can't possibly do with exceptions?Exceptions hurt performance.
This is true, although the performance hit is still relatively small. -
RE: C vs C++, from the author of ZeroMQ
@Masaaki_Hosoi said:
One way to solve this is by designing your functions to only throw their own exceptions rather than letting any internal exceptions escape.
And how do you do it? By wrapping every single function call in try/catch(...)?Usually, with simple defensive programming. Check for null objects, ensure values are within expected range, etc. And, yes, if you call a function which could throw exceptions, you check for exceptions. Nobody wants to see a stacktrace which points to some internal API file, particularly if all they have is a DLL.
@Masaaki_Hosoi said:
Did the user forget to enter a password?
Honestly, if you handle it via exceptions and not regular business logic, I don't want to ever see your code.To be fair, that one was inspired by a real API I used which did error codes, and there were a multitude of error codes for everything from no username, invalid email, no password, etc. So, apologies for being a little unclear there. But the point of that was that I do care exactly what happened, not just that something happened (in that case, good practice aside, it doesn't matter whether the system uses exceptions or error codes)
@Masaaki_Hosoi said:
FILE_NOT_FOUND?
An example where catching and handling exception is appropriate. Except that in 99% of cases, the exact reason why you couldn't access the file (I can think of at least a dozen off the top of my head) is irrelevant, and handling the situation doesn't change (you just don't open the damn file).
Yeah, but it's still helpful to distinguish IO errors such as file open failures from other kinds of errors. Maybe I don't need to know why a file didn't open (unless I find myself needing a more specific error message I suppose), but I do need to know whether it was that the file didn't open, or whether it was that an object reference was null, just as an example.EDIT: And please understand, I'm not saying error codes are terrible and nobody should use them (I agree there are situations where using an exception for some error conditions would be a , such as login failures). I'm just saying that exceptions aren't nearly as bad as you seem to think they are.
-
RE: C vs C++, from the author of ZeroMQ
And now you have a really nasty dependency hell - the quality of your documentation strongly depends on quality of std::string::operator+ documentation, and every other function you've explicitly or implicitly used in your code.
One way to solve this is by designing your functions to only throw their own exceptions rather than letting any internal exceptions escape. This would especially be true of public-facing API functions - it would be far more useful to have an API function throw its own IndexOutOfRangeException with information about user-supplied data, for instance, than it would be to allow an internal IndexOutOfRangeException generated by a collection to propagate.
Your application doesn't go to hell by default.
Not strictly true, of course. It's entirely possible for an application to end up in a semi-fucked state as a result of a failed operation and unhandled error code.
Thankfully, usually you care only about two cases - no error and any error.
I very frequently care about what the error was. Was there a null reference? Is an index out of range? Did the user forget to enter a password? FILE_NOT_FOUND? Information like that is important.
-
RE: C vs C++, from the author of ZeroMQ
One thing I absolutely love about exceptions is stacktraces - knowing exactly where, right down to exact line numbers, an exception was thrown (EDIT: and the code path which led up to the exception) is amazingly useful (I really don't think I can overstate how useful it is). Returning error codes, in this regard, aren't nearly as useful.
-
RE: C vs C++, from the author of ZeroMQ
Except you don't know the type of exception that might or might not be thrown, and don't know where it will be handled (or not).
This is what documentation is for - methods should, ideally, document exactly which exception types they can throw and why.
I don't see how error codes are different, personally - the pattern I've often seen when dealing with stuff that returns error codes is a giant list of error codes shared by the whole application, in which case I'm never quite sure which error codes a function can return until I look at the API documentation. -
RE: C vs C++, from the author of ZeroMQ
I don't think I've been confused by or had problems with exceptions, ever. Ever. Like, seriously, I didn't know it was possible for an experienced programmer to be confused by or distrust them.
-
RE: Unity UNET "Adventure": This is how you do FIFO wrong
I admit I know very little about UNET, but what QOS mode are you using?
Unity's blog recommends
UNETQosType.UnreliableSequenced
for voice data.Edit: Granted, this blog entry is from like a year ago.
In the above test I used Reliable (although with a local client, Reliable, Unreliable, and UnreliableSequenced are identical in functionality).
-
RE: Unity UNET "Adventure": This is how you do FIFO wrong
UDP may not be reliable, but it still claims to be "best effort". Mangling the packet order like this is not "best effort".
UDP is doing a better job than Unity here.
Yeah, as it turns out this only affects local clients apparently (when you use the Local Client stuff, it assumes client and server are running in the same application and so it just uses an internal message buffer instead of sending anything over sockets). So the funny thing is that, comparing using a local client connected to the server hosted within the same application instance versus connecting to the server remotely halfway across the planet with Unreliable enabled, the latter situation would almost certainly still be more reliable (at least in terms of message order). And that, to me, seems all kinds of wrong.
-
RE: Unity UNET "Adventure": This is how you do FIFO wrong
Oh goody. Today they released RC2 with no fixes whatsoever.
-
Unity UNET "Adventure": This is how you do FIFO wrong
[was not sure of whether I should post this here, but it's kinda WTF-ey so eh what the hell.]
So, I'm a diehard fan of the Unity game engine. Absolutely love it.
But sometimes the Unity team just releases the most bizarre shit.Recently, they released 5.1 Release Candidate 1. This release candidate includes their new UNET networking API, which design-wise looks to be a massive improvement over the pile of crap that was Unity Networking previously.
I develop a plugin for Unity which implements the framework for multiplayer voice chat called DFVoice. So I decided to sit down and come up with an example of how to use DFVoice with UNET.
About ten minutes later I go to test. Sound is jittery as fuck. "OK" I think to myself. "Must have done something wrong, let's see what it's receiving..."
All packets in DFVoice have an index attached to them. So I log the sent and received message indices.
I notice something peculiar with the received messages.Received: 1 Received: 0 Received: 5 Received: 4 Received: 3 Received: 2 Received: 10 Received: 9 [...]
Eh wha? That's not right. No wonder it sounded jittery - DFVoice throws out any packet which is out of order (basically, unreliable sequenced) - as well as informing the codec of the lost packets (for instance, Speex and Opus do some sort of error correction black magic for lost data).
So it's throwing away 90% of the voice packets.After about half an hour of pulling my hair out, I finally tried this:
public void Start() { if( NetworkServer.active ) { for( int i = 0; i < 20; i++ ) { RpcTest( i ); // Unity rewrites the IL so that this sends an RPC instead of directly calling the function } } } [ClientRPC( channel = Channels.DefaultReliable )] public void RpcTest( int index ) { Debug.Log( index ); }
Lo and behold.
19 18 17 16 15 ... 0
So, the messages are buffered and then dispatched... in reverse order, LIFO instead of FIFO.
I just... how do you mess this up? And let it get to Release Candidate?Am I missing something? Is this an easy mistake to make or something?
-
RE: The bad jokes topic 🐴🍹👨
[size=10]here's a really bad one.[/size]
A horse walks into a bar.
Several people got up and left as they noticed the potential danger in the situation. -
RE: I can glue jQuery together, I don't need to know FizzBuzz!
Discourse has totally fucked up your formatting, to the point it's unreadable to me. Fucking newlines, how do they work? @discoursebot
It's almost readable on my end, except for the random lack of spaces on some lines because why not.
-
RE: I can glue jQuery together, I don't need to know FizzBuzz!
> I mean – I would be suspicious of someone who could solve fizzbuzz off the cuff. They are likely to:
- have too much time on their hands
- had too many interviews asking that question
- be unsufferably arrogant
- or all of the above.
[code]
for( int i = 1; i <= 100; i++ )
{
bool divisible_by_3 = ( ( i % 3 ) == 0 );
bool divisible_by_5 = ( ( i % 5 ) == 0 );if( !( divisible_by_3 || divisible_by_5 ) ) { Console.WriteLine( i.ToString() ); } else { if( divisible_by_3 ) { Console.Write( "Fizz" ); } if( divisible_by_5 ) { Console.Write( "Buzz" ); Console.WriteLine(); } }
}
[/code]OK, that took me about 30 seconds to code from scratch. Now, which one from the list will I pick? I think I'll go with "unsufferably arrogant", that one sounds good. It's misspelled too - bonus!
-
RE: More Go bad design
@Masaaki_Hosoi said:
Unity/HTML5. That should pretty much be the end of that discussion right there.
Well, yeah, that's what I tried to do - yet you prolonged the discussion by repeating what I already said at the end of my previous post.Oops, missed that bit >.<
-
RE: More Go bad design
@Gaska said:
Seriously, Flash is TERRIBLE choice for games.
That's simply not true.
Especially for building games in a browser.
Unity/HTML5. That should pretty much be the end of that discussion right there.
EDIT: Somebody else said the same thing and I missed it because I was being a dummy and not reading the words in front of my face properly. So, business as usual for me I suppose ;)
-
RE: This is the DUMBEST idea I've seen in a long time
@Masaaki_Hosoi said:
Meh, you and your actual facts ruining mah jokes...
So Blaky ruined your joke, but my earlier post about it being ancient history (and approx. 3 years qualifies!) didn't???
Sorry, I never saw it. Discorse let me know about Blakey's response but apparently never notified me about yours.
-
RE: The Official Status Thread
Status: Wondering if this is a bug. I don't think that's actually the video's title. Just sayin'
[size=9]
On a side note is this happening to anyone else or just me?[/size]EDIT: NVM. Looks like others are experiencing it too (d'oh.)
-
RE: This is the DUMBEST idea I've seen in a long time
@Masaaki_Hosoi said:
And then Microsoft will release their own Git server
That did that in like 2012. It's part of the whole TFS "thang" but it works with any Git client.
Meh, you and your actual facts ruining mah jokes... ;)
-
RE: This is the DUMBEST idea I've seen in a long time
It's all going to get better once iGit is out and the world rejoices as the great innovator that is Apple invents something called "source control".
Filed under: Yes. Yes I am.
And then Microsoft will release their own Git server and everyone will complain that they are shamelessly copying Apple.
[size=10]Goddamnit Discourse, how long does it take to quote someone?[/size]
-
RE: This is the DUMBEST idea I've seen in a long time
const string myString = "Foo";
is perfectly valid C#.
Is it?? I swear I could remember VS barking at me for doing that, but maybe I'm just remembering wrong.
-
RE: This is the DUMBEST idea I've seen in a long time
You can do that in Java. That doesn't mean you should.
Oh, woops, I said "const" didn't I? I meant "static" (const string is not valid C# I believe). D'oh.
-
RE: This is the DUMBEST idea I've seen in a long time
Having used Unity, which has no real debugging capabilities (such as breaking and stepping through code), I'm guilty of this:
[code]
Debug.Log( "WTF" );
[/code]Sprinkled throughout code as almost a sort of assert. Something wrong? It gets logged and I can follow the line number. Fugly, but it works.
However, after reading through this thread, I really want to replace that with:
[code]
public const string ಠ_ಠ = "WTF!?";//...
if( somethingVeryWrong )
{
Debug.Log( ಠ_ಠ );
}
[/code] -
RE: I started a new job today...
I don't know. If you said you are passing something by reference outside of a context such as this discussion, I would assume you meant it was qualified by
ref
. If that's not what you mean, then yes it would be confusing.Well, OK, to be fair I don't often use ref, so I rarely say those words anyway (I don't say them when talking about reference types for instance, since reference types can't really be passed around by value).
-
RE: I started a new job today...
I like how this has devolved from "I got a new job" to "GRR PASS BY REFERENCE DOESN"T EXIST GRR"
On a side note, if I'm telling someone that I pass something in C# by reference, or by value, using those exact words, does that confuse anybody? Yeah, saying "pass by reference" doesn't describe how it works internally at all, but does it need to? Those who know how C# works will know what I mean, and those who don't know how C# works, well, there's always Google if they're curious.
Plus, saying "pass this value by reference" rolls off the tongue way more than "pass the value of the reference to this value" ;)
-
RE: One Liner. Ok fine, multiple liner.
The war they gave me to deploy was compiled with the .java files that had the comments. Then they put the non-commented code in the repository. So pretty much the opposite of anything that would make sense.
.....
wha....
whhyyyyy?
-
RE: BRITISH PEOPLE, MASTERS OF INFORMATION SECURITY!!!z
Would you have to tape all of your documents side-by-side before using it?
And film it so that it's easier to search through, right?
-
RE: Apple Watch wrist detection failing with some tattoos
Great idea, I always felt looking at my wrist to see the current time was just too damn convenient.
I think I scared my coworker who asked for the time...
And now, storytime.
"Hey, do you have the time?"
zip
"Nevermind, don't wanna know." -
RE: Visual Studio Code
I don't get how it relates to normal Visual Studio. Is this its replacement? Or like the new version of VS Express? Or...
It's a pared down Visual Studio for Mac and Linux.
-
RE: IS THERE ANYTHING THIS AWESOME KICKSTARTER PROJECT CAN'T DO? Oh yeah, exist.
So. 10x faster.
Tell me, what happens when my data has to go through, you know, the actual internet? Or are they reinventing their own internet? Is that why it's so fast? Because there's only a few guys even using it right now?
-
RE: How to return a list and a flag in java
The classic example is Space Invaders.. The enemies get faster as they're thinned out for precisely this reason
Wait, really? I never knew that! That's pretty neat.
http://www.imaginivity.co.uk/wp-content/uploads/2015/01/bob.jpg
-
RE: Microsoft and their idiotic "Cellphone Motif"
My biggest gripes with Windows 8.1 are that the start menu is full screen (seriously?), I ended up having to install a (buggy) third party extension to fix it, and the charms bar frequently getting in my way because my cursor strayed just a bit too close to the corner of the screen.