Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

999255 Posts in 39205 Topics- by 30615 Members - Latest Member: AlecKelley

April 22, 2014, 11:38:59 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)The grumpy old programmer room
Pages: 1 ... 269 270 [271] 272 273 ... 299
Print
Author Topic: The grumpy old programmer room  (Read 374294 times)
Will Vale
Level 4
****


will@secondintention.com
View Profile WWW Email
« Reply #4050 on: April 11, 2013, 02:40:09 PM »

No problem, I thought - Mercurial saves reverted files as .orig, except in my case it hadn't.
It turns out this was because TortoiseHG has a little tiny checkbox which turns this feature off - must've accidentally checked it. So it wasn't the UTF-16.

Oh well, at least I now have full text diffs again.
Logged
bateleur
Level 10
*****



View Profile
« Reply #4051 on: April 17, 2013, 01:17:23 PM »

So, I have two Rigidbodies, rb1 and rb2. I need to do a few calculations and obviously mustn't mix the two up.

Today my code would have been on average more often correct if I'd flipped a coin for which one to use each time. Facepalm

Hey, wait a sec... do you think I maybe might get it right more often if I gave them more descriptive names? Roll Eyes
Logged

Will Vale
Level 4
****


will@secondintention.com
View Profile WWW Email
« Reply #4052 on: April 17, 2013, 01:23:02 PM »

A and B!
Logged
kamac
Level 10
*****


Notorious posts editor


View Profile Email
« Reply #4053 on: April 17, 2013, 01:25:04 PM »

Dammit, I deleted my stupid comment in 5 seconds and still someone quotes it. I guess I cannot count.

You're famous. How does it feel?
Logged

BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #4054 on: April 18, 2013, 01:01:58 PM »

I guess i should make gaffes more often - there's nothing people like more than picking up on them.
Logged
Player Ʒ
Level 10
*****


...hasn't made a game.


View Profile WWW
« Reply #4055 on: April 21, 2013, 03:35:56 PM »

I feel like I'm committing some form of cardinal sin by using goto a lot in my C++ II final project.
Logged
Belimoth
Level 10
*****


high-heeled cyberbully


View Profile
« Reply #4056 on: April 21, 2013, 03:37:49 PM »

You are.

Sin boldly.
Logged

mr_gant
Level 0
**


View Profile
« Reply #4057 on: April 21, 2013, 06:26:17 PM »

I can't work out what's causing these weird ghost vertices to appear:


(Link to same view with lines mode)

Drawn in lines mode, it looks fine, if a little choppy.

I can work around it by smoothing my mountains, but that's no fun at all.

Any ideas on how to diagnose this kind of issue?
Logged
Schrompf
Level 2
**

Always one mistake ahead...


View Profile WWW
« Reply #4058 on: April 22, 2013, 02:57:36 AM »

PIX. Or whatever GPU debugger your OS and 3D API offers to you.

I don't know if I actually spotted the real problem, but to me this looks like some triangles are backwards and backface culling shows them from certain angles.
Logged

Let's Splatter it and then see if it still moves.
ham and brie
Level 3
***



View Profile Email
« Reply #4059 on: April 22, 2013, 05:52:48 AM »

Or it's not the back faces but that it's overlapping front faces and blending additively?
Logged
mr_gant
Level 0
**


View Profile
« Reply #4060 on: April 22, 2013, 04:53:40 PM »

Or it's not the back faces but that it's overlapping front faces and blending additively?

This was exactly what it was. Thanks. I was representing elevation on the alpha channel, which works fine when everything's flat, didn't even think about the consequences.
« Last Edit: April 22, 2013, 08:52:47 PM by mr_gant » Logged
cubertron
Level 0
***


View Profile Email
« Reply #4061 on: April 22, 2013, 09:05:40 PM »

I have a number X and I want its value to always lie between 0 and 1 , how can i do it? Sorry for asking an offtopic question here  Sad
Logged
John Sandoval
Cpt. Dum
Global Moderator
Level 10
******


get mad


View Profile WWW
« Reply #4062 on: April 22, 2013, 09:29:38 PM »

if x>1
x=1
else if x<0
x=0


??????????
Logged

cubertron
Level 0
***


View Profile Email
« Reply #4063 on: April 22, 2013, 10:19:05 PM »

if x>1
x=1
else if x<0
x=0


??????????

Here's an example, X = 523 , always between 0 - 1 meaning it could be something like 0.122
It is kind of possible to do if the MAXIMUM NUMBER is defined, but in my case its not
Logged
X-Tender
Level 1
*


64276641
View Profile WWW
« Reply #4064 on: April 22, 2013, 10:59:28 PM »

just a rough idea, you could use the MAX value of the dataType X is (float/Number/int/uint ect.)

e.g. with AS3 code.
var x:Number = 123.5;
var newX:Number = 1 / Number.MAX_VALUE * x;
Logged


Flash-Coder free for Collaborations
Pages: 1 ... 269 270 [271] 272 273 ... 299
Print
Jump to:  

Theme orange-lt created by panic