SFML community forums

General => SFML projects => Topic started by: yyam on March 09, 2018, 12:07:47 am

Title: Hedgehogs Can Fly - 2D Physics-Platformer!
Post by: yyam on March 09, 2018, 12:07:47 am
(https://i.imgur.com/jmZafm7.png)

Hello everyone!

For the past ~2 years (on and off), I have been developing a game with SFML called Hedgehogs Can Fly, and I've finally released it for free on GameJolt! (https://gamejolt.com/games/hogscanfly/281774) It's a 2D physics-platformer where you fling a hedgehog through tricky levels to get to the finish line. It has 12 stages with different types of terrain that have unique properties. Here's the trailer!

http://www.youtube.com/watch?v=b2ffxGpmz-Q

Apologies for this being my first post here.. I really should have joined sooner! The game is written in C++ using SFML (obviously) and is open source! (https://github.com/yyamDev/ballfling) Although I wouldn't look too hard at the code ;) The levels are all loaded from color-coded image files and the physics is written from scratch to support free-form levels not constrained to a tile grid. I actually have a post on the GameJolt dev-log that goes into some detail about how this works, perhaps I could do a write up here if anyone's interested?

Anyway, the download is on the GameJolt page (https://gamejolt.com/games/hogscanfly/281774), feel free to play and tell me what you think :) I'll leave you with some screenshots and gifs!

(https://i.imgur.com/nluYNF3.gif)

(https://i.imgur.com/YYeb90B.png)

(https://i.imgur.com/LRkkBqq.png)

(https://i.imgur.com/CrohN72.png)

Links:
GameJolt Page (Download) (https://gamejolt.com/games/hogscanfly/281774)
Source Code (GitHub) (https://github.com/yyamDev/ballfling)
Trailer (YouTube) (https://www.youtube.com/watch?v=b2ffxGpmz-Q)

Have a nice day :)
Title: Re: Hedgehogs Can Fly - 2D Physics-Platformer!
Post by: eXpl0it3r on March 11, 2018, 12:22:47 pm
Awesome achievement! Not many manage to put together a complete game! :)

I really like the idea of a physics platformer and will definitely give this a try.
Title: Re: Hedgehogs Can Fly - 2D Physics-Platformer!
Post by: yyam on March 12, 2018, 01:45:33 pm
Awesome achievement! Not many manage to put together a complete game! :)

I really like the idea of a physics platformer and will definitely give this a try.

Thanks! Yeah to be honest I have no idea how I managed to keep working on it for so long :p For most of the project, the to-do list just kept growing.. I think the part I found the most difficult was creating all the levels, it felt like such a grind.

Awesome! Do give it a try and tell me what you think of it!
Title: Re: Hedgehogs Can Fly - 2D Physics-Platformer!
Post by: eXpl0it3r on March 12, 2018, 02:43:46 pm
Bought a copy and will try it this evening. ;)

Kind of surprising to me that you didn't enjoy the level making, since this is usually what I hear that people love, but maybe I only ever hear it from people that just like creating levels. Or maybe your tooling wasn't enjoyable to work with.
Title: Re: Hedgehogs Can Fly - 2D Physics-Platformer!
Post by: yyam on March 12, 2018, 10:36:10 pm
Bought a copy and will try it this evening. ;)

Kind of surprising to me that you didn't enjoy the level making, since this is usually what I hear that people love, but maybe I only ever hear it from people that just like creating levels. Or maybe your tooling wasn't enjoyable to work with.

+10,000 cool points for buying it! Thanks man :)

Hmm, I just think I enjoyed the programming more lol. The levels were just png images so I used GIMP to create them. The process wasn't that bad, I could keep the game running while I worked and quickly reload the levels to iterate. I think it just got a bit boring after spending so much time on the same project! Happy that I pushed through though, I've definitely learned a lot..



Title: Re: Hedgehogs Can Fly - 2D Physics-Platformer!
Post by: eXpl0it3r on March 13, 2018, 09:34:56 am
Had nice whirl yesterday with it. Some parts are quite difficult and while the controls need some getting used to, I do quite enjoy them. They have something unique to them.

One thing I noticed is that the lines and arrow are not anti-aliased. Are those textures or actual lines/shapes?
 (Actually I could just check the code...). If they are shapes you should should set some AA level on the context settings when creating the window to get smoother edges.

I noticed that you used ImGui and SFGUI. What is used for what?

Also you shouldn't be using a global window/SFML resource/SFGUI resource. You're lucky that this work with your setup.
Title: Re: Hedgehogs Can Fly - 2D Physics-Platformer!
Post by: yyam on March 14, 2018, 09:49:05 pm
Thanks for trying it out :) Yeah I've seen a few people play it on YouTube and it's always a bit tricky at the start. It's so hard to judge the difficulty of your own game :p I guess I should have playtested earlier! Ah I didn't know you could set context-level AA settings, I might give that a try, thanks! The arrow is an image but the terrain is drawn in a shader using the level's color map.

SFGUI is used for all the user-visible UI, all visible menus and buttons. Although I'm not sure I used it correctly as it was super slow (in debug mode) when creating the widgets for the first time.. I used imgui (https://github.com/ocornut/imgui) for debug/dev tools. Take a look:

(https://i.imgur.com/OWVhGWU.gif)

I 1000% recommend it, it's so nice to be able to just drop in tools when you want to tweak something.

Also, about the global resources, whoops! Why is that?