Code Monkey home page Code Monkey logo

tilemap's Introduction

Tile Map

A template SDL3 cross-platform project

You can find compiled binaries and a play-on-web version here: https://cheyao.itch.io/test-sdl3

Dependencies:

SDL3 SDL3_image

Building on mac and linux:

git clone https://github.com/cheyao/TileMap
cd TileMap
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

To make release on mac:

./mac-patch-dylib.sh

This will patch the binary to include SDL in the bundle

Web

Compile and install SDL and SDL_image as you would but with emscripten. (You need static libs -DBUILD_SHARED_LIBS=OFF)

mkdir build && cd build
emcmake cmake -DCMAKE_BUILD_TYPE=Release ..
emmake make 

When building there should be errors saying for example that you need png library, so go to the external folder of SDL_image, run ./download.sh and go to the directories of the missing libraryies and build with cmake & emscripten.

Linux 32 bit

export CFLAGS="-m32"
export CXXFLAGS="-m32"
export LDFLAGS="-m32"
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

Linux for distribution

To distribute on linux you can use

./cmake/distribute-linux.sh

The output will be in output

For windows on linux

mkdir build && cd build
x86_64-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

See https://cheyao.github.io/cross-compile-windows.html

Emscriptien

mkdir build && cd build
source ~/emsdk/emsdk_env.sh
emcmake -DCMAKE_BUILD_TYPE=Release ..
emmake

See https://cheyao.github.io/cross-compile-web.html

Android

git submodule update --init --recursive
cd android
./gradlew build

You will find an unsigned apk in app/build/outputs/apk/release/

You can sign the app with cmake/sign-apk.sh, just edit it with your env variables

tilemap's People

Contributors

cheyao avatar

Stargazers

 avatar

Watchers

 avatar

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.