|
Suspicious Dish posted:And then you add CUDA-based physics that's nondeterministic. Or you change the player model so that the hitbox is slightly different. Now he's at 2,654 instead of 2,755. Is that a bug? Wait, I ran it again, and now he's at 2,650. Bug? This is where the whole theory-oriented unit testing thing comes in. You come up with equivalence classes for the input and generate a random input from each equivalence class, then validate the output with tests like "Is the player model still above the ground?". Another example would be some code I was writing recently to generate random convex polyhedra. The tests were along the lines of "Is Euler's formula satisfied?", "Does every edge have two distinct endpoints?", "Does any edge appear more than once?", "Does every face have as many vertices as edges?", etc.
|
# ? Jan 27, 2014 18:03 |
|
|
# ? May 11, 2024 08:29 |
|
Paniolo posted:One more story I need to share about TDD. A lot of new(and even experienced) TDDers mistake the purpose of their programming to be "make the tests pass/coverage complete" when it's supposed to be "make the program meet the requirements". The real issue had to do with the fundamental idiocy of their choice of dependency injection. You shouldn't ever manipulate your code to be more easily testable if it comes at the expense of the program itself. This is why I like Behavior Driven Development a lot more. It makes you focus on what your customer wants not the naval gazing programmer stuff.
|
# ? Jan 27, 2014 18:08 |
|
Any time you try to encapsulate the development process in some sort of acronymic dogma you're really just saying you don't think your hiring bar is high enough to let developers make sensible decisions about the best way to meet their goals, IMO.
|
# ? Jan 27, 2014 18:47 |
|
I'm getting really frustrated with the Unity documentation. I want to change how some class variables show up in the inspector, and so I would like to find a list of classes that inherit from PropertyAttribute. This doesn't seem to be described anywhere, and literally the only thing I can find on Google at all is a couple of examples in a blog post from the Unity 4 beta from more than a year ago. I literally cannot believe the don't even show an inheritance tree in the documentation
|
# ? Jan 27, 2014 19:30 |
|
a slime posted:I'm getting really frustrated with the Unity documentation. I want to change how some class variables show up in the inspector, and so I would like to find a list of classes that inherit from PropertyAttribute. This doesn't seem to be described anywhere, and literally the only thing I can find on Google at all is a couple of examples in a blog post from the Unity 4 beta from more than a year ago. The Unity documentation is a piece of poo poo and you will often see pieces of code examples that are just doing things the worst way instead of, you know, using the built in Unity stuff. I can't tell you how many times I've seen obj.tag == "Thing" instead of obj.CompareTag("Thing")
|
# ? Jan 27, 2014 21:38 |
|
My MO is to hunt around in the Unity docs for a method that sounds like it does what I want to do, then google it on answers.unity3d.com to see what discussion there is about it. Works pretty well.
|
# ? Jan 27, 2014 21:40 |
|
poemdexter posted:The Unity documentation is a piece of poo poo and you will often see pieces of code examples that are just doing things the worst way instead of, you know, using the built in Unity stuff. I can't tell you how many times I've seen obj.tag == "Thing" instead of obj.CompareTag("Thing") Welp I just learned something new.
|
# ? Jan 27, 2014 21:51 |
|
Paniolo posted:Any time you try to encapsulate the development process in some sort of acronymic dogma you're really just saying you don't think your hiring bar is high enough to let developers make sensible decisions about the best way to meet their goals, IMO. This. So much this. I have done both regular and Agile. Agile works great IF you have 100% buy-in from EVERYONE involved. Guess how often that happens. I'll give you a hint: dividing by it causes an error. NEVER.
|
# ? Jan 27, 2014 21:56 |
|
the the posted:Anyone else using libGDX for android game development? Yeah, I'm using LibGDX and really loving it. It's a fantastic library and gives me exactly what I need. I used to be a huge XNA guy, but I could definitely see myself using LibGDX from now on when I need anything to be multiplatform. My only complaint is the way they have the Y axis origin default to the bottom left instead of the top left. It's not too hard to switch it back, but still annoying.
|
# ? Jan 27, 2014 22:36 |
|
With things like Unity, etc. Can you build directly to iOS with no in-between Mac? I remember a while ago at college trying to port from the Torque engine to iOS, and an Apple computer was required then.
|
# ? Jan 28, 2014 02:41 |
|
No, Unity just creates a project for you to open in Xcode which you'll need a Mac to then compile into something for iOS. That's an Apple limitation, not something Unity can do anything about.
|
# ? Jan 28, 2014 03:01 |
|
Yodzilla posted:No, Unity just creates a project for you to open in Xcode which you'll need a Mac to then compile into something for iOS. That's an Apple limitation, not something Unity can do anything about. Yeah, I figured as much, I was hoping that maybe Apple had relaxed a bit in recent years what with the rise of indie/mobile developers and port-to-multiplatform engines like Unity.
|
# ? Jan 28, 2014 03:06 |
|
There's stuff like Adobe Air that builds straight to the device without going through Xcode, but to be honest it's always a huge headache, when it works at all. Being able to tweak the unity built Xcode project as needed is very nice.
|
# ? Jan 28, 2014 03:29 |
|
a slime posted:I literally cannot believe the don't even show an inheritance tree in the documentation Can you bring one up in MonoDevelop? (Not trying to excuse Unity's pathetic documentation though)
|
# ? Jan 28, 2014 14:11 |
|
Edit: nm
|
# ? Jan 28, 2014 18:27 |
|
Flownerous posted:Can you bring one up in MonoDevelop? Is there a way to do that? I poked around MonoDevelop for a bit and didn't see anything like this, but I have never really used it before
|
# ? Jan 28, 2014 18:32 |
|
a slime posted:I literally cannot believe the don't even show an inheritance tree in the documentation Isn't that what the indentation in the class list long the left does? I mean, Unity doesn't have a ton of inheritance to start with. It's mostly a bunch of stuff derived from Component.
|
# ? Jan 28, 2014 18:47 |
|
Zizi posted:Isn't that what the indentation in the class list long the left does? I mean, Unity doesn't have a ton of inheritance to start with. It's mostly a bunch of stuff derived from Component. That list doesn't seem to be exhaustive- I want classes derived from PropertyAttribute, which isn't listed in the left-hand side for any of the options in the dropdown. edit: you can get what I want with this Google query, but that doesn't even return all of the few attributes that I know exist- PopupAttribute and CompactAttribute are both missing, and don't seem to be in the documentation at all edit: that is because while they were mentioned in an official Unity tutorial blog they were never actually added to the engine aaaaaaa a slime fucked around with this message at 19:17 on Jan 28, 2014 |
# ? Jan 28, 2014 19:05 |
|
You could probably figure it out by using ILSpy on the DLLs to decompile into a Visual Studio project and then use that to determine the real inheritance tree.
|
# ? Jan 28, 2014 19:19 |
|
Pretty sure if you had Visual Studio it would give you a list of deriving classes. Not sure about MonoDevelop. Edit: Another alternative: code:
xgalaxy fucked around with this message at 19:50 on Jan 28, 2014 |
# ? Jan 28, 2014 19:46 |
|
edit: actually, nevermind, I need to read better.
|
# ? Jan 28, 2014 20:28 |
|
Unity_docs.png
|
# ? Jan 30, 2014 04:33 |
|
poemdexter posted:Unity_docs.png I love that they put all this effort into those video lessons on their learn site but still can't put together worthwhile written documentation.
|
# ? Jan 30, 2014 04:51 |
|
Weird, but understandable. At least it says it returns a double in the docs. (I get why but don't say it returns an integral type if it doesn't at all.) Jewel fucked around with this message at 05:11 on Jan 30, 2014 |
# ? Jan 30, 2014 05:05 |
Jewel posted:(I get why but don't say it returns an integral type if it doesn't at all.) It doesn't say type, it says value
|
|
# ? Jan 30, 2014 05:07 |
|
Jewel posted:
|
# ? Jan 30, 2014 05:09 |
|
Why not say "returns a double representing the smallest integral value etc etc". Edit: vvv Iunno I still think it should be saying it represents that value. It's not returning that value. It's returning the closest thing to that value that a double can store. Which isn't necessarily the same! Jewel fucked around with this message at 05:20 on Jan 30, 2014 |
# ? Jan 30, 2014 05:11 |
|
It literally says "Type: System.Double" right above your first circle. And then it says "The smallest integral value." Which is almost exactly what you are wanting it to say.
|
# ? Jan 30, 2014 05:18 |
Jewel posted:It's returning the closest thing to that value that a double can store. It doesn't do that though. It returns a double (this is the type) who's value is that of the nearest integer. Which is exactly what you would expect and what it says.
|
|
# ? Jan 30, 2014 05:34 |
|
Jewel posted:Why not say "returns a double representing the smallest integral value etc etc". Floats and Doubles can represent integers exactly.
|
# ? Jan 30, 2014 14:36 |
|
If you need an int that badly just use Mathf.CeilToInt and Mathf.FloorToInt
|
# ? Jan 30, 2014 14:57 |
|
xgalaxy posted:I love that they put all this effort into those video lessons on their learn site but still can't put together worthwhile written documentation.
|
# ? Jan 30, 2014 14:59 |
|
So, still learning Unity! It's really weird and interesting. It's astonishing how "hacky" so many things feel - if I read another sentence that begins with the words "Create an empty GameObject..." one more time I'm going to lose it! Is it common to make a script file with a bunch of extremely common, shared variables - like isAnEnemy, hitpoints, etc - call it something like "variables," and embed that in almost every game object? So that, for example, if a bullet collides with an object, I'll know that the object contains a "variables" script that I can pull variables from? It seems like I can solve a trillion problems easily using this method, but I don't want to start building Unity stuff in a way that other people would find insane, or that might cause performance issues.
|
# ? Jan 30, 2014 15:53 |
|
"Integral" does not mean "Integer", or "Integer Type". That's like complaining that a function is specified to return positive values, but that the return is signed instead of unsigned. It's an unfortunate ambiguity, but it's just as much the language's fault for appropriating a more general term.
|
# ? Jan 30, 2014 15:59 |
|
Polo-Rican posted:So, still learning Unity! It's really weird and interesting. It's astonishing how "hacky" so many things feel - if I read another sentence that begins with the words "Create an empty GameObject..." one more time I'm going to lose it!
|
# ? Jan 30, 2014 16:01 |
|
edit: forget it, that didn't make any sense! Polo-Rican fucked around with this message at 16:13 on Jan 30, 2014 |
# ? Jan 30, 2014 16:08 |
|
Question about this thread: are we coding-only here, or is talking about game design cool? I've a nucleus of an idea but I'm not sure where to go with it and I wouldn't mind bouncing it around some.Polo-Rican posted:So, still learning Unity! It's really weird and interesting. It's astonishing how "hacky" so many things feel - if I read another sentence that begins with the words "Create an empty GameObject..." one more time I'm going to lose it! Yeah, don't do that. Do what Shalinor said. Or, at the very, least have something like a "BulletCollider" script that the bullet calls (or, preferably, a ProjectileManager because you don't want bullets all over the place doing their own thing) on collision, and then the BulletCollider works internally to figure out what to do and call.
|
# ? Jan 30, 2014 16:17 |
|
Polo-Rican posted:
The RIGHT right way of doing it is to create an editor script, that runs in the background in editor mode, that snags references to any components you want silently. Make it auto-fill the variables, instead of you having to drag them across. It's just that it's freaking annoying to write that Editor script for every single component, so the manual drag method is what I mostly do. It's one of the many things Unity could automate with a simple flag that you could use in your components Shalinor fucked around with this message at 16:23 on Jan 30, 2014 |
# ? Jan 30, 2014 16:20 |
|
Is GetComponent<T>() really so slow that that's necessary? Or is there some other disadvantage that I'm missing?
|
# ? Jan 30, 2014 16:32 |
|
|
# ? May 11, 2024 08:29 |
|
coffeetable posted:Is GetComponent<T>() really so slow that that's necessary? Or is there some other disadvantage that I'm missing? If you're calling it frequently, yes.
|
# ? Jan 30, 2014 16:32 |