Build Platform | Status (tests only) |
---|---|
MSVC 2017 x64 | |
Linux x64 |
Om is a nice 2d game engine for multiplatform studying.
- Environmental friendliness (take less do more with c++)
- Modern IT technology (c++23, cmake-3.30, gradle)
- Creativity (create funny tools with imgui library)
- Fun 🤣
- multiplatform (Linux, windows, Mac OS, Android, iOS)
- 2d on top of OpenGL 2.0 ES (3.0 ES)
- last c++20(c++23) standard
- STL enabled, no custom monkey coding
- easy building with modern cmake
Om project uses a number of open source projects to work properly:
- SDL3 - best cross-platform low level game library
- Om Project is open source with a public repository
- om on BitBucket.
Om requires SDL3 v3.0.0+ to run.
Install the dependencies to build engine on Linux.
git clone [email protected]:b_y/om.git
sudo apt install libsdl2-dev
cmake -G"Makefiles"
make -j 4
bin/engine --test
git clone [email protected]:b_y/om.git
sudo dnf install SDL3
sudo dnf install SDL3-static
cmake -G"Makefiles"
make -j 4
bin/engine --test
-
To search package
# search by package name dnf search SDL3 # search by file in package dnf provides /usr/lib/libSDL3.so # search by part of file name dnf provides "*/libSDL3.so"
-
To list package contents (files list)
dnf repoquery -l SDL3 rpm -ql SDL3
-
To show compile/link/version of installed version
sdl3-config --version sdl3-config --libs sdl3-config --static-libs
On Mac OS X for c++17 compiler you have to install latest gcc from Homebrew and then use it
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install gcc
brew install SDL3
brew install cmake
-
install vcpkg from vcpkg
-
install SDL3 in vcpkg:
vcpkg install sdl3
-
make directory build in om/tests. move into it and there:
cmake .. -DCMAKE_TOOLCHAIN_FILE={YOUR_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
-
build all using:
"C:\Program Files (x86)\Microsoft Visual Studio\ \ 2017\Community\MSBuild\15.0\Bin\MSBuild.exe" all-tests-build.sln
On Windows using MSYS2
-
from msys2 bash shell:
pacman -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-SDL3
-
(optional) full build development environment on windows using msys2:
pacman -S base-devel mingw-w64-x86_64-toolchain \ git mingw-w64-x86_64-cmake mingw-w64-x86_64-qt-creator ninja
-
from cmd.exe Windows terminal program (g++ in PATH from msys2)
cd ~/om mkdir build cd build cmake ../tests cmake --build .
- read complete example in
support/docker{Dockerfile|readme.md}
- write Dockerfile
- call
sudo systemctl start docker
- call
sudo docker build -t leanid/fedora_latest .
- call
sudo docker push leanid/fedora_latest
Dockerfile content:
FROM fedora:latest
RUN dnf update -y
RUN dnf upgrade -y
RUN dnf install -y gcc-c++ make cmake mingw64-gcc mingw64-gcc-c++ \
clang wine git SDL3-devel SDL3-static mingw64-SDL3 mingw64-SDL3-static \
libstdc++-static glibc-static ninja-build
-
create in project root file: .dir-locals.el
-
place next code into it.
-
edit it if you need add some cmake flags or change test-command
;;; Directory Local Variables ;;; For more information see (info "(emacs) Directory Variables") ((nil . ((projectile--cmake-manual-command-alist . ((:configure-command . "cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -S . -B build") (:compile-command . "cmake --build build") (:test-command . "./build/30-1-point-shadow"))))))
-
also you may want to disable warning about every opened file in project. Place next into: ~/.doom.d/config.el or ~/.config/doom/config.el
(put 'projectile--cmake-manual-command-alist 'safe-local-variable (lambda (_) t))
-
one more hint. Place .projectile file in root of your project to force doomemacs use this directory as root
-
on fedora install build dependencies to build Emacs from source:
sudo dnf install gtk+-devel libXaw-devel libjpeg-devel libpng-devel \ giflib-devel libtiff-devel gnutls-devel ncurses-devel Xaw3d-devel \ libgccjit-devel harfbuzz-devel jansson-devel cairo-devel \ ripgrep fd-find libtool
-
build Emacs with native-compilation enabled
# configure emacs for native-compilation like next: ../emacs-28.1/configure --with-native-compilation --with-mailutils
-
after installing just fresh Emacs call sync to regenerate-compile elisp packages for doomemacs
~/.doom.d/bin/doom sync
ZIP