I see that I've already been attacked for my poorly written game engine code tag.

What I actually intended on getting at was that a member function within a class that draws and renders an image, and can return the position in a 2D plane/world can already be a simple game engine practice for beginners.
In fact, most games you'd write will have some form of an engine, or at least parts that can be transformed better to reusable code segments and sub-systems that handle game-specific data.
It was my mistake - you don't need to pass an argument to an image loading function containing the file name everytime it's invoked/called.
I was just aiming to simplify the idea, but I failed to elaborate more into the example, as I just wanted it to be simple. My bad.
If you really want better game engine examples, or from people who have more experience in game engine design (more than me at least), you can try a lot of the examples listed above, or for the sake of your topic's title, keep working on one yourself.
A game engine is a system that will act as a "wrapper" of some sort over a graphics library, like SDL, SFML, DirectX, OpenGL, and many others. It can dramatically change depending on the genre/target of the game.
For example, a platform game would contain codes that handle 2D Cartesian plane mapping, raster image formats in a window and coordinates (for 2D), sounds, AI for non-playable characters, positioning, objects/instances such as coins or items, an animation engine (to accurately load and animate images in memory), gravity and/or friction (if necessary), advanced collision detection systems help a bunch, and playable/game states and tile systems too(tile-based games often save more memory if programmed effectively).
As for 3D, well, it's a more difficult extension, as you have a third-dimensional axis awaiting you, along with several other aspects.