Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 27 Jul 2010
Offline Last Active Apr 08 2012 05:44 AM

#4823999 UINT var always 0

Posted by on 16 June 2011 - 03:12 AM

mM get a weird value like -858993460, but everything is rendered correctly and if I output mM the value is correct...

This suggests to me that your breakpoint is not far enough along in your code. If I'm correct try setting the breakpoint to the next line after UINT mM = (mN + 1)/4; . Then you should see mM take the correct value.

#4820540 Dentists

Posted by on 07 June 2011 - 09:13 AM

Should I legitimately be worried about being ripped off? The second dentist was recommended to me by a friend and has had his private practice here for years. Well, I'm not sure what to think. The first dentist is getting old, he's planning on retiring, and he doesn't seem like he cares anymore. He was even canceling some of my appointments--at least twice he canceled. The second dentist definitely did not come off as shady.

IMO yes. In all honesty, and in my experience, dentists tend to be incompetent and desirous of giving you more treatment than is necessary in order to make more money. I've even known them to damage people's teeth and give bad advice so that they can prescribe more treatment in the future. Also I've known them to give "oh you definately need lots of treatment" statements to people they thought were on a private healthcare scheme and then on finding out that they were on public healthcare change to a "oh your teeth are fine, you don't need treatment" statement. Given you were having no problems with your teeth before and and given your previous dentist was obviously not trying to rip you off I'd be more inclined to trust the previous dentist.

#4818219 The United States Prison Industrial Complex.

Posted by on 01 June 2011 - 03:29 AM

Hmmm...17? I wonder how that ratio looks if you bump the age up to 18...you know, the age most college-entrants are when they start, as opposed to the majority age for high-school seniors? Kind of hard to be in college if you're still in high school.

Those facts were compiled by a British person speaking British English and in Britain "college" starts at 16 and goes on till 18 so the statistic is not invalidated on that count. I guess a valid way of stating it using American English would be that "more 17 year old black males are in prison than in high school".

BTW, to those of you "imagining" that most prisoners are in there for violent crimes, plenty of sources have been cited in this thread that demonstrate you to be wrong.

EDIT: Further reading, http://www.lewrockwell.com/roberts/roberts43.html

#4818012 The United States Prison Industrial Complex.

Posted by on 31 May 2011 - 02:38 PM

Some related stories.



A 12 year old girl was handcuffed, arrested, detained, and criminally convicted for writing "Lex was here 2/1/10" on her desk.

Not an isolated incident...


In 2007, [a] 13-year-old wrote “Okay” on her desk, and police handcuffed and arrested her. She was one of several students arrested in the class that day; the others were accused of plastering the walls with stickers.

At schools across the country, police are being asked to step in ... a food fight at a middle school in Chicago, Illinois, resulted in the arrests of 25 children, some as young as 11.

I wonder if these will count towards their three strikes...


From wikipedia:

"The term police state describes a state in which the government exercises rigid and repressive controls over the social, economic and political life of the population. A police state typically exhibits elements of totalitarianism and social control, and there is usually little or no distinction between the law and the exercise of political power by the executive."

#4817906 The United States Prison Industrial Complex.

Posted by on 31 May 2011 - 09:38 AM

When 1% of your population is in prison, you're doing something very wrong imo. EDIT: Please note that this is more than any nation in history... EDIT: will you still be brushing it off when it gets to 10%? What about 25%? Is 50% enough? ...

Anyway, the few replies have confirmed my most pessimistic prediction of the outcome of this thread. People are aware of this and they don't care. However I hope one day you realise the importance and value of one of the most American of phrases, "Life, Liberty, and the pursuit of Happiness".

#4817884 The United States Prison Industrial Complex.

Posted by on 31 May 2011 - 08:39 AM

If you don't want to go to prison, don't break the law. What a concept...

1 in 100 citizens of the United States being in prison doesn't bother you? Doesn't such a large proportion strongly suggest that US laws are too harsh and are not a good solution to the social ills the country suffers from? What happened to liberty? What happened to the idea that the United States is a country that values freedom?

#4816496 d3d12 Features?

Posted by on 27 May 2011 - 11:33 AM

I was going to mention wants along the lines of more flexible/general write access and use of buffers but after trying to specify I realised I'm not sure enough of the current limitations to do so. However I can state one specific:

InterlockedAdd() to float types as well as uint and int types.


HLSL recursion.

HLSL classes, with methods. You gave us programmable shaders. Thank you. Now let us program them properly please.

#4814543 Bugs you expected to throw a compiler error ...

Posted by on 23 May 2011 - 05:33 AM

I'm sorry, when I tried to compile this thread I got an "error C2065: 'humor' : undeclared identifier". :/

#4812455 I think all programmers should know machine code...

Posted by on 18 May 2011 - 04:44 AM

I won't give a decisive opinion on the subject of this thread because I'm not knowledeable enough, but I would like to dicuss the issue sensibly without all this flaming, and without it being spread over two threads. Why are people flaming this kid in what is a semi-professional environment? Why not just express disagreement and rate his posts down? Surely that would be enough to ensure people take his posts with a (large) pinch of salt?

Anyway, if I'm not mistaken, the general subject is about comparing assembly to high level languages and APIs which, like almost any subject, I think is a reasonable subject to discuss. My attempt to contribute to the discussion follows.

I've been trying to find a list of great games written in assembly but I cannot. As far as I know the last great game written in assembly was Frontier Elite by David Braben. The GDC Vault isn't loading for me at the moment, so I can't link the video, but I very much enjoyed Braben's Classic Game Postmortem on Elite at GDC. It struck me how immensly intelligent he is. But I think the AFAIK up till now unparalled achievements of that game are more due to his genius and use of procedural generation than due to his use of assembly. This is reenforced by recent attempts to expand on the concept of the game in 3D graphics meeting today's standards, using higher level tools, which have been succesful in principle but not yet fully realised due to the enormity of the work undertaken, assembly doesn't even come into the reasons. It is probably true that the Elite series would have been impossible had it not been written in assembly, but its also probably true that's only because of having to squeeze the required performance out of very limited machines.

Also to the OP, you should bear in mind that DirectX provides a necessary layer so that the programmers code is compatible with a wide range of graphics cards. AFAIK in assembly one would have to code different code for each graphics card... I don't know if something analogous is true for CPUs and RAM but I wouldn't be surprised. Given the effectively infinite variety of system configs apparent in todays PC market I suspect that renders PC game development in assembly effectively impossible, though probably still possible and perhaps even desirable in the hardware limited single configuration console market.

[EDIT] Question: Are all PS3 games written in assembly? Been trying to research that but having no luck.

#4810773 The power of persuasion is too powerful?

Posted by on 14 May 2011 - 11:44 AM

Talk to people, by far the easiest and most effecitve way.

I agree that its the most effective way, however I can't yet agree that its the easiest. There's a deep seated reason why shy people are shy. They certainly don't want to be shy, quite the opposite, they often day-dream of being socially affluent. Its not just simple fear of being embarrassed or worse that makes them shy. Its much deeper and more powerful than that.

EDIT: For example, I am afraid of heights, to the point where looking over a low balcony makes my knees knock (I'm tall). Its probably due to one of my uncles holding me over balconies for my amusement as a child (I was a big fan of superman :P ), and my older brother always scaring the crap out of me by pretending to push me off balconies whenever I looked over them. Whatever, people do stupid things, especially kids. Anyway, but if someone were to randomly place 100 euros at the top of say 1 of 10 climbable trees, and gifted them to me, I would push past my fear of heights and climb all ten trees if necessary to get that money.

EDIT: On the other hand the value of a friend or other half is much higher than that of a 100 euros, but I cannot make myself talk to 10 strangers for the potential reward of a friendship or other half (even though objectively its probably a much easier and safer task than climbing 10 trees). It could almost be described as an abject terror that renders you almost incapable of logical thought, action, or speech, a rabbit in headlights effect. Its simply not that easy for those who are shy.

#4809399 Air Resistance

Posted by on 11 May 2011 - 07:11 AM

Thanks for the help. I really appreciate it.

But its very complicated.

You're welcome.

OK, here's a simpler version of my solution:

The simplified acceleration of the bullet due to air resistance is:

a = c * r * speedX / m

where r is the radius of the bullet, m is the mass of the bullet, and c is a constant you can play with till the movement of the bullet looks right.

EDIT: in fact if you don't really care about the mass and radius of the bullet you can just use:

EDIT: a = k * speedX

EDIT: where k is a constant you can play with till the movement of the bullet looks right. That's actually a much easier way to do it because you won't have to worry about units at all. The downside is you can't take into account different sized or different weight bullets very well, and you can't take into account different movement mediums like air or water...

So every frame you need to do the following:

1 - find out how much time t has passed since the last frame (zero if its the first frame)
2 - change the position of the bullet by t * speedX
3 - calculate a
4 - change speedX by a * t

#4809364 Air Resistance

Posted by on 11 May 2011 - 05:42 AM

EDIT: jesus I gotta learn to read properly, lol. Under construction.

EDIT: OK, constructed. My apologies for not reading your post properly in the first place.

So the bullet has a speed of 5 units per second. I recommend changing this into a SI unit measurement like meters per second for example.

EDIT: You want to replace that simple increase with a check to see how many seconds have passed since your last frame (we will call this t), and increase your bullet's position by t*speedX. EDIT: the reason for that is that otherwise your bullet's speed will depend on your framerate.

Now, onto your actual question. Air resistance is complicated at high speeds. For now lets look at a simplification of it, meaning low speeds and low viscosity mediums like air is. (EDIT: simple physics is usually more than fine for games). The resistive force on the bullet is:

F = -bv

where v is the speed velocity of the bullet, and b is the drag coefficient.

we know v, so we need to know b to get F. Assuming our bullet is round:

b = 6 * Pi * n * r

where the symbol like n is the "dynamic viscosity" of the air and r is the radius in meters of the bullet. You must decide on the radius of the bullet, but n is 18.6 * 10^-6 Pa s for air at room temperature.

This tells you the force on your bullet.

F = ma, so by setting the mass of the bullet you can calculate the deceleration on the bullet due to air resistance. This will tell you by how much to update speedX for the next frame.

EDIT: but you will want to update F every frame too to account for the changing speed.

#4809346 Travel at a fraction of light speed. Subjective time question.

Posted by on 11 May 2011 - 04:36 AM

Thanks for the rate-ups, but I'm beginning to think that this new post-rating system is worse than the person-rating system :P

[offtopic]Hmm, I think it might work out allright. Its easier to go up but its also alot easier to go down. I think the only problem is if people start abusing it with alt accounts, but I guess that could be solved by restricting accounts to one per IP as per the old site. Also, I think people tend to refrain from abusing it with alt accounts because they know it would take the whole point out of the rating system and therefore the whole point of them abusing it in the first place

However I do think the bar for "Excellent" rep status should be raised by a lot (its currently at 20 :/ ), maybe to 100? And also perhaps there should be another bar for "Legendary" at 1000? So, Good at 10, Excellent at 100, and Legendary at 1000? I guess there could be a God status at 10000 :P

EDIT: *Starts getting excited* And maybe we could unlock new gear and super powers at higher re.. err.. no.[/offtopic]

#4809336 Travel at a fraction of light speed. Subjective time question.

Posted by on 11 May 2011 - 04:01 AM

Oh I miss-read years instead of light years. My bad. I'll repost when I've taken that into account.

So bearing in mind that the journey is 10 light years in length as seen from earth we calculate as follows.

The time taken for journey as measured by the observer on earth will be 20 years. And the time taken for the journey as measured by the traveller's clock will be 17.32 years.

EDIT: so szecs post #9 was the first correct calculation, unless I missed some edits. But then iirc he edited post number #7 so that that is now seemingly the first one.

EDIT: Anyway, good to have two separate confirmations of the result. :]

#4809335 Travel at a fraction of light speed. Subjective time question.

Posted by on 11 May 2011 - 03:49 AM

in other words your first calculation was correct.

Well, no, because lightyears as distance is defined in the Earth's coordinate system (not exactly, but you know what I mean). So 10 years means 10 years in cE not cT.

Oh I miss-read years instead of light years. My bad. I'll repost when I've taken that into account.