Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
0

FlatFormer Engine; Something i will personally use for a few of my games

A topic by Florentinity created Mar 17, 2025 Views: 238 Replies: 6
Viewing posts 1 to 2
(1 edit)

See the default stage here : https://florentinity.itch.io/flatformer-engine-demo

I've decided that (some) of my games will not use Unity, or Godot, or any game engine in that matter, but instead make my very own engine, This is a 2D Platformer Engine, which some of my upcoming games will use, featuring collision, movement, compatibility, and generally being lightweight; The Engine was made in C, using OpenGL to render the scene, while also using MinGW to compile the application, File size sitting at around 25 Kilobytes in size (More precisely 25,600 Bytes, according to Windows)

(Just to clarify, i will NOT be leaving Godot at all, I will still post games using other well-known engines occasionally)

I used basically everything i knew about C's Programming language to work out Collision and Velocity movement, it might not be perfect, though...

Direct Screenshot from an old 2001 PC someone gave away to me

This was tested on genuine Pentium 4 Hardware, with 1024 Megabytes of RAM; In task manager you can see the low resource usage, proving this engine to be pretty stable for older PCs!


If there's anything you want to know about the engine, leave a comment and i will try to reply as quickly as i can

(P.S. Just to clarify, this game does not contain any viruses, it seems to be falsely accused, and that might be because it isn't a commonly downloaded file, if you're still unsure, at least give it a shot on an isolated Virtual Machine, with no Internet Access)

Very cool, I'm always happy to see people writing their own engines. I tried it on Linux Mint using Wine 9.0 via Lutris and it seemed to work fine without any tricky configuration stuff.

I'm impressed by the file size. I use SDL to make porting easier, but it does increase the file size a fair bit and creates a few extra dependencies.  Obviously I'd like to see a Linux port, but I wouldn't have a clue how complicated it is to port the code to use Linux native window and input libraries.

I have a few questions about the engine:
How are you handling collisions? Not the full technical breakdown, but just the general outline.
How are you planning to implement sound?
Are you going to post a Dev-log?

Anywho; good work. I'm interested in seeing where it goes :)

I'm glad you enjoyed my demo!


As for how i made the collisions work, it was basically a bunch of math that boils down to "If Player is past the left side of the collision box, put them back into place" it does the job basically flawlessly, but may need to get improved for performance reasons (If possible, at least); The source code IS a bit of a mess currently, and i'm planning on rewriting it a bit when Friday comes around; Sound WILL be implemented, although it's not the biggest priority at the moment, i'll definitely TRY to implement it without third party libraries, but that's a problem for another time...


As for a Linux port, i'll see what i can do, and if i can handle Window Initialization and the Input system there, i'll be sure to port the engine here too!


As for a dev-log, likely somewhere around Saturday or Sunday where i'm most active, it'll be found on the Game Page itself

My code is usually an absolute mess until I finally have most of it done and I start to like the project, then I'll either clean it up or rewrite it.

I've used that kind of collision method before and it can work pretty well, but be wary if you're not using a fixed frame rate because delta time lag or high velocity can cause teleporting through AABB's or other odd inconsistencies, but your collisions seem to work fine from what I saw. 

Performance wise; I can' think of anything faster than AABB vs AABB, but are you using quadtrees or some other spacial partitioning? That should minimise the amount of collision checks per frame for entities compared to iterating through an array or list and comparing it to another array or list.

I'm following your page now, so I'll be interested to see where it goes. Keep up the good work :)

Thank you for following my page! Feedback really means alot to me, as it allows me to know what to implement and what to NOT implement (It's also my very first time getting actual feedback, so excuse me if i'm doing something wrong by replying like this)


Speaking of which, i have now made a new devlog regarding the new V2.0 Build, and i think you'll enjoy it!

I was supposed to post it tomorrow, but i got a little ahead of myself, since i finished coding everything yesterday...Hopefully i will learn how to schedule stuff better (...probably)

Sorry for the late reply; I was away from home, but just checked out the Linux version and read the Devlog.

Cool stuff, very impressed by the size and lack of external dependencies. What are your external includes/libraries?

Two suggestions that I have:
I noticed that the window has both the enlarge and scale options available, but the engine doesn't resize to the new size. The window API you're using should have some sort of flags or functions to disable these options, or you should be able to grab the current window size through an API function, but either way; learning those flags or functions will just give you a little more control for the engine.

I also noticed that one of the maps contains a slope and through Debug mode; I saw that it was created with multiple tiles. It works, but I figure that adding sloped tiles would stop over-draw and be more efficient. You could even allow sliding based off the normal of the slope. I remember THIS article helped me a lot when I was making an AABB vs AABB platformer in the past.  Lots of good stuff that's easy to implement in that article.

I'll definitely keep an eye on the project. I'm a big fan of people coding their own engines :D

I appreciate the fact that my engine is being seen, it genuinely makes me happy to see stuff like this happen to me!

> What are your external includes/libraries?


In the Windows build, all that is being used is "windows.h" and "gl/gl.h" in the source code, as well as "winmm.h" to get a more stable FPS, while in the Linux build it uses a number of X11 libraries (X11/Xlib.h; X11/Xutil.h) for the window to be created, as well as "GL/gl.h" and "GL/glx.h", as well as "time.h" to limit the FPS, for the most part, all of these libraries seem to do the job well, and they don't seem to bloat the file size all too much;


> I noticed that the window has both the enlarge and scale options available, but the engine doesn't resize to the new size.

dang...i knew i missed something, I'll make sure to fix that in the next update (Assuming this was on the Linux Build, since in the windows build the resize button was deactivated);


> I also noticed that one of the maps contains a slope and through Debug mode; I saw that it was created with multiple tiles. It works, but I figure that adding sloped tiles would stop over-draw and be more efficient.

this was mostly me just goofing around, although the article looks extremely helpful in my case here, i'll make sure to read into it (I also need to mention that building these levels were a little hard to say the least, i might make an Editor tool for myself, which should allow me to build levels MUCH longer than what i was originally making, let me know if you want this tool to be third-party)