Started by Oct 03 2012 05:13 PM

,
3 replies to this topic

Posted 03 October 2012 - 05:13 PM

Can someone show me some applications for matrices in 2d graphics programming, or other facets of linear algebra being used in game programming. I just don't see where a lot of these topics are very useful yet?

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !

Posted 03 October 2012 - 05:18 PM

SFML uses matrices to position, rotate, and scale sprites. This matrix is used when rendering the sprites to transform the vertices into the right positions.Can someone show me some applications for matrices in 2d graphics programming, or other facets of linear algebra being used in game programming. I just don't see where a lot of these topics are very useful yet?

Also, please choose better thread titles. You don't need to put your name in it saying you need help (that's pretty obvious by the fact that you're creating a thread). Rather, help people know what it is you're asking about (for example, title it something like "Applications for matrices in 2D graphics programming?").

[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

Posted 03 October 2012 - 05:40 PM

Sorry, I just felt kind of clever with that matrix (My name is a vector, get it! No, no, okay, I'm sorry). Yes, that makes sense, I'm using SFML though. If I was using SFML would there be a point in matrices or does SFML do all the matrix math for me.

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !

Posted 03 October 2012 - 05:49 PM

Ah, I see, I missed the joke

You also need to understand how matrices work, at least, because when you concatenate matrices (i.e. multiply them together into one matrix), order is important. You need to at least understand if you should rotate before translating, for example, and in which order to combine different matrices in order to get the right effect (or else you'll get it backwards).

You don't have to know a ton of linear algebra to use SFML or similar libraries that'll handle much of the matrix manipulating for you, but it certainly helps.

Depends on what you want to do. It'll generally do the matrix stuff for you (i.e. you can say move/rotate/scale by this much and it'll manipulate the matrix for you), but if you want to shear or reflect or apply other affine transformations, you need to know how to do it yourself, as SFML doesn't supply helper methods for doing these things.Sorry, I just felt kind of clever with that matrix (My name is a vector, get it! No, no, okay, I'm sorry). Yes, that makes sense, I'm using SFML though. If I was using SFML would there be a point in matrices or does SFML do all the matrix math for me.

You also need to understand how matrices work, at least, because when you concatenate matrices (i.e. multiply them together into one matrix), order is important. You need to at least understand if you should rotate before translating, for example, and in which order to combine different matrices in order to get the right effect (or else you'll get it backwards).

You don't have to know a ton of linear algebra to use SFML or similar libraries that'll handle much of the matrix manipulating for you, but it certainly helps.

[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]