D
Deleted User
Guest
OP
Kairy - A 2D Game Framework
Hi, I'm Nanni one of the creators of the original Lua Player Plus.
Currently I'm working on a C++11 2D game framework for the 3DS named Kairy.
Right now the project is a WIP, many things don't work as expected and there are many bugs, but the library is still usable to make games. It's also pretty fast.
The library is heavily inspired to Cocos2D and SFML, so many things are similar.
This is a list of some supported features:
And here is the result running on Citra:
And here is the result running on Kairy compiled for Windows:
If you like Kairy and you want to contribute, please help the project on GitHub.
Currently I don't have a enough time to put on it so i will greatly appreciate your help.
I've made Kairy to allow easily games creation for any interested C++ developer (or maybe because i wanted to play someting new on my 3DS...).
I can't wait to see what you can do with it =)
KNOWN BUGS:
LINKS:
GitHub repository: https://github.com/CurryGuy/Kairy
Current version compiled with lastest libctru: https://mega.nz/#!CMNDgJTS!o3fVM2efQ2dfLeVCTMhAddPH1FwI4yfspR_2RQEDFwk
3DS compiled examples: https://mega.nz/#!Od80SK7Q!lDmSe2qP-cXJHZ-e0xpf-OUgJNS92GOlnUqfDPZuDVc
Hi, I'm Nanni one of the creators of the original Lua Player Plus.
Currently I'm working on a C++11 2D game framework for the 3DS named Kairy.
Right now the project is a WIP, many things don't work as expected and there are many bugs, but the library is still usable to make games. It's also pretty fast.
The library is heavily inspired to Cocos2D and SFML, so many things are similar.
This is a list of some supported features:
- Kairy can be compiled for Windows, Linux and Mac making your life super easy when you want only to test the appearance of your game. It depends on GLEW, OpenGL and OpenAL. You should build it by yourself (for instance on Windows by adding all the source to a Visual Studio solution) but i'm planning to write a CMake file.
- Tmx maps loading and rendering (with support for animated tiles)
- A complete input engine
- Loading of Bitmap Fonts and TTF (using stb_truetype) fonts
- A resource manager to avoid loading of textures twice
- Rich 2D math library (Vectors and Rectangles)
- A decent scene graph
- A class for images manipulation
- Actions
- Basic UI
- A working Sound class
- Some third party libraries are included in Kairy itself (like Box2D, tinyxml2 ... )
Code:
#include <Kairy/Kairy.h>
USING_NS_KAIRY;
class TestScene : public Scene
{
public:
bool onCreate() override
{
auto sprite = Sprite::create("assets/sprite.png");
sprite->setPosition((getScreenSize(Screen::Top) -
sprite->getSize()) / 2.0f);
sprite->runAction(RepeatForever::create(RotateBy::create(1.0f, 120.0f)));
addChild(sprite);
auto triangle = TriangleShape::create(Vec2(-30, 30), Vec2(0, 0), Vec2(30, 30));
triangle->setPosition((getScreenSize(Screen::Bottom) - triangle->getSize()) / 2.0f);
triangle->setColor(Color::Red);
addChildBot(triangle);
return true;
}
private:
};
int main(int argc, char* argv[])
{
auto device = RenderDevice::getInstance();
auto audio = AudioDevice::getInstance();
auto sceneManager = SceneManager::getInstance();
device->init();
audio->init();
device->setQuitOnStart(true);
sceneManager->changeScene(std::make_shared<TestScene>());
while (device->isRunning())
{
sceneManager->update(device->getDeltaTime());
sceneManager->draw();
device->swapBuffers();
}
audio->destroy();
device->destroy();
return EXIT_SUCCESS;
}
And here is the result running on Citra:
If you like Kairy and you want to contribute, please help the project on GitHub.
Currently I don't have a enough time to put on it so i will greatly appreciate your help.
I've made Kairy to allow easily games creation for any interested C++ developer (or maybe because i wanted to play someting new on my 3DS...).
I can't wait to see what you can do with it =)
KNOWN BUGS:
- Music streaming doesn't work (currently only wav mono files works)
- Incomplete and shitty particle engine
- PCM8 stereo playback is broken
- RenderTexture doesn't work
- CircleShape is broken
- Threads creation inside classes could randomly crash
- Converting some types of floats to strings (with Kairy utility functions or even with sprintf) will crash the 3DS
- Incomplete UI
- Incomplete Actions
- Loading a Tmx map with a tsx tileset doesn't always work
- Loading resources from zip files on the 3DS dont' work right now
- Screenshots on Windows, Linux and Mac are upside down (I know the reason but i'm too lazy to fix it xD)
- Directory class is super incomplete
- Error handler isn't flawless
LINKS:
GitHub repository: https://github.com/CurryGuy/Kairy
Current version compiled with lastest libctru: https://mega.nz/#!CMNDgJTS!o3fVM2efQ2dfLeVCTMhAddPH1FwI4yfspR_2RQEDFwk
3DS compiled examples: https://mega.nz/#!Od80SK7Q!lDmSe2qP-cXJHZ-e0xpf-OUgJNS92GOlnUqfDPZuDVc
Last edited by ,