Search found 9 matches

by nickyc95
Tue Aug 19, 2014 2:45 pm
Forum: Programming Discussion
Topic: Orthographic Projection Issue
Replies: 4
Views: 3032

Re: Orthographic Projection Issue

What are the results if you omit using any model or camera transforms and multiply the vertices of an on-screen quad by just the ortho matrix? Hi there, Turns out my math class isn't pristine :lol: I was swapping conventions from the actual math class and the orthographic matrix. I just have to ens...
by nickyc95
Tue Aug 19, 2014 3:19 am
Forum: Programming Discussion
Topic: Orthographic Projection Issue
Replies: 4
Views: 3032

Re: Orthographic Projection Issue

Try these 2 changes: void Matrix4f::InitOrthoProjTransform(float left, float right, float top, float bottom, float zNear, float zFar) { m[0][0] = 2 / (right - left); m[0][1] = 0; m[0][2] = 0; m[0][3] = 0; m[1][0] = 0; m[1][1] = 2 / (top - bottom); m[1][2] = 0; m[1][3] = 0; m[2][0] = 0; m[2][1] = 0;...
by nickyc95
Mon Aug 18, 2014 10:07 am
Forum: Programming Discussion
Topic: Orthographic Projection Issue
Replies: 4
Views: 3032

Orthographic Projection Issue

I have a problem with my Ortho Matrix. The engine uses the perspective projection fine but for some reason the Ortho matrix is messed up. (See screenshots below). Can anyone understand what is happening here? At the min I am taking the Projection matrix * Transform (Translate, rotate, scale) and pas...
by nickyc95
Thu Jun 05, 2014 10:27 am
Forum: Programming Discussion
Topic: How to handle 2D OpenGL?
Replies: 7
Views: 4009

Re: How to handle 2D OpenGL?

Hey again, over the course of the day I have been looking into finding more info.

What I would like to know is, is it a good idea to use gluUnProject and pass in the screen coordinates to convert it into world coords?


Thanks
by nickyc95
Thu Jun 05, 2014 5:43 am
Forum: Programming Discussion
Topic: How to handle 2D OpenGL?
Replies: 7
Views: 4009

Re: How to handle 2D OpenGL?

If you're using the method he's talking about, you could say that one tile is for example 0.5 x 0.5 meter, if that makes sense in your game, and just work your way from there (scale your models etc. to fit in these measurements). So if you're going to add a tree in the map, you could just make it 3...
by nickyc95
Thu Jun 05, 2014 2:08 am
Forum: Programming Discussion
Topic: How to handle 2D OpenGL?
Replies: 7
Views: 4009

Re: How to handle 2D OpenGL?

1. Is it best to use an orthographic projection or a perspective projection? It's definitely easiest to deal with orthographic projections in the 2D space. Now what you want that space to be is just what's convenient for you. You can load up identity matrices into the pipeline and render directly t...
by nickyc95
Wed Jun 04, 2014 3:56 pm
Forum: Programming Discussion
Topic: How to handle 2D OpenGL?
Replies: 7
Views: 4009

How to handle 2D OpenGL?

Hi there, Over the past few weeks I have been learning modern OpenGL (programmable pipeline) however there doesn't seem to be much coverage on 2d games. What I would like to know is, 1. Is it best to use an orthographic projection or a perspective projection? 2. If using an Ortho projection, should ...
by nickyc95
Thu Apr 03, 2014 10:15 am
Forum: Programming Discussion
Topic: Separating axis Theorem rotation issue
Replies: 1
Views: 2193

Separating axis Theorem rotation issue

Hello there, I am trying to get SAT working within my 2d game using Windows 8 and DirectX (DirectXTK). However i have run into an issue which I cannot figure out. (I have uploaded a video to youtube that demonstrates the issue) When the boxes are AABB the collision works great, when i rotate the box...
by nickyc95
Wed Mar 05, 2014 1:43 pm
Forum: Programming Discussion
Topic: What books would you recommend for c++
Replies: 3
Views: 3680

What books would you recommend for c++

Hi there, Been following Elysian Shadows for a few years now but never came on the fourm.. until now. I have been looking at all of the resources that people have recommended but a lot of the (especially books) seem to be very old and most likely outdated. For instance Sam's teach yourself c++ in 21...