Superman[3 2 7 5] (Vector! Yes!) Needs Help

Started by
2 comments, last by Cornstalks 11 years, 6 months ago
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 !

Advertisement

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?

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.

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?").
[size=2][ 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 ]
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 !

Ah, I see, I missed the joke :)


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.

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.

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.
[size=2][ 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 ]

This topic is closed to new replies.

Advertisement