You do not have permission to edit this page, for the following reason:
The action you have requested is limited to users in one of the groups: Users, Administrators.
Free text:
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 all began with the Sony PS Vita and Nintendo 3DS. The original idea is to ease the development/deployment process on those devices, using [https://github.com/Cpasjuste/psp2shell psp2shell] for the Vita, and [https://github.com/Cpasjuste/libctrshell 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, at the beginning of the [[PFBA Vita|pFBA]] project (which had not yet been named), a lot of custom stuff has to be written (graphics, inputs, audio, io...) to handle each devices for doing the same thing, however that takes 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. A simple cross platform library (libcross2d) was then created with the primary goal of running on desktop to bypass all previously mentioned restrictions. The library abstracts the target graphics, inputs, etc. allowing for testing of the application on the real device once a week. The library was designed to be simple to use, as demonstrated in the [https://github.com/Cpasjuste/libcross2d-examples/blob/master/examples/texture/source/main.cpp texture example]. For the purpose of handling 2D and UI's, a solid foundation was required. Therefore, the 2D rendering code (textures, shapes, transformations...) is based on [https://www.sfml-dev.org/index-fr.php SFML] which is well-suited for this task, and libcross2d uses hardware acceleration to render on all supported devices including desktop, Switch, 3DS, Vita, and others. In addition, libcross2d also handle/abstract inputs, TTF fonts, config files, clocks/timers, basic tweening (position, rotate, scale, color...), and a few widgets. While comprehensive documentation is not yet available, [https://github.com/Cpasjuste/libcross2d-examples some simple examples] and instructions have been provided to help users get started. libcross2d was first released for the GBAtemp Switch Homebrew Bounty 2018 (Tools and Utilities). ==Features== *A c++ cross platform 2d [https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/texture graphic], [https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/input input], audio and [https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/config config] library. *Run on Windows, Linux, Nintendo Switch, Nintendo 3DS and Sony PS Vita. *Draw textures, rectangles, circles, texts (TrueType) and more. *Basic [https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/crazy tween] engine (move, rotate, scale, color). *[https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/fps Clock/timer] classes. *[https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/config 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 [https://www.sfml-dev.org/ sfml] library stuff (fonts, shapes, matrices). *Use [https://github.com/mobius3/tweeny tweeny] for the (minimal) tween engine. *Use some of the great [https://github.com/libretro/glsl-shaders libretro] shaders (Linux, Switch). *Use some [https://github.com/devkitPro/citro2d citro2d] code for the 3ds renderer. *Use some [https://github.com/xerpi/libvita2d vita2d] code for the vita renderer. *Use [https://github.com/hyperrealm/libconfig libconfig] for the configuration classes. *Preliminary developed for my own use, still a work in progress. ==User guide== Some cross2d examples: *[https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/texture texture] - drawing a simple texture. *[https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/font font] - drawing some text. *[https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/input input] - handle inputs (gamepads, keyboard on linux). *[https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/fps fps] - all about timing (fps, time, delta). *[https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/config config] - handle a configuration file. *[https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/configbox configbox] - draw a configuration to screen. *[https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/filer filer] - a file manager example. *[https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/crazy crazy] - some tweeny stuff. *[https://github.com/Cpasjuste/libcross2d-examples/tree/master/examples/physics physics] - basic box2d support. Build and run: *See libcross2d-template repository *Please note that the example repository does not contain platform specific data (to run on switch, vita, ps4...). You'll have to copy them from the "libcross2d" data directories if you want to run the examples on these devices. ==Media== '''libcross2d''' ([https://www.youtube.com/watch?v=R3YN7-hG8yQ cpasjuste]) <br> <youtube>R3YN7-hG8yQ</youtube> ==Changelog== '''v1.1''' *Renderer: Add onInput and onDraw override possibility. *Io::getDirList: Allow skipping hidden files. *Io::File: Add size to constructor. *Io::Posix: Don't use stat on switch. *Input: Refactor key names. *Input: Add basic touch support. *Shape: Fix getGlobalBounds. *Shape: Set all function virtual. *Shape: Set/getOrigin: rename to set/getOriginVector. *Shape: SetAlpha: add recursion flag. *Shape: Add vertexArray getter. *Sprite: Add sprite class. *Tween: Add setFromTo function. *Widgets::ListBox: don't use font outline by default. *Utility: Use std::string for removeExt function. *switch: Add sys/clock class (overclock). == External links == * GBAtemp - https://gbatemp.net/threads/libcross2d-a-little-cross-platform-2d-library.522096/ * GitHub - https://github.com/Cpasjuste/libcross2d-examples [[Category:GBAtemp Homebrew Bounty 2018]]
Advertising: