Giter VIP home page Giter VIP logo

jngl's Introduction

JNGL - Just a Neat Game Library

๐ŸŒ Website ๐Ÿƒ Quickstart ๐ŸŽ“ Tutorial ๐Ÿ“š Documentation

Chat

An easy to use C++ game library for Linux, Windows, macOS, Android, iOS, Xbox, the Nintendo Switch, and the Web.

Portal Dogs running on the Switch

Building

cmake -Bbuild
cmake --build build
./build/jngl-test

Linux

Ubuntu

sudo apt-get install libgl1-mesa-dev libfreetype6-dev libfontconfig1-dev libpng-dev \
libxxf86vm-dev libvorbis-dev cmake g++ libwebp-dev git libsdl2-dev

Fedora

sudo dnf install fontconfig-devel freetype-devel libvorbis-devel libwebp-devel \
cmake SDL2-devel gcc-c++ libatomic

Arch Linux

pacman -Syu --needed cmake gcc sdl2 pkg-config fontconfig libwebp libvorbis

Windows

MSYS2 / MinGW-w64

Set up MSYS2 and install the following in a MinGW-w64 Win64 Shell:

pacman -Syu --needed mingw-w64-x86_64-gcc \
mingw-w64-x86_64-freetype mingw-w64-x86_64-libvorbis mingw-w64-x86_64-libwebp \
mingw-w64-x86_64-dlfcn mingw-w64-x86_64-cmake make mingw-w64-x86_64-gdb \
mingw-w64-x86_64-libtheora mingw-w64-x86_64-SDL2

Visual Studio 2017 or newer

cmake -Bbuild -DFETCHCONTENT_QUIET=0

and then open build/jngl.sln.

Mac

Use Homebrew to install the build dependencies:

brew install sdl2 freetype libvorbis webp pkg-config cmake

Android

Install the Android SDK and let ANDROID_HOME point to it. In the Android SDK Manager install the NDK build tools. Type the following to run the test app via ADB:

make -C android run

You can also open the android/test folder in Android Studio and build from there.

iOS

Generate a Xcode project using CMake:

cmake -Bbuild-ios -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/iOS.toolchain.cmake -DIOS_PLATFORM=SIMULATOR

Open and build build-ios/jngl.xcodeproj in Xcode.

Xbox

cmake -Bbuild-uwp -DCMAKE_SYSTEM_NAME=WindowsStore "-DCMAKE_SYSTEM_VERSION=10.0"

and then open build-uwp/jngl.sln.

jngl's People

Contributors

13udha avatar jannesmeyer avatar jhasse avatar pinguin999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jngl's Issues

Support Universal Windows Platform (Xbox)

TODO:

  • Merge #35
  • Add MinGW + SDL2 build to GitHub Actions
  • Make SDL2 work with MSVC
  • Add MSVC + SDL2 build to GitHub Actions
  • Let cmake -Bbuild-uwp -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 do the right thing (i.e. define JNGL_UWP when WINDOWS_STORE is set)
  • Fix compile error in src\win32\other.cpp
  • Fix kcat/openal-soft#163 (see https://github.com/kakashidinho/openal-soft-winphone for help)
  • Build and integrate ANGLE and disable epoxy for UWP
  • Add data files via CMake
  • Fix remaining MSVC + SDL2 + UWP build errors
  • Profit.

Get Locale

A function to get the system language would be great ;)

Building fails on Arch Linux

Building fails on Arch Linux with

...
linking: python/libjngl.so
/bin/ld: cannot find -lboost_python-py36
collect2: error: ld returned 1 exit status
scons: *** [python/libjngl.so] Error 1
scons: building terminated because of errors.

Installed packages: python 3.6.0, boost 1.63.0.

Downloads don't work

Both downloads in the downloads section on github don't work anymore. It would be nice if you could fix this.

Windows Scale error

When Windows display scale is on and a game starts in full screen the game starts in a downscaled resolution.

Example 1920 is native
Scale is 200%
Game starts in 960

Remove Azure Pipelines on March 23, 2020

Azure Pipelines will remove the macOS-10.13 image on that day. Since iOS is now also build via CMake and GitHub Actions, Azure Pipeliens can be completely removed.

Use new Autorotation support available since iOS 6.0

Instead of shouldAutorotateToInterfaceOrientation. From iOS' header:

// Applications should use supportedInterfaceOrientations and/or shouldAutorotate.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation API_DEPRECATED("", ios(2.0, 6.0)) API_UNAVAILABLE(tvos);

// New Autorotation support.
@property(nonatomic, readonly) BOOL shouldAutorotate API_AVAILABLE(ios(6.0)) API_UNAVAILABLE(tvos);
@property(nonatomic, readonly) UIInterfaceOrientationMask supportedInterfaceOrientations API_AVAILABLE(ios(6.0)) API_UNAVAILABLE(tvos);

Game Somyeol2d does not draw correctly with jngl 1.0.3

Hello again,

first thanks to merge my pull request.

This time I have a problem with a game which uses the new version jngl 1.0.3.
I am not sure if the problem is in the game or the library. As I am not the author of the game
and do not know how the jngl library works I ask you to help me with the problem.
I already patched the game to call the renamed functions in jngl (print also has been renamed to print1).
But after starting the game it shows loading progress bars. But other than with jngl 0.9.5 those progress
bars are not at the top left of the screen but at the center. After that the main background also
begins in the center of the screen and I have to kill the game then because I also cannot quit it with
cancel.
If you unapply my patch you can start the game with jngl 0.9.5 where it should work fine.

https://github.com/ckorn/somyeol2d-110606/commit/e69c8080097e8a256fd83d32444d8712c35e9742

Please help because I do not know what is going wrong.

With my debugging I found that the position of the background is calculated and drawn here:
https://github.com/ckorn/somyeol2d-110606/blob/master/main.py#L76

On my screen (1920x1080) the start position is calculated to be (0,0) which is correct because the background image has the same size as my screen. But I do not know why the background is drawn with the top left corner being in the middle of my screen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.