Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
tyrelhill
Jul 30, 2006

Kylratix posted:

I think the best way to learn game programming is to start with mod coding on something like one of the Quake engines or HL2 engines. You get all of the meat of game programing without all of the technical stuff. You can slowly become more technical as you move along. The important part is that you see results very quickly, which is important for motivation, I think.

I'd have to disagree and say you should start way down at the bottom with simple stuff like Pong and Frogger before you go look at binary search trees and crap like that.

Adbot
ADBOT LOVES YOU

tyrelhill
Jul 30, 2006

Citizen Erased posted:

D3DX stuff...

Use the view matrix. I'm a little rusty with DirectX since I've been using OpenGL a lot lately, but I'm pretty sure this is correct.

code:
D3DXMATRIX mat;
D3DXMatrixIdentity(&mat);
D3DXMatrixRotationAxis(&mat, &AxisToRotateAround, TheAngle);
D3DXMatrixTranslation(&mat, TranslationX, TranslationY, TranslationZ);
YourD3DDevicePointer->SetTransform(D3DTS_VIEW, &mat);
Then just draw your object at the origin. Make sure if you're drawing other objects to set the view matrix back to an identity.

This is my opinion but never use Euler Angles for stuff like this, they get really messy after you move them around a lot.

tyrelhill fucked around with this message at 08:52 on Dec 5, 2007

tyrelhill
Jul 30, 2006

Citizen Erased posted:

Unfortunatly one of the things I need to do with the geometry after I've transformed it is export it to an .obj file. Because of that, I can't just transform by the view matrix at draw time or such, I physically need to change the x, y, z values of each vertex in the ring. Anyone got any clue on how to do so?

Do the math on paper then, its not that complicated.

tyrelhill
Jul 30, 2006

kewlpc posted:

Awesome, thanks.

Looks like I'm going to have to use texture rectangles instead of NPOT textures, though :(

The hardware usually pads NPOT textures to POT textures anyway, might as well remove that overhead and do it yourself.

tyrelhill
Jul 30, 2006

forelle posted:

Do you have any literature backing this claim up?

Specifically OpenGL 2.0 on Nvidia.

Not exactly what I said, but this quote is from this book:
http://www.amazon.com/gp/product/im...82225765&sr=1-3

stuff on loading textures posted:

It is important to note that prior to OpenGL 2.0, these dimensions must be integer powers of 2. There is no requirement that texture maps be square, but a texture loaded with non-power of two dimensions on older OpenGL implementations will cause texturing to be implicitly disabled. Even though OpenGL 2.0 (and later) allows non-power of two textures, there is no guarantee that they will necessarily be fast on the underlying hardware. Many performance-minded developers still avoid non-power of two textures for this reason.

I am actually taking a class where the author of this book is lecturing so I'll ask him tomorrow what exactly happens.

tyrelhill
Jul 30, 2006

IcePotato posted:

XNA Stuff...

Yes, use XNA. If you're going to do anything complicated with translation and rotation you're probably going to have to have at least a little understanding of linear algebra. As long as you stay 2D, you can keep things pretty simple math wise.
I would also suggest you try out using just the DirectX SDK instead of XNA. There's alot more you have to do yourself with DirectX that XNA usually handles but you'll learn a million times more about graphics programming using DirectX than XNA.

tyrelhill
Jul 30, 2006
Use Render Monkey if you're just playing around with shaders. You can compile and debug any kind of shader(GLSL, HLSL, CG). As for how they work, polish up on your linear algebra. Shaders are 1,000,000% mathematics.

tyrelhill
Jul 30, 2006
position += velocity * deltaTime

tyrelhill
Jul 30, 2006

Nuke Mexico posted:

yeah, from what it looks like, you're running the while loop as fast as possible

A Sleep(1) would help it go down, but thats something you don't want in any game loop.

tyrelhill
Jul 30, 2006

TSDK posted:

he did do ridiculous things like setting his thread priority so high

Oh my god... He needs to get smacked.

tyrelhill
Jul 30, 2006
Looks fine to me, my guess is you're not passing the texture to the gpu somewhere for Texture1.

tyrelhill
Jul 30, 2006
I'm starting some research for a project I start in a few months and want to ask a few questions here about some good sources.

First, I'm looking for any and all game development based design pattern papers and books. I've found a good amount of stuff already, but was wondering what anyone else around here happened to know about.

Second, I'm going to need to implement gameswf (http://www.tulrich.com/geekstuff/gameswf.html). Does anyone know of any similar projects that are more up to date (and open source)?

tyrelhill
Jul 30, 2006
I usually start here:
http://www.j3d.org/matrix_faq/matrfaq_latest.html

tyrelhill
Jul 30, 2006

Hammertime posted:

I know this question will probably be frowned on, but I've read the thread start to finish ...

I'm getting back into 3D programming, I've had some good times with C# and XNA in the past, but I need to transition to C++ for my next project and I'm left with two choices, OpenGL and Direct3D. The transition to C++ is due to getting a 3x performance gain in performing my procedural generation math natively.


Which one should I use?

My main concern is core API structure. Performance is a slight concern if there's a big gap, the only intensive task I'll be doing is drawing large amounts of triangles (some shader effects, but nothing too fancy).

I've heard that OpenGL is cleaner, but then I've also heard it's a dieing beast. Decisions, decisions.

OpenGL is not a dying beast. It is probably stronger than ever. As for "getting back" go with DirectX. It has a full math library, surfaces, the FX framework, and plenty of other crap already done to get you warmed up for doing practically everything yourself with OpenGL.

tyrelhill
Jul 30, 2006
Anyone know about a leak detector for COM objects, specifically DirectX objects in C/C++?

tyrelhill
Jul 30, 2006

tyrelhill posted:

Anyone know about a leak detector for COM objects, specifically DirectX objects in C/C++?

Anyone? I cant find anything!

tyrelhill
Jul 30, 2006

guenter posted:

DirectX

ID3DXEffect has a function called GetParameterByName that returns a D3DXHANDLE to the shader variable. To set it, you can do SetMatrix(4x4), SetVector(4D), SetFloat, and SetValue which is like a memcpy.

tyrelhill
Jul 30, 2006

Darkpenguin posted:

but when I draw the texture to the screen, it gets stretched.

Full Sail student, eh? It's probably cause you're creating non power of two texture.

tyrelhill
Jul 30, 2006
To quote the CTO of PEO STRI, the company that delegates billions of Department of Defense milsim money: "Half of a Full Sail class is filled with students who's parents are happy that their son is even in college, and the other half are students that you would see in a computer science class."

The school will never get a good rep because they will never become regionally accredited (and cause of their retarded degree programs, like Recording Arts). Going there will get you a job in the industry if you have the initiative and are smart enough.

tyrelhill
Jul 30, 2006

wlievens posted:

You could do a Convex Hull, that'd be a lot better than an AABB.

Isn't that exactly what his solution was?

tyrelhill
Jul 30, 2006
Can't you just write a UI mod in Lua?

tyrelhill
Jul 30, 2006

leper khan posted:

anyone know a simple way to send POST requests in unity with 0 content length?

i love it when people don't conform to standards. 0 is a valid length for POST requests, so why doesn't WWW or UnityWebRequest send them?

You can't, just send a string with a null terminator or something.

Adbot
ADBOT LOVES YOU

tyrelhill
Jul 30, 2006
gdds are pointless cause you will never see what dumb rear end flaws your opus design has until you toss it into the lake to see if it floats

e: although you should always have a "general concept/idea" doc

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply