« first day (1591 days earlier)      last day (3725 days later) » 

23:07
stupid unity with its lowercase public variables and K&R braces
use VS
solves the bracing problem
not for the initial template it doesn't
gotta fix it for every new script
so much work :'(
Like... 3 key presses? :P
4...
Ctrl-K, Ctrl-D. Done.
3 if you don't lift your finger off Ctrl
23:10
ooh, I forgot about that one
@IcyDefiance the bracing really burns.
also, stringly typed things
Input.GetAxis("Vertical");
Definitely not perfect, but I'm getting closer...
@IcyDefiance the reasoning there is customizability. There are better ways they could handle it but take a look at Edit -> Project Settings -> Input
You can rename "Vertical" to whatever makes sense for you
And bind whatever keys make sense for you
I've not investigated better input managers for Unity but the basic functionality there is pretty nice with no effort basically
okay that does make sense
being stringly typed is more of an unfortunate side effect, I guess
23:20
Pretty much
yeah
you get used to it
I'd have liked to have seen some interface where you could bind scripts to the input manager, much like linking objects together with monobehaviors but like I said, out of the box with no effort what they've offered is pretty nice
Just don't go making 30 calls to GameObject.Find("Foo") per update aha
or Debug.Log() 500 times per update :P
ahahah
@SpartanDonut what do you mean about binding scripts? You can do that
For one of my jobs, I made a game state machine thingy that just took scripts in the inspector
23:22
For input manager specifically
Instead of just the GUI where I create a command "Jump" and assign buttons to it I'd like to be able to create a more flexible coded system
One thing I wish Unity would make work out of the box is containers of interfaces
Though I think you can access and update those values from scripts...
but yeah
@AttackingHobo just showed it to my pal who loves hardcore games. he said it was great, and "why can't I think of this simple shit?"
@Almo What's better is I've already played a game exactly the same as that, but I never thought to put it in a browser...
23:24
The only other game I played like that was one of his initial prototypes from like a year or so ago
But I don't play much
Really? They're really common over here. You go to the cinema and there's usually an arcade style machine for it.
exactly what i first thought of
@OMGtechy oh ya. totally forgot about that
Ok so other than that arcade machine I've not seen it :P
@SpartanDonut with this new GUI system, do I still have to create a script to load the next scene? There's this event thing I feel like I should be using...
uhhh
I think so?
I don't see how loading a scene has to do with gui so I've not looked into it
The event system is more for input events
mouse over, mouse click, etc.
23:29
Yeah, but you have OnClick etc
that calls a function right?
So what if I wanted it to call Application.LoadLevel?
Just seems silly if they haven't added that
I really have no clue what you're saying
oo it seems I'm not the only person that asked this
short answer is no
Ah
You want to call just a single function on click is what you're saying
why didn't you say so? :P
2 mins ago, by OMGtechy
So what if I wanted it to call Application.LoadLevel?
:P
@OMGtechy In my testing I used this function to add callbacks to OnClick from scripts:
public static void AddCallback(string buttonName, Action callback)
{
    FindUIElement<Button>(buttonName).onClick.AddListener(delegate { callback(); });
}
23:32
Whaaa
@Lokkij requires a script. He wants to be lazy and not use a script
Oh.
Which is tough titties
Guess I'll have to just make a script :(
23:32
I misinterpreted your question then.
You can go hang out with the folks who want C# functions outside of classes
Thanks anyway @Lokkij :)
@SpartanDonut ew
@Lokkij that's because despite what he thinks he wasn't being clear lol
@SpartanDonut I also want this
I think static classes should be outright banned
stupid things
23:33
The older I've gotten the more stubborn my brain has become to making assumptions about pronouns. If it's not obvious my brain gives up and freaks out
ahaha
Static classes are great
They're namespaces with a contructor
and singletons
If you choose to use them like that sure
the singleton thing makes sense, but the namespaces with a constructor doesn't
it's called a class, but it isn't a class
that's why I don't like it
23:34
6 lines of code written in unity, and I've already hit my first "wtf this makes no sense" moment
void Update()
{
    thrust = ThrustPower * Input.GetAxis("Vertical");
    rotation = RotationSpeed * Input.GetAxis("Horizontal");
}
right there, rotation works fine, but thrust is always 0
@IcyDefiance DELTA TIMEEE
oops
@IcyDefiance Because thrust is not on a MonoBehaviour.
it is though?
Maybe something like rigidBody.thrust?
oh, it's a private variable I made
23:36
I assume you've confirmed ThrustPower is not zero and that Input.GetAxis("Vertical"); is zero
ThrustPower is 5
so yes, 5 * Input.GetAxis("Vertical") is 0 when I'm holding down W
Programming in general is just a series of WTF moments stringed together in a fashion that makes you look like you know what you're doing. Unity doesn't do it any different.
even more strange, it worked until 2 minutes ago, and I didn't change that line
@OMGtechy :D
Shouldn't you be using add force? @IcyDefiance
23:37
Did you accidentally break something in the input manager?
@OMGtechy I do that afterward
@OMGtechy he's trying to first calculate how much force to add
oh ok
@SpartanDonut checked that. it still looks right.
w moves you vertically?
23:37
Alt Positive Button: w
Does s work?
Did you accidentally (or intentionally) make a typo in the name "vertical"
otherwise pastebin your class
Did you make sure to capitalize the V in "Vertical"
23:39
the code I gave is copy/pasted from my script
and I just checked it against the name in the input manager. it's right.
@IcyDefiance yeah but I asked for the whole class not the isolated snippet where you believe the problem lives
I want to trust you but I don't trust anyone who says "everything else is right" when helping debug code
On your object in the inspector, is ThrustPower 5 still?
23:41
^
yep
rotationspeed is 300 in the inspector instead of 5
setting thrustpower to 300 in the inspector doesn't make a difference
also, not sure why I'm not processing input in fixedupdate... but I figured I'd just copy the tutorial and worry about that kind of thing later
So is the problem the ship isn't moving or have you checked the values of the variables?
the private variable thrust is being set to 0, even when I have W or S held down
rotation doesn't have that problem. it's working fine.
so Debug.Log(thrust) prints 0
I actually used a breakpoint, but let me try that too
23:45
no thats fine
I have a (very) basic menu going in now
Just triple checking we don't have a physics problem
well then, debug log does print out numbers other than 0
oh damn
stupid debugger
gdb once told me it was calling a constructor 3 times then jumping into the middle of a function
it was no
not*
23:47
Sounds like a bad build problem
nope
Or code that doesn't match the running assembly
I believe you
if I add a conditional breakpoint on the same line as debug.log, and set the condition to "thrust != 0", it never breaks, even though it's logging 5
Just what I'd suspect if it happened in VS
na it was netbeans
but still
the general consensus was don't trust the debugger
I had an SO question about it, let me find it...
23:48
So it sounds like we have a physics problem and a bad debugger problem
Monodevelop?
nah, unityvs
hmm
Did you import the VS package to the unity project?
I was going to suggest GetAxisRaw but this is really weird.
23:49
Weird
2
Q: Strange looping at end of function body call C++

OMGtechyI am writing a game program in C++ and have encountered an odd problem that seems to be unique to this function. When this function is called, it executes just as expected all the way through to the return statement. However, upon executing the return statement, the code 'jumps' up two lines to ...

there it is
Hey I reproduced Icy's issue. What fun
what is this madness
I blame fixed update
I generally steer clear of it, but since you'll be adding force I guess you've gotta use it
23:54
moving those 2 lines to update doesn't change anything
I didn't know about FixedUpdate for a while and did physics stuff in Update and it worked just fine.
Yeah Update didn't fix it for me too
is the logger truncating the floating point?
try printing if it's non zero as a bool
here's an animation process gif for people who like that stuff :) http://i.imgur.com/fmVbg4e.gif
Adding a watch for Input.GetAxis("Vertical") fails
how to I view the exception... hmm
Jon
Jon
23:58
holy shit that is a lot of work
@SpartanDonut did you try the bool thing?
no but I think I found the problem
oh cool
@OMGtechy I did. it works as expected.
23:59
it's not colliding with anything either.

« first day (1591 days earlier)      last day (3725 days later) »