Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 18 Mar 2013
Offline Last Active Yesterday, 02:51 PM

Posts I've Made

In Topic: Compilers

Yesterday, 01:58 PM

I just wanted to say - perhaps to save you some time - when i installed the msvc 2015 community on my new windows 10 os (did clean install instead of upgrade) it wouldnt compile its own example c++ projects - not becasue I didnt include the right download packages, but because it needed to be set to run as admin.

This also happened with cmake projects - they were unable to verify the msvc c and c++ compilers/toolchain until i set cmake to run as admin. Setting it to always run as admin isnt the most intuitive thing either - but its easy enough to google.

This may be a no brainer for long time windows users but it actually took me the better portion of an evening to figure the run as admin thing out.

In Topic: I Can't Properly Rotate The Enemy To Look At Me All The Time.

28 July 2016 - 09:06 AM

I think your solution is fine but it might be worth it for you to switch over to quats in the future as they can make life a lot easier especially if you start animating things..

It seems glm has them already built in with gtx namespace?


In Topic: 2.5D Movement Problem

27 July 2016 - 11:32 AM

I believe double dragon is done with orthographic - and most of those type of games - if you do perspective rendering i still think you should only persepctive tform for rendering meaning moving forward and back would go along the projection lines - otherwise it will seem like your moving diagonally

That being said - you could simply render your characters with an orthogonal projection and everything else with perspective - but i think its going to have a strange feel.

In any case i wouldnt involve the projection for EDIT*anything but* rendering in your world positions

In Topic: 2.5D Movement Problem

27 July 2016 - 01:07 AM

I'm a bit confused by what you mean for "2d top down world space" and then rendering "front to back transformation" and your usage of up and down. That being said -


Generally you don't store any type of perspective transformations directly in your object's world positions. Rather, when you render from some point (generally this point is called the camera) you use a matrix to represent the camera's perspective transformation (although many represent the projection method separate from the camera) and multiply each object's verts by a world position matrix created from the object's world position and then this transform to give the correct scaling for how far away they are from the camera.


Everything else in your game will use the world position - the scaled verts are only used to render - usually passed in to a shader in the form of a matrix. For 2d sprites - you would be transforming the verts of the quad that the sprite is drawn on. Something like (glsl):

layout (location = 0) in vec3 vert;
uniform mat4 proj_cam_tform;
uniform mat4 world_pos_tform;

int main()
    gl_Position = proj_cam_tform * world_pos_tform * vec4(vert, 1.0);

As for movement - I would argue that if you are rendering in perspective, your character's movement should follow those parellel lines. In fact - if everything is rendered in perspective and your characters don't move along the perspective lines, the player will think their character is moving diagonally instead of straight forward or back.


last edit: I would store your world position in 3d coords instead of 2d. If you were trying to say earlier that you want a character to be able to jump and have that follow up/down with the screen, then using 3d coords and the method I show above will work. The easiest thing to do would be to store your horizontal plane coords in x and z and your vertical coord in y. Your z will then act as the object's "depth".

In Topic: Linux for game development

11 July 2016 - 05:48 PM

I started with your normal windows msvc 2012 setup - and eventually turned to linux when i was trying to understand how the build process works - i got frustrated with sifting through dialogs to change simple things.

I now use mint with cinnamon with emacs and cmake/g++. Emacs with irony, rtags, and projectile has been great for me for small and large projects.

Qt creator is the only graphical debugger i have found that is nice with mint. It can be a bit buggy sometimes.

If you use multiple monitors with ubuntu and have a nvidia card (i dont know if its all nvidia cards or what) be warned that drivera can be a pain sometimes. Also - on my mint distro it doesnt like to load its monitor configuration correctly on startup with multiple monitors connected