Search found 709 matches

by MrGodin
June 11th, 2019, 12:29 am
Forum: Everything
Topic: The problem is space
Replies: 5
Views: 128

Re: The problem is space

This looks like my AABB_2D class. I wrote a static library for math functions/classes. Math::vec2 is contained in this library. This may be why it isn't working?. I attached the files for the lib. The thor_math_d.lib is for debug builds and thor_math.lib is for release builds.
by MrGodin
June 10th, 2019, 12:46 pm
Forum: Everything
Topic: I guess I'll start
Replies: 36
Views: 732

Re: I guess I'll start

OpenGL is the same 0,0 is bottom left. What I did was use the Orthographic Matrix (for projection) and switched the top and bottom variables and then i had to flip the UV coords for texture mapping. m_proj = Math::mat4::Orthographic(left, right, top, bottom, _near, _far); The Orthographic matrix wan...
by MrGodin
May 23rd, 2019, 8:07 pm
Forum: Everything
Topic: I guess I'll start
Replies: 36
Views: 732

Re: I guess I'll start

Thats what I do, in my Application class i have a layerStack in which I push layers to. First layer is the map, second layer is entities. Also in 2D you can use a 3D positional vector where you set the z to be a render order variable.
by MrGodin
May 23rd, 2019, 1:14 am
Forum: Everything
Topic: Chili in the Matrix
Replies: 4
Views: 183

Re: Chili in the Matrix

Hey, thanks for the props. Glad you found some of my code useful to you. :)
by MrGodin
May 22nd, 2019, 12:21 am
Forum: Everything
Topic: I guess I'll start
Replies: 36
Views: 732

Re: I guess I'll start

Yes I am doing OpenGL now (stated that when i posted images). I find it a lot simpler than Direct3D but obviously not as powerful. I'll take a look at what you're doing when i get a chance to. I am very interested if reviewing your code, always nice to find nuggets of information to make things simp...
by MrGodin
May 20th, 2019, 11:08 pm
Forum: Everything
Topic: I guess I'll start
Replies: 36
Views: 732

Re: I guess I'll start

The way you want to render the images seems like a cool way to do it. I've never thought of it like that.
by MrGodin
May 20th, 2019, 11:06 pm
Forum: Everything
Topic: I guess I'll start
Replies: 36
Views: 732

Re: I guess I'll start

I did my lighting like so. Frag shader #version 330 core layout (location = 0) out vec4 out_color; uniform vec3 in_lightPos; uniform float in_lightSize; in Data { vec4 position; vec4 normal; vec2 uv; float tex_id; vec4 color; } fs_in; uniform sampler2D texture_array[32]; void main() { float intensit...
by MrGodin
May 20th, 2019, 1:50 am
Forum: Everything
Topic: I guess I'll start
Replies: 36
Views: 732

Re: I guess I'll start

Another shot. the camera is following an entity (the last one created via a loop for testing)
by MrGodin
May 20th, 2019, 1:43 am
Forum: Everything
Topic: I guess I'll start
Replies: 36
Views: 732

Re: I guess I'll start

for tiles or maps i do this... Load a text file tileswide 46 tileshigh 44 tilewidth 64 tileheight 64 filename map2.png layer 0 47,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,49 52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,...
by MrGodin
May 20th, 2019, 1:36 am
Forum: Everything
Topic: I guess I'll start
Replies: 36
Views: 732

Re: I guess I'll start

I use sprite sheets.. there are 4 strips (rows) of animation each with 8 columns(frames) to iterate through in the art here. The movement component, through it's directional value, sets the row or strip to iterate through. Theses entities have a walk,thrust,slash and die animations.(currently on wal...