libcross2d is a c++ cross platform 2d graphic, input and audio library (and more) which run on Windows, Linux, Nintendo Switch, Nintendo 3DS and Sony PS Vita. It's getting released for the
GBAtemp Homebrew Bounty: 2018 Switch Edition
I'v been working since a while on a little C++ 2D cross platform development library for a few devices. All started with the Sony PS Vita and Nintendo 3DS. I wanted to ease the development/deployment process on those devices, and did write psp2shell for the vita, and libctrshell for the 3ds to do so. They allow printing over a WiFi shell for simple debugging, easily load/reload applications and so on. While they do the job, when i started the pFBA project (which didn't had a name yet), it was not enough. I still had to write a lot of custom stuff (graphics, inputs, audio, io...) to handle each devices for doing the same thing but also loose a lot of time to setup, test code and deploy on all of them. Making a simple but functional user interface was also a pain, loosing, again, some precious time for the real stuff (probably because i'm bad at UI too ).
So i started to write a simple cross platform library (libcross2d) for my own use, with a primarily goal: run on desktop to bypass all the previously mentioned restrictions, abstracting the targets graphics, inputs, etc..., allowing testing the application on the real device once a week... Then, it needed to be simple to use, and i think it achieve that as you can see in the texture example!
Since all is about 2D and UI's, i needed a good base to handle this job. It's why the 2D rendering code (textures, shapes, transformations..) is based on SFML which is perfect to handle this task, and libcross2d use hardware acceleration to render this on all the supported devices (desktop, switch, 3ds, vita...). But libcross2d also handle/abstract inputs, ttf fonts, config files, clocks/timers, basic tweening (position, rotate, scale, color..), and a very few widgets. There is no extensive documentation yet, but i did take some time to write some simple examples and how to, which should really be enough to start.
With the gbatemp homebrew competition announced, i though it could now be a good timing to make this work public, and so i worked hard since it's announcement to make a first public release of this library. I Hope people will be able to make great applications/games with it, adding the comfort of "working" on any computer around and focusing on the real stuff, and maybe submitting some cool stuff to the homebrew bounty using libcross2d !
libcross2d main features
- a c++ cross platform 2d graphic, input, audio and config library
- run on Windows, Linux, Nintendo Switch, Nintendo 3DS and Sony PS Vita
- draw textures, rectangles, circles, texts (TrueType) and more
- basic tween engine (move, rotate, scale, color)
- clock/timer classes
- configuration file handling
- pack your application (zip) for release on any target, including resources (data/common)
- quickly prototype your application on desktop (Linux and Windows)
- use hardware acceleration on Linux, Windows, Switch, 3DS and PS Vita
- use some of the great sfml library stuff (fonts, shapes, matrices)
- use tweeny for the (minimal) tween engine
- use some of the great libretro shaders (Linux, Switch)
- use some citro2d code for the 3ds renderer
- use some vita2d code for the vita renderer
- use libconfig for the configuration classes
- preliminary developed for my own use, still a work in progress
If you need any help and want to discuss, the main discussion thread is here! If you find bugs or want new features, use github issues please. A first release (version 1.0) is located in the gbatemp download center, and on github.
!! READ THE README !!
Last edited by cpasjuste,