pp ~refactor
The base library of the polyplex engine. (Heavily WIP, non-idiomatic)
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
This package provides sub packages which can be used individually:
pp:openal - An BindBC binding to OpenAL
pp:core - Polyplex Core library
pp:audio - Polyplex Audio subsystem
pp:math - Polyplex Math library
pp:utils - Polyplex utility library
pp:gl3 - Polyplex OpenGL 3.2 renderer
Polyplex Main Library (libpp)
<a href="https://www.patreon.com/bePatron?u=10156994" data-patreon-widget-type="become-patron-button"><img class="s5qsvfm-0 fIpNGV" src="https://c5.patreon.com/external/logo/becomeapatronbutton.png"> Mastodon | Twitter
libpp is an game development framework written in D. libpp supports OpenGL and will in the future support Vulkan.
libpp is the base rendering, input handling, content handling, etc. library for the WIP Polyplex engine.
Top Tier Patrons
- The Linux Gamer Community
- WeimTime
Using libpp
Find libpp on the dub database for instructions on adding libpp as a dependency to your dub project.
Once added, you will need to set logging levels, choose a backend and create a window.
Current capabilities
Polyplex is still very early in development, but libpp can already be used to make simple 2D games, that are relatively easy to port to other platforms. Polyplex packages textures, sounds, etc. into files with the extension ppc. To convert ogg, png, jpeg or tga files to .ppc, use ppcc
Othewise, you can use Content.Load!(Type)(string);
by prepending !
to the path (based on content directory) to the raw file.
Examples
PPCC
ppcc -c (or --convert) my_file.(extension)
output will be put in my_file.ppc
.
From libpp it can be accessed via ContentManager.Load!Type("my_file")
libpp
Example of simple polyplex application:
module example;
import std.stdio;
import polyplex;
import polyplex.math;
void main(string[] args)
{
arg = args[1..$];
// Enable info and debug logs.
LogLevel |= LogType.Info;
LogLevel |= LogType.Debug;
// Create game instance and start game.
MyGame game = new MyGame();
game.Run();
}
class MyGame : Game
{
Texture2D myTexture;
this() {
}
public override void Init()
{
// Enable/Disable VSync.
Window.VSync = VSyncState.VSync;
}
public override void LoadContent() {
// Load textures, sound, shaders, etc. here
//Example:
myTexture = Content.Load!Texture2D("myTexture");
}
public override void Update(GameTimes game_time)
{
world.Update(game_time);
}
public override void Draw(GameTimes game_time)
{
Renderer.ClearColor(Color.CornflowerBlue);
}
}
You can also check out example_game, which is used as a testbed for new libpp features/fixes.
Notice
The library is written in what would be considered non-idiomatic D.
- Registered by Clipsey
- ~refactor released 5 years ago
- PolyplexEngine/libpp
- BSL-1.0
- Sub packages:
- pp:openal, pp:core, pp:audio, pp:math, pp:utils, pp:gl3
- Dependencies:
- colorize, pp:openal, pp:utils, ppc, sharpevents, pp:gl3, bindbc-sdl, pp:audio, bindbc-loader, pp:core
- Versions:
-
0.1.0 2019-Nov-23 0.0.65 2019-Jul-22 0.0.64 2019-Jul-01 0.0.63 2019-Jul-01 0.0.62 2019-Jul-01 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
239 downloads total
-
- Score:
- 1.3
- Short URL:
- pp.dub.pm