Page 1 of 1

Simple C++ platforming engine with SFML 2

Posted: Mon Jul 02, 2012 9:18 am
by Skomakar'n
Kind of over the course of one night and some hours of the following day I made a basic platforming engine with some help from a friend, who mainly took care of resource management. Initially we were going to actually make a game, but we had gotten into the mindset of programmatic design from the framework writing efforts of the previous day, so we soon went into a generic direction. It was never intended to be anything big, serious or public, but it seems to be working well enough, so I see no reason not to share it, in case anybody finds it difficult to get this kind of stuff working.

Features:
* WASD movement (W = left, D = right, W = jump)
* Gravity
* Walls, grounds, roofs/ceilings and floating platforms are possible (just put blocks anywhere, and the engine should take care of it)
* Camera following
* Resource management for images
* Nothing that's not visible on screen will be drawn, and only stuff within that area and a little bit outside of it will be updated and handled for collision

Common features unfortunately not implemented:
* Slopes
* Wall jumping
* Mid-air extra jumps

Since this was indeed not written with any kind of publication in mind, there is no tutorial on how to use the engine, but there were a couple of blocks and a character implemented, so look through the code and see if you can figure it out. The blocks and the character are added to the level in the Game class.

No licensing rubbish. Just do whatever you want with it. Claim to have written it yourself if you wish. It'd make you a terrible liar, but I won't come after you.

Download our working folder as a .zip here.

Compile and run to try. Uses no other dependencies than STL and SFML 2.

Re: Simple C++ platforming engine with SFML 2

Posted: Fri Jul 13, 2012 9:56 pm
by short
any updates?

Re: Simple C++ platforming engine with SFML 2

Posted: Fri Jul 20, 2012 4:00 pm
by THe Floating Brain
I may play around with it, thanks for sharing!