Showing only posts tagged code. Show all posts.

Vimscript: Run Command in Terminal

2 minute read.

A more recent vim feature is :term, the ability to have a terminal inside vim. This super useful feature now allows you to switch between your code and asynchroneously run compile commands very easily.

Since I use Visual C++ on Windows, I need to run vcvarsall.bat in my console …

SQLite3 in Unreal Engine 4

~ 3.5 Minute Read.

I recently came across a use case for having a small local database to store some statistics in an Unreal Engine 4 project. I found CISQLite3, a plugin by conflict.industries, who unfortunately seem to have gone out of business. The plugin was released under MIT …

Data Recovery

~ 2 Minute Read.

I spent the last three days recovering old projects.

There is this one 2TB external hard drive I had for ages, broken for six years – yet I never threw it away or tried to format it to maybe be able use it again. That’s because I …

Copying Pointers does not do the job.

When shooting bullets, entities must be able to copy a bullet entity. That bullet entity is stored as a pointer in that entity, which has the ability to shoot. Okay, then let’s create a copy-constructor and create a new instance as a copy of that.

So what’s the …

back-face culling

I recently found a tutorial on back-face culling. It means telling OpenGL not to draw invisible faces (faces on the back side ;) ) of a mesh, which does speed up the rendering a lot.

I was looking for something like this after I increased the height of the world in Mineshooter …

Mouselook and SDL - Code

Okay, here is some code for mouselook with SDL

struct {
              int x, y;
              //In this case: the position where the mouse is held at
              bool trap; //flag for holding mouse at one place
          } mouse;

          void MouseMotion(){
              /* Set x and y to the current mouse position */
              int x, y;
              SDL_GetMouseState(&x …