Montag, 9. Januar 2017

Hook em Up - The Animation and the more Debugging

I put in almost everything the code needs for animation, I think. And I found a collision bug that only happens when falling adjacent to a wall an there is a diagonal tile missing. I don't even think the finished game will have such a configuration in a level because it looks ugly but I am going to correct it anyway.



Other than that, I seem to be considerably more comfortable using pointers even though I haven't programmed in C++ in the last ten years or so. Can't exactly pinpoint why.

Inserting pictures in blogger doesn't work correctly most of the time. It has gotten worse than years ago. I consider writing my own blog software sometime.

Dienstag, 25. Oktober 2016

Hook Em Up - The Debugging

The first thing I wanted to do was correct the collision detection but I came to the conclusion pretty fast that it would be better if I had the possibility to debug some things in real time. Can't be that hard, can it?

So I look into SDL and it seems like there are some functions that load and render fonts but what's not immediately obvious is, it's not the work of SDL. It needs the additionalz librariez called SDL_tffz (without the 'z' in the end). So I installed hopefully the right one and after some jiggling with some folders and link parameters it works.

Next problem was that the std::to_string() function couldn't be found. After a bit of googling, I found out that some mingw distributions have include files that are missing some functions and I had to download a patch. After I installed the patch and it still didn't work, I found out that I had to turn on a compiler switch to use a newer C++ standard, so I probably didn't need the patch at all.

Behold the letterz!

Too much time wasted.

Dienstag, 18. Oktober 2016

Hook Em Up - The Beginning

So I started a new game. My initial thinking was, that additionally to the Unity 3D one I make where there is a mountain of Unity knowledge I need to learn in order to make it, I will have something to fall back where I can just write code with a minimal amount of API* roadblocks or development environment complications. I obviously underestimated how much time it takes to set up a simple SDL2 project in CodeBlocks.

I wanted to do a game/editor hybrid to be able to edit the levels on the fly.


As of now the player can control one actor. The second actor is controlled by the computer, goes to the direction of the player for a couple of seconds bumping off walls, makes a pause and starts the cycle again. You cannot see it here but collision detection with the floor is not working properly right now. The next step shall be as follows:
  1. Repair collision detection with floor.
  2. Implement save / load functionality for levels.
  3. Implement animation so that we can see what the actors are doing.
  4. Implement attack functionality.
Here is the video on youtube.

*API: application programming interface a.k.a. a bunch of functions you can call that do stuff for you. Unity can do everything for you and as such it is overwhelming.