Skip to content

brizzly/ptk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PTK super easy mobile game sdk

C++/OpenGL ES2/OpenAL/Freetype2

Your project will be buildable for Android, PC, Web, everywhere. This game engine is open source and forever free. Please buy me a coffee is you like it! Send your game name and I will add it in the powered by ptk list.

Features

  • Easily loads PNG, BMP, TGA, 24Bits, 32Bits, with or without alpha transparency
  • Easily loads Sound effects
  • Easily loads Music playing in background
  • OpenGL ES2 for fast graphics
  • GLFM for fast maths
  • OpenAL for fast audios
  • Freetype2 fast Font text displays
  • Splines and Nurbs
  • System fontes draw suppot
  • MultiTouch inputs support
  • Accelerometer support
  • EyeRetina supported
  • iOS18 support
  • Easily call HTTP requests
  • Portrait & landscape support
  • Tilemaps engine and editor
  • Fast scrollings
  • Sprites manager
  • Physic Box2D
  • Collisions detections slopes water grounds air ropes
  • FileSystem

PTK is very easy to use game sdk

  • KGraphic: Blit super fast, alpha, zoom, rotation.
  • KFont: Render TTF fontes text.
  • KInput: Key and touch input.
  • KMusic: Music player
  • KSound: Sound management with OpenAL.

Buy Me A Coffee

Getting Started

  1. Clone this repository:
git clone https://github.com/brizzly/ptk.git
  1. include /iPTKSources into your project

  2. Example : xcode examples project in: /examples/Simple

  • iOS Landscape
  • iOS Portrait
  • Android Portrait

Usage :

  • Load and display a sprite :
image = new KGraphic();
image->loadPicture("image.png");
image->blit(0, 0, 256, 256, 140, 80, a, z);
  • Display lines :
graphic->drawLine(x, y, x2, y2, R, G, B, A, 1.0f);
  • Display TTF text :
fonte = new KFont("neue.ttf", gameW, gameH);
fonte->RenderText(L"This is so COOL", 0, 0, 32); 
  • Load and play a sound or music :
sound = new KSound();
sound->loadSample("boing2.caf");
sound->setVolume(50);

music = new KMusic();
music->playMusic("menu.mp3");
  • Read inputs:
sFinger fingerPos = KInput::getFinger(0);

int hitX, hitY = 0;
if(KInput::isScreenPressed(&hitX, &hitY) == true) {

}

Games made with PTK

iPhone

Android

macOS

PC

About

PTK Simple iPhone game engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published