Development Learning OpenGL Log

Learning OpenGL. Log 3

This post is part of a series of logs of my journey in learning OpenGL (or as some say, modern OpenGL).


I’ve started an other log, dedicated for the engine project, so I won’t talk about it any more here unless it’s very cool or related.

Today I worked with the glm library a bit more and wrote a TransformationMatrix class.

A very simple class. The name is a bit deceiving. The entire class is actually compose of 4 glm::mat4 objects. 3 for the basic transformations, and the final one being the product of the other 3. The comments are a bit incomplete but you can probably tell what the member functions do already. There are 3 setter methods, for scaling, translation and rotation. There are also two getter methods for getting the final transformation matrix.

What interesting here is that, at the moment the final transformation matrix is only evaluated when it needs to be re-evaluated. Calling any of the setter methods will not trigger the evaluation, but they will m_Evaluated to false. When the getter methods are called. They will re-evaluate the final transformation matrix only if it’s been previous modified.

There are no methods such as TranslateFromCurrentPos or RotateFromCurrentAngle at the moment because I believed those should be implemented in a entity class which will compose one or multiple TransformationMatrix in the render component. This will allow me to implement higher level movement stuff on top while keeping the matrix class lightweight and encapsulated.

Here’s the cpp part of the class:

Of course. The class is incomplete. I will overload some operators for matrix multiplication and what not. At the moment I have to call “GetGLMMatrix()” to pass the matrix to my ShaderProgram class. I will need to add support for this new class into my shader code.

I will begin work on a camera class next, once I’m up to date with this week’s lab work.

Project Alpha Dev Log

Project Alpha. Log 0

This is the first, in what will be a series of log on my journey of developing a game engine (or something akin to that) in my spare time.


I’ve mentioned here and there that I’ve been working on a game engine, and I’ve finally decided to have a log specific for it because I’ve been mentioning it a lot in my Learning OpenGL Log  lately. Which is kind of off topic.  Having a log will allow me to eventually look back and wow myself. Seeing how far I’ve come.

The term “engine”, might be a bit overkill. Right  now, the word itself  in the game industry is pretty much an acronym to massive frameworks and game development tool kits like Unity, Unreal, CryEngine etc etc. They are software developed by teams consists of tens, if not, hundreds of developers each with a specific role.  Since I’m pretty much a one man team right now. I’m just trying to have fun while learning to develop great software and eventually, have something in my folio for when I graduate. Not to mention, it’s a real motivation and sounds epic when you’re coding a “game engine”.

The developer from ShiningRockSoftware, of whom who is also a one man team, is a huge inspiration for me. Another two group that’s also been very inspiring are the developers for Stone Hearth and Risk of Rain.

Personally, I don’t have much development experience or background. I’ve only started learning and gotten serious at about a year or two ago. It will be interesting as time move forward.

Besides building the engine. I will of course use it to develop a few games that I’ve had in mind for quite a while now. One is a 2D side scroller shooter game, and another which is something sort of like CubeWorld. My initial goal was to build an 2D game engine for developing the 2D side scroller shooter, but since I’ve started doing an 3D Interactive Graphics unit this semester. I’ve gotten a bit more ambitious.

Development started back in June July this year when I had my mid year break. It was quite slow at the start because I didn’t know what I was doing. I still am. It’s been chugging along quite nicely albeit a bit slow, but progress is steady. I’ve got the basic game loop operational.There’s a basic Entity model and management system. Of which will probably require a rewrite soon. There’s an event system for handling and passing system events. There’s also a prototype message system for engine sub-system wide communication.  Which will probably be expanded and exposed to be game specific. And since I’m doing a 3D graphics unit. There will be lots of OpenGL render system codes getting baked in over the semester.

The current plan is to begin development work on the 2D side scroller game when the semester is overall, and have a playable prototype or alpha build before next semester begins. All in all, I’m quite excited!

Hopefully the coming logs will be more technical, and less chitchats about nothing.

Until next time..