Skip to content

Commit 9c5208e

Browse files
Release commit for 0.3
1 parent 9927879 commit 9c5208e

29 files changed

+158
-152
lines changed

.github/workflows/linux.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Linux CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: configure
17+
run: cmake -DCMAKE_BUILD_TYPE=Release
18+
- name: build
19+
run: cmake --build .
20+

.github/workflows/macos.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v3
16-
- name: make dir
17-
run: mkdir build
18-
- name: change dir
19-
run: cd build
2016
- name: configure
21-
run: cmake .. -DCMAKE_BUILD_TYPE=Release
17+
run: cmake -DCMAKE_BUILD_TYPE=Release
2218
- name: build
2319
run: cmake --build .
2420

.github/workflows/ubuntu.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/web.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@ jobs:
1717
run: |
1818
sudo apt-get update
1919
sudo apt-get install emscripten
20-
- name: make dir
21-
run: mkdir build
22-
- name: change dir
23-
run: cd build
2420
- name: configure
25-
run: emcmake cmake .. -DCMAKE_BUILD_TYPE=Release
21+
run: emcmake cmake -DCMAKE_BUILD_TYPE=Release
2622
- name: build
2723
run: cmake --build .
2824

.github/workflows/windows.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v3
16-
- name: make dir
17-
run: mkdir build
18-
- name: change dir
19-
run: cd build
2016
- name: configure
21-
run: cmake .. -DCMAKE_BUILD_TYPE=Release
17+
run: cmake -DCMAKE_BUILD_TYPE=Release
2218
- name: build
2319
run: cmake --build .
2420

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "docs"]
2+
path = docs
3+
url = https://github.com/EmperorPenguin18/tidal2d.wiki.git

CMakeLists.txt

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.15)
2-
project(tidalpp)
2+
project(tidal2d)
33

44
option(STATIC "Build the game to work as a single binary" OFF)
55

@@ -27,9 +27,9 @@ else()
2727
set(LUA_ENABLE_SHARED ON CACHE BOOL "Build Lua shared")
2828
endif()
2929

30-
add_executable(tidalpp)
30+
add_executable(tidal2d)
3131

32-
target_sources(tidalpp PRIVATE src/actions.c src/assets.c src/common.c src/engine.c src/filesystem.c src/fonts.c src/instance.c src/main.c src/zpl.c)
32+
target_sources(tidal2d PRIVATE src/actions.c src/assets.c src/common.c src/engine.c src/filesystem.c src/fonts.c src/instance.c src/main.c src/zpl.c)
3333

3434
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
3535
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-Wall")
@@ -38,15 +38,14 @@ include(FetchContent)
3838

3939
# Math dependency
4040
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
41-
target_link_libraries(tidalpp PRIVATE m)
41+
target_link_libraries(tidal2d PRIVATE m)
4242
endif()
4343

4444
# SDL2 dependency
4545
if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
46-
target_link_options(tidalpp PRIVATE "-sUSE_SDL=2")
47-
target_link_options(tidalpp PRIVATE "-sALLOW_MEMORY_GROWTH")
48-
#target_link_libraries(tidalpp PRIVATE SDL2)
49-
set_target_properties(tidalpp PROPERTIES SUFFIX ".html") # remove later
46+
target_link_options(tidal2d PRIVATE "-sUSE_SDL=2")
47+
target_link_options(tidal2d PRIVATE "-sALLOW_MEMORY_GROWTH")
48+
set_target_properties(tidal2d PROPERTIES SUFFIX ".html") # remove later
5049
else()
5150
find_path(
5251
SDL_INCLUDE_DIR
@@ -58,7 +57,7 @@ else()
5857
message(STATUS "${SDL_LIB}")
5958
if (SDL_INCLUDE_DIR AND SDL_LIB AND (NOT STATIC))
6059
message(STATUS "Using system SDL2 lib")
61-
target_link_libraries(tidalpp PRIVATE SDL2 SDL2main)
60+
target_link_libraries(tidal2d PRIVATE SDL2 SDL2main)
6261
else()
6362
FetchContent_Declare(
6463
SDL
@@ -78,18 +77,18 @@ else()
7877
else()
7978
set_target_properties(SDL2 PROPERTIES OUTPUT_NAME "SDL2")
8079
endif()
81-
add_dependencies(tidalpp SDL2::SDL2)
82-
add_dependencies(tidalpp SDL2::SDL2main)
83-
target_include_directories(tidalpp PRIVATE "${sdl_BINARY_DIR}/include")
84-
target_include_directories(tidalpp PRIVATE "${sdl_BINARY_DIR}/include-config-release/SDL2")
85-
target_include_directories(tidalpp PRIVATE "${sdl_BINARY_DIR}/include-config-debug/SDL2")
86-
target_include_directories(tidalpp PRIVATE "${sdl_SOURCE_DIR}/include")
87-
target_link_directories(tidalpp PRIVATE ${sdl_BINARY_DIR})
80+
add_dependencies(tidal2d SDL2::SDL2)
81+
add_dependencies(tidal2d SDL2::SDL2main)
82+
target_include_directories(tidal2d PRIVATE "${sdl_BINARY_DIR}/include")
83+
target_include_directories(tidal2d PRIVATE "${sdl_BINARY_DIR}/include-config-release/SDL2")
84+
target_include_directories(tidal2d PRIVATE "${sdl_BINARY_DIR}/include-config-debug/SDL2")
85+
target_include_directories(tidal2d PRIVATE "${sdl_SOURCE_DIR}/include")
86+
target_link_directories(tidal2d PRIVATE ${sdl_BINARY_DIR})
8887
endif()
8988
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
90-
target_link_libraries(tidalpp PRIVATE SDL2d SDL2maind)
89+
target_link_libraries(tidal2d PRIVATE SDL2d SDL2maind)
9190
else()
92-
target_link_libraries(tidalpp PRIVATE SDL2 SDL2main)
91+
target_link_libraries(tidal2d PRIVATE SDL2 SDL2main)
9392
endif()
9493
endif()
9594
endif()
@@ -120,15 +119,15 @@ else()
120119
set(BUILD_DEMOS OFF CACHE BOOL "Don't build demos")
121120
add_subdirectory(${chipmunk_SOURCE_DIR} ${chipmunk_BINARY_DIR} EXCLUDE_FROM_ALL)
122121
if (STATIC)
123-
add_dependencies(tidalpp chipmunk_static)
122+
add_dependencies(tidal2d chipmunk_static)
124123
else()
125-
add_dependencies(tidalpp chipmunk)
124+
add_dependencies(tidal2d chipmunk)
126125
endif()
127-
target_include_directories(tidalpp PRIVATE "${chipmunk_SOURCE_DIR}/include")
128-
target_link_directories(tidalpp PRIVATE "${chipmunk_BINARY_DIR}/src")
126+
target_include_directories(tidal2d PRIVATE "${chipmunk_SOURCE_DIR}/include")
127+
target_link_directories(tidal2d PRIVATE "${chipmunk_BINARY_DIR}/src")
129128
endif()
130129
endif()
131-
target_link_libraries(tidalpp PRIVATE chipmunk)
130+
target_link_libraries(tidal2d PRIVATE chipmunk)
132131

133132
# Stb dependency
134133
find_path(
@@ -138,7 +137,7 @@ find_path(
138137
)
139138
message(STATUS "${STB_INCLUDE_DIR}")
140139
if (STB_INCLUDE_DIR)
141-
target_include_directories(tidalpp PRIVATE ${STB_INCLUDE_DIR})
140+
target_include_directories(tidal2d PRIVATE ${STB_INCLUDE_DIR})
142141
else()
143142
FetchContent_Declare(
144143
stb
@@ -148,7 +147,7 @@ else()
148147
FetchContent_GetProperties(stb)
149148
if(NOT stb_POPULATED)
150149
FetchContent_Populate(stb)
151-
target_include_directories(tidalpp PRIVATE ${stb_SOURCE_DIR})
150+
target_include_directories(tidal2d PRIVATE ${stb_SOURCE_DIR})
152151
endif()
153152
endif()
154153

@@ -160,7 +159,7 @@ find_path(
160159
)
161160
message(STATUS "${NANOSVG_INCLUDE_DIR}")
162161
if (NANOSVG_INCLUDE_DIR)
163-
target_include_directories(tidalpp PRIVATE ${NANOSVG_INCLUDE_DIR})
162+
target_include_directories(tidal2d PRIVATE ${NANOSVG_INCLUDE_DIR})
164163
else()
165164
FetchContent_Declare(
166165
nanosvg
@@ -170,7 +169,7 @@ else()
170169
FetchContent_GetProperties(nanosvg)
171170
if(NOT nanosvg_POPULATED)
172171
FetchContent_Populate(nanosvg)
173-
target_include_directories(tidalpp PRIVATE "${nanosvg_SOURCE_DIR}/src")
172+
target_include_directories(tidal2d PRIVATE "${nanosvg_SOURCE_DIR}/src")
174173
endif()
175174
endif()
176175

@@ -200,11 +199,11 @@ else()
200199
else()
201200
set_target_properties(lua_shared PROPERTIES OUTPUT_NAME "lua")
202201
endif()
203-
add_dependencies(tidalpp Lua::Library)
204-
target_include_directories(tidalpp PRIVATE "${lua_SOURCE_DIR}/lua-5.4.6/include")
205-
target_link_directories(tidalpp PRIVATE "${lua_BINARY_DIR}/lua-5.4.6")
202+
add_dependencies(tidal2d Lua::Library)
203+
target_include_directories(tidal2d PRIVATE "${lua_SOURCE_DIR}/lua-5.4.6/include")
204+
target_link_directories(tidal2d PRIVATE "${lua_BINARY_DIR}/lua-5.4.6")
206205
endif()
207206
endif()
208-
target_link_libraries(tidalpp PRIVATE lua)
207+
target_link_libraries(tidal2d PRIVATE lua)
209208

210-
install(TARGETS tidalpp DESTINATION bin)
209+
install(TARGETS tidal2d DESTINATION bin)

PKGBUILD

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Maintainer: Sebastien MacDougall-Landry
22

3-
pkgname=tidalpp
4-
pkgver=0.2
3+
pkgname=tidal2d
4+
pkgver=0.3
55
pkgrel=1
66
pkgdesc='Simple game engine'
7-
url='https://github.com/EmperorPenguin18/tidalpp/'
7+
url='https://github.com/EmperorPenguin18/tidal2d/'
88
source=("https://github.com/EmperorPenguin18/$pkgname/archive/$pkgver.tar.gz")
99
arch=('x86_64')
1010
license=('LGPL3')
@@ -23,5 +23,6 @@ build () {
2323

2424
package () {
2525
cd "$srcdir/$pkgname-$pkgver"
26+
cd build
2627
cmake --build . --target install
2728
}

README.md

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,48 @@
1-
# Tidalpp
1+
# Tidal2D
22
Simple game engine
33

4+
![Linux](https://github.com/EmperorPenguin18/tidal2d/actions/workflows/linux.yml/badge.svg)
5+
![Windows](https://github.com/EmperorPenguin18/tidal2d/actions/workflows/windows.yml/badge.svg)
6+
![Web](https://github.com/EmperorPenguin18/tidal2d/actions/workflows/web.yml/badge.svg)
7+
![macOS](https://github.com/EmperorPenguin18/tidal2d/actions/workflows/macos.yml/badge.svg)
8+
49
## Features
5-
- Developed on Linux, and should work on Windows
6-
- Uses SDL2 for cross-platform media capabilities
7-
- Physics engine using Chipmunk2d
8-
- Objects can be defined using plain test (Json)
10+
- Supports Linux, Windows, Web and probably macOS too
11+
- Many different asset file formats can be loaded
12+
- Easy event-action system for object behaviour
13+
- Scripting in Lua for complete control
914

1015
Features will be added to suit other projects I'm working on.
1116

1217
## Dependencies
1318

14-
SDL2, Chipmunk, and Lua
19+
CMake and git, everything else will be built automatically
1520

1621
## Install
17-
Arch
22+
Arch Linux
1823
```
19-
git clone https://github.com/EmperorPenguin18/tidalpp
20-
cd tidalpp
24+
git clone https://github.com/EmperorPenguin18/tidal2d
25+
cd tidal2d
2126
makepkg -si
2227
```
23-
Or just install from the [AUR](https://aur.archlinux.org/packages/tidalpp)
28+
Or just install from the [AUR](https://aur.archlinux.org/packages/tidal2d)
29+
30+
Web
31+
```
32+
git clone https://github.com/EmperorPenguin18/tidal2d
33+
cd tidal2d
34+
emcmake cmake -DCMAKE_BUILD_TYPE=Release
35+
cmake --build .
36+
```
2437

25-
Other Linux
38+
Everything else
2639
```
27-
git clone https://github.com/EmperorPenguin18/tidalpp
28-
cd tidalpp
29-
make release
30-
make install #as root
40+
git clone https://github.com/EmperorPenguin18/tidal2d
41+
cd tidal2d
42+
cmake -DCMAKE_BUILD_TYPE=Release
43+
cmake --build .
3144
```
3245
## Documentation
33-
See the [wiki](https://github.com/EmperorPenguin18/tidalpp/wiki/)
34-
## Games using Tidalpp
35-
[Example: The Game](https://github.com/EmperorPenguin18/tidalpp/tree/main/example)
46+
See the [wiki](https://github.com/EmperorPenguin18/tidal2d/wiki/)
47+
## Games using Tidal2D
48+
[Example: The Game](https://github.com/EmperorPenguin18/tidal2d/tree/main/example)

docs

Submodule docs added at b7fc659

0 commit comments

Comments
 (0)