Open drschwabe opened 6 years ago
Pretty cool that you're looking to port this to C/C++. Great challenge...
What I like about having it in a scripting framework, like ChaiLove, is that you don't need to recompile it every release. The core takes on that responsibility.
That being said, RetroLuxury could be an option. When compiled, it embeds the assets directly in with the binary.
Wow, thanks for headsup on retroluxury! That is gunna come in useful. It is actually along the lines of what I was looking for when opening this issue: C or C++ examples of accessing libretro's API for the purpose of rendering/input/sound; ie- just the important game dev parts. In this case RetroLuxury seems actually a wrapper/higher level API but still in C/C++ so just as educational and probly a lot more handy!
Btw for clarification I didn't necessarily intend to actually start a C/C++ port of FloppyBird but was more hinting that you should do one ;) I'll close this - and if I ever get around to taking a stab myself I will definitely post a follow up.
Always looking for better rendering platforms! Tried out libretro-cairo to render graphics with Cairo. While it seemed to work, the dependency chain made compilation difficult. Could be worth getting it up and running.
I like C/C++ a lot more than Lua, which is why ChaiLove is running ChaiScript. ChaiScript feels like a combination of C++ and JavaScript, which are both languages I love. ChaiLove has been a great learning tool for me, and I'm always looking for it to grow. If you have any ideas, feel free to post an issue!!!
Thanks so much for posting this, it makes me happy. Going to leave this issue open, as getting this on new platforms/frameworks is always worth discussion :+1:
@drschwabe Found raylib, which is a minimalist framework for game development. Would be awesome to create some libretro-integration with it... It uses OpenGL for rendering, which has some benefits over SDL 1.2, which is what ChaiLove uses.
If you're looking to port FloppyBird over to C/C++, that may be an option :wink:
Experimented with it and ChaiScript over at https://github.com/RobLoach/raylib-chaiscript/ .
cool!
Thanks for the headsup. raylib looks great for making a game 'low level' while taking care of most low-level stuff so you don't have to worry about it; and OpenGL too not SDL that's awesome.
though still wishing for a dead-simple high-level API to wrap over libretro core itself; ie- for drawing a frame, making sound etc. If even for experimentation and to better learn the libretro core API without necessarily getting into nitty gritty.
ie:
single function for rendering a frame via PNG image single function for playing a sound from a WAV file
and so forth.
Would love to see a raylib libretro port.
TIC-80 another option.... https://tic.computer/ https://github.com/libretro/tic-80
I've found ChaiScript is pretty slow compared to other JIT solutions.
Really digging this game and libretro. Props! It runs so silky smooth and looks great. Well done.
I've tinkered with Lutro which was fun. So now I've been reading up on ChaiLove and cloned this too; much tinkering scheduled ahead.
In the meantime, I wanted to make a mere suggestion - not necessarily a request since I realize this may or may not be fun and/or easy to implement so free to close this issue IMMEDIATELY if this is out of the question BUT - if I may, suggest the following:
a new 'raw' C/C++ libretro core featuring your (ChaiLove rewrite) FloppyBird.
Out of all the official game cores for Libretro, the one that seems to be missing is a simple game that demonstrates how to interface directly with Libretro's API using only C/C++.
Perhaps nxengine-libretro is the closest - but that game is a lot more complex than FloppyBird; hence this suggestion. My thinking, as a very bad but eager to improve C/C++ programmer, is that I can better improve my skills & more easily jump into hacking & creating my own libretro games/cores if I can work with C/C++ directly as opposed to proxying via Lua/Love/Lutro, ChaiLove/ChaiScript, etc.
Of course; the latter approaches are fun too so am quite content to approach the beast via those routes but just wanted to plant the seed for this idea in the meantime.
Oh and if you know any other game cores that use only C/C++ that are simpler than nxengine do share! The holy grail example I am looking for is just a basic game, ie- FloppyBird - that cleanly and clearly demonstrates all of the fundamental libretro API features without using any special engine or intermediary scripting language.