|
SlightlyMadman posted:Ah thank you! That's exactly what I was hoping to hear. Right click on the inspector tab and select Debug and you can even see private fields
|
# ? Mar 27, 2013 22:47 |
|
|
# ? May 11, 2024 11:05 |
|
Unormal posted:Right click on the inspector tab and select Debug and you can even see private fields I'd been making specific public debug variables, to get around this. NICE.
|
# ? Mar 28, 2013 00:16 |
|
Unormal posted:Right click on the inspector tab and select Debug and you can even see private fields Holy poo poo. I never knew that existed. Also: Thanks to all the previous comments about basic rotation logic. I was able to figure it out.
|
# ? Mar 28, 2013 02:19 |
|
Shalinor posted:
Edit: or just making this the default because what the hell are you doing in the inspector if not debugging? (when the program is running) roomforthetuna fucked around with this message at 02:56 on Mar 28, 2013 |
# ? Mar 28, 2013 02:43 |
|
roomforthetuna posted:I also say this same comment. Thanks Unormal. Looks like this is something they should be emphasizing in a tutorial somewhere! Inspecting.
|
# ? Mar 28, 2013 02:45 |
|
Wow you can even swap the "Player Settings" into debug mode and edit the iOS/Wii/Xbox/etc settings on PC... and it has Metro settings in it...
|
# ? Mar 28, 2013 03:27 |
|
Unormal posted:Wow you can even swap the "Player Settings" into debug mode and edit the iOS/Wii/Xbox/etc settings on PC... and it has Metro settings in it... EDIT: VV The OP of the Making Games Megathread has the best one I know of. I'm @glassbottommeg. Shalinor fucked around with this message at 02:37 on Mar 29, 2013 |
# ? Mar 28, 2013 15:56 |
|
Is there like a list of SA game-dev'ers twitter handles somewhere? I'm @unormal if anyone wants to be my NEW BEST FRIEND. V Ah, cool! Unormal fucked around with this message at 02:43 on Mar 29, 2013 |
# ? Mar 29, 2013 02:32 |
|
Unormal posted:Is there like a list of SA game-dev'ers twitter handles somewhere? There's a list in the making games megathread: http://forums.somethingawful.com/showthread.php?threadid=3506853
|
# ? Mar 29, 2013 02:39 |
|
Question about Unity and Futile and shaders. We're planning on making multiple time of day versions of our levels. Now I know that Futile has shader support so I think I can add subtle tinting to objects to simulate this. I've also heard that this can cause some performance issues if there's too much going on but is that preferable to having repeated assets in multiple atlases? Here are some simple sample assets we're working with: How would I go about writing a shader to, say, add a slight blue tint for a night scene or orange for a sunset?
|
# ? Mar 30, 2013 03:13 |
|
Has anyone had any experience with UI libraries for Monogame? There seems to be quite a few under heavy development, but no clear favourite, sound about right?
|
# ? Mar 30, 2013 09:02 |
|
Torch Dexter posted:Assuming everything else is correct - this would be your problem. Usually I'd pass the Type of the object to GetComponent() - until I went and checked the Unity documentation just now I didn't know you could pass it a script name in a string instead. Anyway - if passing a string as the parameter you should drop the .cs from the end and it seems it should work. That seemed to work, though now I'm getting a null reference in my GetTurnOrder() method. e: tables code:
As far as I can tell currentHighSpeed should get assigned a value, but doesn't. After setting some break points and all that, I found that it doesn't even go into the if statement. From the values I've set in the inspector, all the gameObjects' sortedInTurnOrder bools are set to false, and their speeds are set from 1-8. I've tried setting some break points in Mono but I never really get a chance to step through my code. Am I doing something wrong there? I only learned where my problems were by using Debug.Log()
|
# ? Mar 30, 2013 20:35 |
|
Maybe I'm missing something, but where is tempHighSpeed declared? Shouldn't be reset before you begin your search? Maybe I'm misreading the intention of your code. If it's declared outside the method then I can see how after a second run of that method, without it being reset, "s.speed > tempHighSpeed" will never evaluate as true and currentHighSpeed will be null. Definitely try to get the debugger working. Have you set a breakpoint at the entry of the method? Edit: I think I was misreading this because of the indentation but I still feel there's something wrong with tempHighSpeed. HappyHippo fucked around with this message at 22:08 on Mar 30, 2013 |
# ? Mar 30, 2013 22:04 |
|
Yeah I have. No dice. I'm not too familiar with Mono's inner workings. And sorry, earlier in the class, in the Start() method, int tempHighSpeed gets declared and set to 0. Though you are right, after all that is said and done, it should definitely be reset to 0. e: And thank you to all you guys that have helped. You're the best. Chunderstorm fucked around with this message at 23:49 on Mar 30, 2013 |
# ? Mar 30, 2013 23:40 |
|
HarkToTheLoons posted:Yeah I have. And sorry, earlier in the class, in the Start() method, int tempHighSpeed gets declared and set to 0. Though you are right, after all that is said and done, it should definitely be reset to 0.
|
# ? Mar 30, 2013 23:43 |
|
HarkToTheLoons posted:
code:
|
# ? Mar 31, 2013 00:43 |
|
Torch Dexter posted:Glancing at the rest of the code, it seems like it should probably work. This line will need fixing though. You're assigning a value to a variable when you want to be checking it instead. I uh... Clearly I've been looking at this code for too long to not catch that. That fixed the issue. Thanks for your help!
|
# ? Mar 31, 2013 06:14 |
|
Anyone making games in stencyl? Need a thread for it I reckon as it's got a really small entry requirement but allows actionscript 3 coding for custom functions.
|
# ? Mar 31, 2013 10:49 |
|
HarkToTheLoons posted:I uh... When working in a language that allows you to use the assignment operator from within a condition statement (i.e. basically everything besides Python that I know of), you can do this ugly-but-safer syntax: code:
|
# ? Mar 31, 2013 17:08 |
|
That looks like C#. Doesn't C# give you a warning when you compile with if(a = false)? Also, since C# won't cast expressions to booleans implicitly this only comes up if you're testing booleans, so you can avoid the issue entirely by doing if(a) or if(!a)
|
# ? Mar 31, 2013 18:50 |
|
HappyHippo posted:That looks like C#. Doesn't C# give you a warning when you compile with if(a = false)?
|
# ? Apr 1, 2013 05:48 |
|
Abjad Soup posted:When working in a language that allows you to use the assignment operator from within a condition statement (i.e. basically everything besides Python that I know of), you can do this ugly-but-safer syntax: This ... this is really smart. Why did no one tell me this?
|
# ? Apr 1, 2013 07:21 |
|
The Gripper posted:C# will happily compile something like that without a warning, at least in whatever of VS I'm using now. I get "Warning Assignment in conditional expression is always constant; did you mean to use == instead of = ?" It also underlines the code in question to indicate a warning. http://msdn.microsoft.com/en-us/library/c1sde1ax(v=vs.71).aspx
|
# ? Apr 1, 2013 15:26 |
|
Tres Burritos posted:This ... this is really smart. Why did no one tell me this? I'm going to be the jerk that points out that if you can remember to put a constant on the left side, how is that any different from remembering to be certain to put == instead of =? Also, not all comparisons have a constant operand. It's not really "safer," it's just cargo-cultish.
|
# ? Apr 1, 2013 17:20 |
|
That Turkey Story posted:I'm going to be the jerk that points out that if you can remember to put a constant on the left side, how is that any different from remembering to be certain to put == instead of =? Also, not all comparisons have a constant operand. It's not really "safer," it's just cargo-cultish. And if you make that a habit then it might sometimes catch a typo for you. But I agree that it's really probably more trouble than it's worth and tends to make the code less intuitive to read. In that respect it's similar to endorsing "x.multiply(y.add(5))" over overloading operators.
|
# ? Apr 1, 2013 17:51 |
|
Am I the only one who would type that as "if (!s.sortedInTurnOrder)"?
|
# ? Apr 1, 2013 17:58 |
|
SlightlyMadman posted:Am I the only one who would type that as "if (!s.sortedInTurnOrder)"? That's the preferred way to write it in most languages. If the language also doesn't implicitly cast to boolean or doesn't return a value from assignment, then the issue should never show up in the first place.
|
# ? Apr 1, 2013 18:02 |
No, you are not. I haven't found a reason to use == for bools.Tres Burritos posted:This ... this is really smart. Why did no one tell me this? Some 'languages' (GML ) will let you use = in a conditional statement and still treat it like a conditional instead of an assignment. However this is one of those things you learn in week 1 of csci 101 so most people probably just take it for granted. Also, visual studio 2010 SP1 definitely does not let you use = in a conditional statement.
|
|
# ? Apr 1, 2013 18:03 |
|
To get back to game talk for a moment, I want to make a top down 3D game (think Alien Swarm), but I need deformable geometry and a pretty decent physics engine. I've done a bit of searching, but haven't come up with much - is there a decent engine out there that would suit my needs? I'm not really interested in engines like Unity, I'd prefer something that's more code-heavy.
|
# ? Apr 1, 2013 18:08 |
|
I have a limited knowledge of Unity, but my impression is that it is code heavy.
|
# ? Apr 1, 2013 18:12 |
|
I called it less intuitive because it doesn't follow the way I (and I'd imagine most people) phrase the condition in my own head, which is "is $RELEVANT_VAR the same as $TARGET_VALUE?". The reversed condition will probably break consistency with your other conditions, which presumably are in "variable, value" order. And as I noted, it only helps when you are doing exact equality testing between a variable and an immutable value. It's no magic bullet but it can be very handy on occasion (albeit, as noted, not necessarily when comparing to booleans).
|
# ? Apr 1, 2013 18:14 |
|
Orzo posted:I have a limited knowledge of Unity, but my impression is that it is code heavy. For that, you'll want to go with Stencyl. Arguably, even UDK is a better option - vertical learning curve, but Kismet is powerful and visual. Anyways, if you want a multiplatform engine that's UI-light / code-driven, look into Moai. Shalinor fucked around with this message at 18:20 on Apr 1, 2013 |
# ? Apr 1, 2013 18:16 |
|
Orzo posted:I have a limited knowledge of Unity, but my impression is that it is code heavy. I've played around with it and all I got out of it was that it was a what-you-see-is-what-you-get editor with scripted objects. Contrast with Source where you have the actual game code in front of you in visual studio. Granted my Unity knowledge is limited, I'll revisit it if it's heavily suggested.
|
# ? Apr 1, 2013 18:17 |
|
Orzo posted:My (C#) game engine uses Lua scripts for all game logic. I am considering switching to C# scripting for a number of reasons. Does anyone have any good (preferably highly technical) articles on how Unity does this? I have an idea on how to go about accomplishing what I need (aggregate all scripts and use CSharpCodeCompiler to dynamically generate an assembly) but I want to see if there's any gotchas or concepts that I haven't considered yet. I don't suppose you've turned up any resources on this? I'm actually in the process of doing something similar (my game's "events" are scripted in C#), and I've been trying to find best practices or at least good examples of using C# as an embedded scripting language inside a C# program. I sort of just charged ahead and did my own thing, but I'd definitely feel a lot more comfortable if I could see how other people approached this. What I have right now looks more like a plugin system than an actual scripting engine.
|
# ? Apr 1, 2013 18:21 |
|
Paradoxish posted:I don't suppose you've turned up any resources on this? I'm actually in the process of doing something similar (my game's "events" are scripted in C#), and I've been trying to find best practices or at least good examples of using C# as an embedded scripting language inside a C# program. I sort of just charged ahead and did my own thing, but I'd definitely feel a lot more comfortable if I could see how other people approached this. What I have right now looks more like a plugin system than an actual scripting engine. I have a main project for the game engine and a project for the game implemention (which is where all game-specific behaviors go). Both reference an assembly with various shared interfaces. The game engine dynamically loads the implementation assembly (via Assembly.Load) and uses reflection to create a 'behavior store'--that is, it finds all classes that implement some interface (IBehavior) defined in the game implementation assembly. From then on, those behaviors can be used as templates (by name; IBehavior requires you provide a unique name) to control the behavior of entities. The behavior object itself contains definitions about the object's...well, behavior (init, update, collide, custom triggers, etc), as well as the different states (if the entity needs a state machine) of the entity. I haven't done this part yet, but the level editor will also use reflection to find all available behavior templates and present that as a list that the level designer can choose from to be stored in data on the entity (as a string). I'll also have support for custom properties that can be defined on the behavior templates, which the editor will know how to create controls for modifying. If you want any more details I'd be glad to share via PMs or chat or whatever. I am pretty happy with how it's going so far--using C# is just infinitely better than using lua. I'm not even using compiler services at the moment, although it wouldn't be too difficult to convert to that later.
|
# ? Apr 1, 2013 18:33 |
|
Re: C# scripts, Mono.CSharp.Evaluator and Microsoft.CSharp.CSharpCodeProvider may do what you want, but I've read some stuff that suggests they might only work for users with the Mono SDK installed, so if you're doing things in a way where the scripts have any kind of permanence (i.e. you're using them to script level events), you should probably implement them in a way that they're fixed in a release build. i.e. something like, in the dev build, have a method that loads a script from a file given a string, but have the release build convert the script files into wrapped-up static methods at build time and look them up using some mapping or other of the filename to the static methods. OneEightHundred fucked around with this message at 18:47 on Apr 1, 2013 |
# ? Apr 1, 2013 18:44 |
|
Sarcophallus posted:I've played around with it and all I got out of it was that it was a what-you-see-is-what-you-get editor with scripted objects. Contrast with Source where you have the actual game code in front of you in visual studio. Granted my Unity knowledge is limited, I'll revisit it if it's heavily suggested. Unity does kind of have that WYSIWYG editor front-and-center, but it's not really significantly different from having code and a level editor. You don't have to use the editor at all, you can dynamically generate your levels (and GUIs) from code if you prefer. The thing that is different from a lot of engines is the component system, which is really great for anything at all complicated.
|
# ? Apr 1, 2013 18:46 |
|
roomforthetuna posted:"Scripted objects" are made of game code, which you can have open in visual studio if you want (though the editor that comes with Unity is fine). I didn't know that, actually. So could I generated mostly-random geometry, like rooms, with textures in place, or does it have to use pre-fabricated objects?
|
# ? Apr 1, 2013 18:55 |
|
Sarcophallus posted:I didn't know that, actually. So could I generated mostly-random geometry, like rooms, with textures in place, or does it have to use pre-fabricated objects? Jones On Fire is entirely procedural, for instance. If you load the main scene up in Unity, all you see is a player. All the level geometry is loaded/positioned/etc'ed at runtime.
|
# ? Apr 1, 2013 18:58 |
|
|
# ? May 11, 2024 11:05 |
|
I just wish 90% of Unity's documentation wasn't in a forum somewhere. answers.unity3d.com is one of my top visited sites lately.
|
# ? Apr 1, 2013 19:31 |